-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathswagger.yaml
executable file
·282 lines (282 loc) · 8.66 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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
---
swagger: "2.0"
info:
description: This API is the database interface for information related to Twitter.
version: "1.0.1"
title: This API is the database interface for information related to Twitter.
contact:
email: [email protected]
paths:
/store/tweet/:
post:
summary: Store a list of tweets.
description: Store a list of tweets.
operationId: postTweet
consumes:
- application/json
parameters:
- in: body
name: tweet
required: true
schema:
$ref: "#/definitions/Tweets"
responses:
200:
description: Tweets successfully stored.
400:
description: bad input parameter or no tweet could be retrieved.
/label/tweet/:
post:
summary: stores a human created label for a tweet.
description: stores a human created label for a tweet.
operationId: postLabelTwitter
consumes:
- application/json
parameters:
- in: body
name: tweetlabel
required: true
schema:
$ref: "#/definitions/TweetLabel"
responses:
200:
description: Tweets successfully stored.
400:
description: bad input parameter or no tweet could be retrieved.
/store/observable/:
post:
summary: Stores a twitter profile as under observation (will be crawled frequently)
description: Stores a twitter profile as under observation (will be crawled frequently)
operationId: postObservableTwitter
consumes:
- application/json
parameters:
- in: body
name: observableTwitter
required: true
schema:
$ref: "#/definitions/ObservableTwitter"
responses:
200:
description: observable twitter profile successfully stored.
400:
description: bad input parameter or no tweet could be retrieved.
500:
description: could not store the observable in the database.
/account_name/all:
get:
summary: returns a list of strings containing all twitter profile names for which tweets are collected.
description: returns a list of strings containing all twitter profile names for which tweets are collected.
operationId: getAllTwitterAccountNames
produces:
- application/json
responses:
200:
description: list of twitter profile names.
schema:
type: array
items:
type: string
/account_name/{account_name}/class/{tweet_class}:
get:
summary: Get all tweets belonging to the given class of the given twitter profile.
description: Get all tweets belonging to the given class of the given twitter profile.
operationId: getTweetOfClass
parameters:
- name: account_name
in: path
description: the unique account name of a twitter user.
required: true
type: string
- name: tweet_class
in: path
description: the unique account name of a twitter user.
required: true
type: string
responses:
200:
description: list of tweets.
schema:
$ref: "#/definitions/Tweets"
400:
description: bad input parameter or no tweet could be retrieved.
/account_name/{account_name}/all:
get:
summary: Get all tweets belonging to the given twitter profile.
description: Get all tweets belonging to the given twitter profile.
operationId: getAllTweetsOfAccount
parameters:
- name: account_name
in: path
description: the unique account name of a twitter user.
required: true
type: string
responses:
200:
description: list of tweets.
schema:
$ref: "#/definitions/Tweets"
400:
description: bad input parameter or no tweet could be retrieved.
/account_name/{account_name}/all/unlabeled:
get:
summary: Get all tweets belonging to the given twitter profile that are not labeled by a human.
description: Get all tweets belonging to the given twitter profile that are not labeled by a human.
operationId: getAllUnlabeledTweetsOfAccount
parameters:
- name: account_name
in: path
description: the unique account name of a twitter user.
required: true
type: string
responses:
200:
description: list of tweets.
schema:
$ref: "#/definitions/Tweets"
400:
description: bad input parameter or no tweet could be retrieved.
/account_name/{account_name}/lang/{lang}/unclassified:
get:
summary: Get all tweets belonging to the given twitter profile which had not ben classified yet.
description: Get all tweets belonging to the given twitter profile which had not ben classified yet.
operationId: getAllUnclassifiedTweetsOfAccount
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 tweets are written in.
required: true
type: string
responses:
200:
description: list of tweets.
schema:
$ref: "#/definitions/Tweets"
400:
description: bad input parameter or no tweet could be retrieved.
/account_name/{account_name}/currentweek:
get:
summary: Get all tweets of the current week belonging to the given twitter profile.
description: Get all tweets of the current week belonging to the given twitter profile.
operationId: getAllTweetsOfAccountForCurrentWeek
parameters:
- name: account_name
in: path
description: the unique account name of a twitter user.
required: true
type: string
responses:
200:
description: list of tweets.
schema:
$ref: "#/definitions/Tweets"
400:
description: bad input parameter or no tweet could be retrieved.
/observables:
get:
summary: Get all twitter profiles under observation.
description: Get all twitter profiles under observation.
operationId: getObservablesTwitter
produces:
- application/json
responses:
200:
description: observable twitter profiles.
schema:
$ref: "#/definitions/ObservablesTwitter"
400:
description: bad input parameter or no tweet could be retrieved.
delete:
summary: Get all twitter profiles under observation.
description: Get all twitter profiles under observation.
operationId: deleteObservableTwitter
consumes:
- application/json
parameters:
- in: body
name: observable
required: true
schema:
$ref: "#/definitions/ObservableTwitter"
responses:
200:
description: observable successfully deleted.
400:
description: bad input parameter or could not delete observable.
definitions:
Tweets:
type: array
items:
$ref: "#/definitions/Tweet"
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
sentiment:
type: string
example: NEUTRAL
sentiment_score:
type: integer
example: -1
tweet_class:
type: string
example: problem_report
TweetLabel:
type: object
properties:
status_id:
type: string
example: "933476766408200193"
date:
type: integer
example: 20181231
label:
type: string
example: "problem_report"
previous_label:
type: string
example: "inquiry"
ObservablesTwitter:
type: array
items:
$ref: "#/definitions/ObservableTwitter"
ObservableTwitter:
type: object
properties:
account_name:
type: string
example: mustermann
interval:
type: string
example: daily
lang:
type: string
example: en