-
Notifications
You must be signed in to change notification settings - Fork 1
/
openapi.yaml
453 lines (453 loc) · 11.2 KB
/
openapi.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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
openapi: 3.1.0
info:
title: FastAPI
version: 0.1.0
paths:
/allsides:
get:
summary: Search Allsides
description: Search the AllSides database for a partial name
operationId: search_allsides_allsides_get
security:
- APIKeyQuery: []
- APIKeyHeader: []
- HTTPBearer: []
parameters:
- name: name
in: query
required: true
schema:
type: string
title: Name
- name: limit
in: query
required: false
schema:
type: integer
default: 5
title: Limit
- name: offset
in: query
required: false
schema:
type: integer
default: 0
title: Offset
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
type: object
additionalProperties:
type: string
title: Response Search Allsides Allsides Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/mediabiasfactcheck:
get:
summary: Search Mediabiasfactcheck
description: Search the MediaBiasFactCheck database for a partial name
operationId: search_mediabiasfactcheck_mediabiasfactcheck_get
security:
- APIKeyQuery: []
- APIKeyHeader: []
- HTTPBearer: []
parameters:
- name: name
in: query
required: true
schema:
type: string
title: Name
- name: limit
in: query
required: false
schema:
type: integer
default: 5
title: Limit
- name: offset
in: query
required: false
schema:
type: integer
default: 0
title: Offset
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
type: object
additionalProperties:
type: string
title: Response Search Mediabiasfactcheck Mediabiasfactcheck Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/media:
get:
summary: Search Media
description: Search the curated independent media database for a partial name
operationId: search_media_media_get
security:
- APIKeyQuery: []
- APIKeyHeader: []
- HTTPBearer: []
parameters:
- name: query
in: query
required: true
schema:
type: string
title: Query
- name: limit
in: query
required: false
schema:
type: integer
default: 5
title: Limit
- name: offset
in: query
required: false
schema:
type: integer
default: 0
title: Offset
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Media'
title: Response Search Media Media Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/media-videos:
get:
summary: Get Youtube Search
description: Get the details of matching videos by either providing Youtube
channels, a query, or both
operationId: get_youtube_search_media_videos_get
security:
- APIKeyQuery: []
- APIKeyHeader: []
- HTTPBearer: []
parameters:
- name: query
in: query
required: false
schema:
type: string
minLength: 3
title: Query string
description: Query string used to match independent news channels and do a
youtube search with in those channels.
example: israel
- name: channels
in: query
required: false
schema:
type: string
title: Channels to search in
description: A string of comma-separated Youtube channels to search in.
example: '@aljazeeraenglish,@DemocracyNow'
- name: period_days
in: query
required: false
schema:
type: integer
title: Period in days
default: 3
description: The period in days since now that we want to search videos for.
- name: max_channels
in: query
required: false
schema:
type: integer
title: Max channels
default: 12
description: Maximum number of channels that we want to match. Needed when
no channels were provided.
- name: max_videos_per_channel
in: query
required: false
schema:
type: integer
title: Max videos per channel
default: 3
description: The maximum number of videos per channel that we want from each
channel search.
- name: get_descriptions
in: query
required: false
schema:
type: boolean
title: Get descriptions
default: false
description: Get the long descriptions for the videos.
- name: get_transcripts
in: query
required: false
schema:
type: boolean
title: Get transcripts
default: true
description: Get the transcripts for the videos.
- name: char_cap
in: query
required: false
schema:
type: integer
title: Max chars in the response
description: The maximum number of characters for the response.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Video'
title: Response Get Youtube Search Media Videos Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/youtube-transcripts:
get:
summary: Get Youtube Transcripts
description: Extract transcripts from a list of Youtube video ids
operationId: get_youtube_transcripts_youtube_transcripts_get
security:
- APIKeyQuery: []
- APIKeyHeader: []
- HTTPBearer: []
parameters:
- name: ids
in: query
required: true
schema:
type: string
title: Ids
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/VideoTranscript'
title: Response Get Youtube Transcripts Youtube Transcripts Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/privacy:
get:
summary: Read Privacy
operationId: read_privacy_privacy_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: string
title: Response Read Privacy Privacy Get
components:
schemas:
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
Media:
properties:
Name:
type: string
title: Name
Website:
type: string
title: Website
Youtube:
type: string
title: Youtube
About:
type: string
title: About
TrustFactors:
type: string
title: Trustfactors
Topics:
type: string
title: Topics
Wikipedia:
type: string
title: Wikipedia
X:
type: string
title: X
Bias:
anyOf:
- type: string
- type: 'null'
title: Bias
Profile:
anyOf:
- type: string
- type: 'null'
title: Profile
Factual:
anyOf:
- type: string
- type: 'null'
title: Factual
Credibility:
anyOf:
- type: string
- type: 'null'
title: Credibility
type: object
required:
- Name
- Website
- Youtube
- About
- TrustFactors
- Topics
- Wikipedia
- X
- Bias
- Profile
- Factual
- Credibility
title: Media
description: Media model
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
Video:
properties:
id:
type: string
title: Id
title:
type: string
title: Title
short_desc:
type: string
title: Short Desc
channel:
type: string
title: Channel
duration:
type: string
title: Duration
views:
type: string
title: Views
publish_time:
type: string
title: Publish Time
url_suffix:
type: string
title: Url Suffix
long_desc:
anyOf:
- type: string
- type: 'null'
title: Long Desc
transcript:
anyOf:
- type: string
- type: 'null'
title: Transcript
type: object
required:
- id
- title
- short_desc
- channel
- duration
- views
- publish_time
- url_suffix
title: Video
description: Video model
VideoTranscript:
properties:
id:
type: string
title: Id
text:
type: string
title: Text
type: object
required:
- id
- text
title: VideoTranscript
description: Video transcript model
securitySchemes:
APIKeyQuery:
type: apiKey
in: query
name: apikey
APIKeyHeader:
type: apiKey
in: header
name: X-API-KEY
HTTPBearer:
type: http
scheme: bearer