-
Notifications
You must be signed in to change notification settings - Fork 2
/
swagger.yaml
executable file
·188 lines (185 loc) · 6.09 KB
/
swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
---
swagger: "2.0"
info:
description: This API returns a json, containing a list of Tweets.
version: "1.0.1"
title: Get Tweets
contact:
email: [email protected]
host: 217.172.12.199:9624
schemes:
- http
paths:
/hitec/crawl/tweets/mention/{account_name}/history-in-days/{days}/lang/{lang}:
get:
summary: Get a list of Tweets that mention a specific account for a defined time-frame.
description: Get a list of Tweets that mention a specific account for a defined time-frame.
operationId: getTweetsFromAccountByDays
produces:
- application/json
parameters:
- name: account_name
in: path
description: the unique account name of a twitter user.
required: true
type: string
- name: days
in: path
description: time-frame of days we want to crawl. The days are counted backwards from today.For instance, day=1 means crawl today and yesterday. The maximum number of days is 30 because otherwise the crawl process takes too much time and produces too big output.
required: true
type: integer
maximum: 30
minimum: 0
format: integer
- name: lang
in: path
description: the language the tweet was oficially labeled with
required: true
type: string
responses:
200:
description: Tweets that mention the given account, in the given language, from the dpecified days in the past.
schema:
$ref: "#/definitions/Tweet"
400:
description: bad input parameter or no tweet could be retrieved.
/hitec/crawl/tweets/mention/{account_name}/from/{YYYY-mm-dd}/lang/{lang}:
get:
summary: Get a list of Tweets in a given language that mentions the specified account.
description: Get a list of Tweets in a given language that mentions the specified account.
operationId: getTweetsFromAccountFromDateInLang
produces:
- application/json
parameters:
- name: account_name
in: path
description: the unique account name of a twitter user.
required: true
type: string
- name: YYYY-mm-dd
in: path
description: the date from which on we want to retrieve tweets
required: true
type: string
- name: lang
in: path
description: the language the tweet was oficially labeled with
required: true
type: string
responses:
200:
description: Tweet conversations.
schema:
$ref: "#/definitions/Tweet"
400:
description: bad input parameter or no tweet could be retrieved.
/hitec/crawl/tweets/mention/{account_name}/lang/{lang}:
get:
summary: Get a list of all recent Tweets. Perfoms pagination and therefore takes a long time (>30min).
description: Get a list of all recent Tweets. Perfoms pagination and therefore takes a long time (>30min).
operationId: getTweetsFromAccountInLang
produces:
- application/json
parameters:
- name: account_name
in: path
description: the unique account name of a twitter user.
required: true
type: string
- name: lang
in: path
description: the language the tweet was oficially labeled with
required: true
type: string
responses:
200:
description: list of tweets.
schema:
$ref: "#/definitions/Tweet"
400:
description: bad input parameter or no tweet could be retrieved.
/hitec/crawl/tweets/mention/{account_name}/lang/{lang}/fast:
get:
summary: get a list of all available recent Tweets until the API limit is reached. Usually takes a few seconds.
description: get a list of all available recent Tweets until the API limit is reached. Usually takes a few seconds.
operationId: getTweetsFromAccountInLangFast
produces:
- application/json
parameters:
- name: account_name
in: path
description: the unique account name of a twitter user.
required: true
type: string
- name: lang
in: path
description: the language the tweet was oficially labeled with
required: true
type: string
responses:
200:
description: list of tweets.
schema:
$ref: "#/definitions/Tweet"
400:
description: bad input parameter or no tweet could be retrieved.
/hitec/crawl/tweets/{account_name}/exists:
get:
summary: check if a specified Twitter account exists.
description: check if a specified Twitter account exists.
operationId: getAccountNameExists
produces:
- application/json
parameters:
- name: account_name
in: path
description: the unique account name of a twitter user.
required: true
type: string
responses:
200:
description: response message stating if the specified account exists.
schema:
$ref: "#/definitions/ResponseMessage"
500:
description: bad request
definitions:
Tweet:
type: object
properties:
created_at:
type: integer
example: 20181201
favorite_count:
type: integer
example: 1
retweet_count:
type: integer
example: 1
status_id:
type: string
example: 933476766408200193
in_reply_to_screen_name:
type: string
example: musteraccount
lang:
type: string
example: en
text:
type: string
example: "@maxmustermannThanks for your message!"
user_name:
type: string
example: maxmustermann
tweet_class:
type: string
example: problem_report
ResponseMessage:
type: object
properties:
account_exists:
type: boolean
example: true
message:
type: string
example: Account VodafoneUK found on Twitter