This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
giphy.yaml
503 lines (503 loc) · 13.4 KB
/
giphy.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
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
swagger: '2.0'
schemes:
- https
host: api.giphy.com
basePath: /v1
info:
contact:
email: support@giphy.com
description: Giphy API phantom change
termsOfService: 'https://developers.giphy.com/'
title: Giphy
version: '1.0'
x-apisguru-categories:
- media
x-logo:
url: 'https://twitter.com/GIPHY/profile_image?size=original'
x-origin:
- format: swagger
url: 'https://raw.githubusercontent.com/faragorn/open-api-specs/master/specs/giphy_api/1.0/index.yml'
version: '2.0'
x-providerName: giphy.com
externalDocs:
description: Official Giphy Documentation
url: 'https://developers.giphy.com/docs/'
consumes:
- application/json
produces:
- application/json
securityDefinitions:
api_key:
in: query
name: api_key
type: apiKey
security:
- api_key: []
parameters:
gifId:
description: Filters results by specified GIF ID.
format: int32
in: path
name: gifId
required: true
type: integer
gifIds:
description: 'Filters results by specified GIF IDs, separated by commas.'
in: query
name: ids
type: string
lang:
description: Specify default language for regional content; use a 2-letter ISO 639-1 language code.
in: query
name: lang
type: string
limit:
default: 25
description: The maximum number of records to return.
format: int32
in: query
name: limit
type: integer
offset:
default: 0
description: An optional results offset.
format: int32
in: query
name: offset
type: integer
query:
description: Search query term or prhase.
in: query
name: q
required: true
type: string
rating:
description: Filters results by specified rating.
in: query
name: rating
type: string
tag:
description: Filters results by specified tag.
in: query
name: tag
type: string
term:
description: Search term.
in: query
name: s
required: true
type: string
responses:
BadRequest:
description: Your request was formatted incorrectly or missing required parameters.
schema:
description: ''
type: object
properties:
data:
type: array
items:
properties: {}
meta:
type: object
properties:
status:
type: number
msg:
type: string
error_code:
type: number
response_id:
type: string
required:
- status
- msg
- error_code
- response_id
required:
- data
- meta
examples:
application/json:
data: []
meta:
status: 400
msg: 'Please specify GIF ids in correct format like gifid2, gifid2'
error_code: 400
response_id: 179eb5a0b422b53953f49a84761863bcf7bc1a88
Forbidden:
description: You weren't authorized to make your request; most likely this indicates an issue with your API Key.
schema:
description: ''
type: object
properties:
message:
type: string
minLength: 1
required:
- message
NotFound:
description: 'The particular GIF you are requesting was not found. This occurs, for example, if you request a GIF by an id that does not exist.'
schema:
description: ''
type: object
properties:
data:
type: array
items:
properties: {}
meta:
type: object
properties:
status:
type: number
msg:
type: string
response_id:
type: string
required:
- status
- msg
- response_id
required:
- data
- meta
examples:
application/json:
data: []
meta:
status: 404
msg: Not Found
response_id: 6995665c98ecc3a0ff1cd3e453540066a1af9e9e
TooManyRequests:
description: |
Your API Key is making too many requests. Read about [requesting a Production Key](https://developers.giphy.com/docs/#access) to upgrade your API Key rate limits.
tags:
- name: gifs
- name: stickers
paths:
/gifs:
get:
description: |
A multiget version of the get GIF by ID endpoint.
operationId: getGifsById
parameters:
- $ref: '#/parameters/gifIds'
responses:
'200':
description: OK
schema:
properties:
data:
items:
$ref: '#/definitions/Gif'
type: array
meta:
$ref: '#/definitions/Meta'
pagination:
$ref: '#/definitions/Pagination'
type: object
'400':
$ref: '#/responses/BadRequest'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'429':
$ref: '#/responses/TooManyRequests'
summary: Get GIFs by ID
tags:
- gifs
/gifs/random:
get:
description: |
Returns a random GIF, limited by tag. Excluding the tag parameter will return a random GIF from the GIPHY catalog.
operationId: randomGif
parameters:
- $ref: '#/parameters/tag'
- $ref: '#/parameters/rating'
responses:
'200':
description: ''
schema:
type: object
properties:
data:
$ref: '#/definitions/Gif'
meta:
$ref: '#/definitions/Meta'
'400':
$ref: '#/responses/BadRequest'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'429':
$ref: '#/responses/TooManyRequests'
summary: Random GIF
tags:
- gifs
/gifs/search:
get:
description: |
Search all GIPHY GIFs for a word or phrase. Punctuation will be stripped and ignored. Use a plus or url encode for phrases. Example paul+rudd, ryan+gosling or american+psycho.
operationId: searchGifs
parameters:
- $ref: '#/parameters/query'
- $ref: '#/parameters/limit'
- $ref: '#/parameters/offset'
- $ref: '#/parameters/rating'
- $ref: '#/parameters/lang'
responses:
'200':
description: Search results
schema:
properties:
data:
items:
$ref: '#/definitions/Gif'
type: array
meta:
$ref: '#/definitions/Meta'
pagination:
$ref: '#/definitions/Pagination'
type: object
'400':
$ref: '#/responses/BadRequest'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'429':
$ref: '#/responses/TooManyRequests'
summary: Search GIFs
tags:
- gifs
/gifs/translate:
get:
description: |
The translate API draws on search, but uses the GIPHY `special sauce` to handle translating from one vocabulary to another. In this case, words and phrases to GIF
operationId: translateGif
parameters:
- $ref: '#/parameters/term'
responses:
'200':
description: ''
schema:
properties:
data:
$ref: '#/definitions/Gif'
meta:
$ref: '#/definitions/Meta'
type: object
'400':
$ref: '#/responses/BadRequest'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'429':
$ref: '#/responses/TooManyRequests'
summary: Translate phrase to GIF
tags:
- gifs
/gifs/trending:
get:
description: |
Fetch GIFs currently trending online. Hand curated by the GIPHY editorial team. The data returned mirrors the GIFs showcased on the GIPHY homepage. Returns 25 results by default.
operationId: trendingGifs
parameters:
- $ref: '#/parameters/limit'
- $ref: '#/parameters/offset'
- $ref: '#/parameters/rating'
responses:
'200':
description: ''
schema:
properties:
data:
items:
$ref: '#/definitions/Gif'
type: array
meta:
$ref: '#/definitions/Meta'
pagination:
$ref: '#/definitions/Pagination'
type: object
'400':
$ref: '#/responses/BadRequest'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'429':
$ref: '#/responses/TooManyRequests'
summary: Trending GIFs
tags:
- gifs
'/gifs/{gifId}':
get:
description: |
Returns a GIF given that GIF's unique ID
operationId: getGifById
parameters:
- $ref: '#/parameters/gifId'
responses:
'200':
description: ''
schema:
properties:
data:
$ref: '#/definitions/Gif'
meta:
$ref: '#/definitions/Meta'
type: object
'400':
$ref: '#/responses/BadRequest'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'429':
$ref: '#/responses/TooManyRequests'
summary: Get GIF by Id
tags:
- gifs
/stickers/random:
get:
description: |
Returns a random GIF, limited by tag. Excluding the tag parameter will return a random GIF from the GIPHY catalog.
operationId: randomSticker
parameters:
- $ref: '#/parameters/tag'
- $ref: '#/parameters/rating'
responses:
'200':
description: ''
schema:
properties:
data:
$ref: '#/definitions/Gif'
meta:
$ref: '#/definitions/Meta'
type: object
'400':
$ref: '#/responses/BadRequest'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'429':
$ref: '#/responses/TooManyRequests'
summary: Random Sticker
tags:
- stickers
/stickers/search:
get:
description: |
Replicates the functionality and requirements of the classic GIPHY search, but returns animated stickers rather than GIFs.
operationId: searchStickers
parameters:
- $ref: '#/parameters/query'
- $ref: '#/parameters/limit'
- $ref: '#/parameters/offset'
- $ref: '#/parameters/rating'
- $ref: '#/parameters/lang'
responses:
'200':
description: Search results
schema:
properties:
data:
items:
$ref: '#/definitions/Gif'
type: array
meta:
$ref: '#/definitions/Meta'
pagination:
$ref: '#/definitions/Pagination'
type: object
'400':
$ref: '#/responses/BadRequest'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'429':
$ref: '#/responses/TooManyRequests'
summary: Search Stickers
tags:
- stickers
/stickers/translate:
get:
description: |
The translate API draws on search, but uses the GIPHY `special sauce` to handle translating from one vocabulary to another. In this case, words and phrases to GIFs.
operationId: translateSticker
parameters:
- $ref: '#/parameters/term'
responses:
'200':
description: ''
schema:
properties:
data:
$ref: '#/definitions/Gif'
meta:
$ref: '#/definitions/Meta'
type: object
'400':
$ref: '#/responses/BadRequest'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'429':
$ref: '#/responses/TooManyRequests'
summary: Translate phrase to Sticker
tags:
- stickers
/stickers/trending:
get:
description: |
Fetch Stickers currently trending online. Hand curated by the GIPHY editorial team. Returns 25 results by default.
operationId: trendingStickers
parameters:
- $ref: '#/parameters/limit'
- $ref: '#/parameters/offset'
- $ref: '#/parameters/rating'
responses:
'200':
description: ''
schema:
properties:
data:
items:
$ref: '#/definitions/Gif'
type: array
meta:
$ref: '#/definitions/Meta'
pagination:
$ref: '#/definitions/Pagination'
type: object
'400':
$ref: '#/responses/BadRequest'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'429':
$ref: '#/responses/TooManyRequests'
summary: Trending Stickers
tags:
- stickers
definitions:
Gif:
$ref: ./schemas/gif.v1.yaml
Image:
$ref: ./schemas/image.v1.yaml
Meta:
$ref: ./schemas/meta.v1.yaml
Pagination:
$ref: ./schemas/pagination.v1.yaml
User:
$ref: ./schemas/user.v1.yaml