raml_ruby 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/.travis.yml +6 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +71 -0
  7. data/Rakefile +1 -0
  8. data/fixtures/include_1.raml +7 -0
  9. data/fixtures/schemas/canonicalSchemas.raml +3 -0
  10. data/fixtures/schemas/filesystem/file.json +1 -0
  11. data/fixtures/schemas/filesystem/files.json +1 -0
  12. data/fixtures/schemas/filesystem/fileupdate.json +1 -0
  13. data/fixtures/schemas/filesystem/relative/test.json +1 -0
  14. data/lib/raml.rb +104 -0
  15. data/lib/raml/exceptions.rb +27 -0
  16. data/lib/raml/mixin/bodies.rb +32 -0
  17. data/lib/raml/mixin/documentable.rb +32 -0
  18. data/lib/raml/mixin/global.rb +20 -0
  19. data/lib/raml/mixin/headers.rb +22 -0
  20. data/lib/raml/mixin/merge.rb +24 -0
  21. data/lib/raml/mixin/parent.rb +54 -0
  22. data/lib/raml/mixin/validation.rb +49 -0
  23. data/lib/raml/node.rb +219 -0
  24. data/lib/raml/node/abstract_method.rb +61 -0
  25. data/lib/raml/node/abstract_resource.rb +165 -0
  26. data/lib/raml/node/abstract_resource_circular.rb +5 -0
  27. data/lib/raml/node/body.rb +94 -0
  28. data/lib/raml/node/documentation.rb +28 -0
  29. data/lib/raml/node/header.rb +4 -0
  30. data/lib/raml/node/method.rb +106 -0
  31. data/lib/raml/node/parameter/abstract_parameter.rb +251 -0
  32. data/lib/raml/node/parameter/base_uri_parameter.rb +6 -0
  33. data/lib/raml/node/parameter/form_parameter.rb +6 -0
  34. data/lib/raml/node/parameter/query_parameter.rb +6 -0
  35. data/lib/raml/node/parameter/uri_parameter.rb +7 -0
  36. data/lib/raml/node/parametized_reference.rb +15 -0
  37. data/lib/raml/node/reference.rb +4 -0
  38. data/lib/raml/node/resource.rb +26 -0
  39. data/lib/raml/node/resource_type.rb +20 -0
  40. data/lib/raml/node/resource_type_reference.rb +5 -0
  41. data/lib/raml/node/response.rb +32 -0
  42. data/lib/raml/node/root.rb +246 -0
  43. data/lib/raml/node/schema.rb +41 -0
  44. data/lib/raml/node/schema_reference.rb +5 -0
  45. data/lib/raml/node/template.rb +55 -0
  46. data/lib/raml/node/trait.rb +18 -0
  47. data/lib/raml/node/trait_reference.rb +5 -0
  48. data/lib/raml/parser.rb +57 -0
  49. data/lib/raml/parser/include.rb +25 -0
  50. data/lib/raml/patch/hash.rb +6 -0
  51. data/lib/raml/patch/module.rb +12 -0
  52. data/lib/raml/version.rb +3 -0
  53. data/raml_ruby.gemspec +35 -0
  54. data/raml_spec_reqs.md +276 -0
  55. data/templates/abstract_parameter.slim +68 -0
  56. data/templates/body.slim +15 -0
  57. data/templates/collapse.slim +10 -0
  58. data/templates/documentation.slim +2 -0
  59. data/templates/method.slim +38 -0
  60. data/templates/resource.slim +33 -0
  61. data/templates/response.slim +13 -0
  62. data/templates/root.slim +39 -0
  63. data/templates/style.sass +119 -0
  64. data/test/apis/box-api.raml +4224 -0
  65. data/test/apis/instagram-api.raml +3378 -0
  66. data/test/apis/stripe-api.raml +12227 -0
  67. data/test/apis/twilio-rest-api.raml +6618 -0
  68. data/test/apis/twitter-rest-api.raml +34284 -0
  69. data/test/raml/body_spec.rb +268 -0
  70. data/test/raml/documentation_spec.rb +49 -0
  71. data/test/raml/header_spec.rb +17 -0
  72. data/test/raml/include_spec.rb +40 -0
  73. data/test/raml/method_spec.rb +701 -0
  74. data/test/raml/parameter/abstract_parameter_spec.rb +564 -0
  75. data/test/raml/parameter/form_parameter_spec.rb +17 -0
  76. data/test/raml/parameter/query_parameter_spec.rb +33 -0
  77. data/test/raml/parameter/uri_parameter_spec.rb +44 -0
  78. data/test/raml/parser_spec.rb +53 -0
  79. data/test/raml/raml_spec.rb +32 -0
  80. data/test/raml/resource_spec.rb +440 -0
  81. data/test/raml/resource_type_spec.rb +51 -0
  82. data/test/raml/response_spec.rb +251 -0
  83. data/test/raml/root_spec.rb +655 -0
  84. data/test/raml/schema_spec.rb +110 -0
  85. data/test/raml/spec_helper.rb +11 -0
  86. data/test/raml/template_spec.rb +98 -0
  87. data/test/raml/trait_spec.rb +31 -0
  88. metadata +337 -0
@@ -0,0 +1,3378 @@
1
+ #%RAML 0.8
2
+ ---
3
+ title: Instagram API
4
+ version: v1
5
+ baseUri: https://api.instagram.com/{version}/
6
+ securitySchemes:
7
+ - oauth_2_0:
8
+ description: |
9
+ Instagram's API uses the OAuth 2.0 protocol for simple, but effective
10
+ authentication and authorization. The one thing to keep in mind is that
11
+ all requests to the API must be made over SSL (https:// not http://)
12
+ type: OAuth 2.0
13
+ describedBy:
14
+ headers:
15
+ Authorization:
16
+ description: |
17
+ Used to send a valid OAuth 2 access token. Do not use together with
18
+ the "access_token" queryParameters string parameter.
19
+ type: string
20
+ queryParameters:
21
+ access_token:
22
+ description: |
23
+ Used to send a valid OAuth 2 access token. Do not use together with
24
+ the "Authorization" header
25
+ type: string
26
+ settings:
27
+ authorizationUri: https://api.instagram.com/oauth/authorize
28
+ accessTokenUri: https://api.instagram.com/oauth/access_token
29
+ authorizationGrants: [ code, token ]
30
+ scopes:
31
+ - basic
32
+ - comments
33
+ - relationships
34
+ - likes
35
+ securedBy: [ oauth_2_0 ]
36
+ mediaType: application/json
37
+ traits:
38
+ - limitableById:
39
+ queryParameters:
40
+ min_id:
41
+ description: Return media later than this min_id.
42
+ type: integer
43
+ max_id:
44
+ description: Return media earlier than this max_id.
45
+ type: integer
46
+ - limitableByTime:
47
+ queryParameters:
48
+ max_timestamp:
49
+ description: Return media before this UNIX timestamp.
50
+ type: integer
51
+ min_timestamp:
52
+ description: Return media after this UNIX timestamp.
53
+ type: integer
54
+ resourceTypes:
55
+ - base:
56
+ get?:
57
+ queryParameters:
58
+ callback:
59
+ description: |
60
+ Callback function name. All output will be wrapper under this function name.
61
+ type: string
62
+ example: callbackFunction
63
+ required: false
64
+ count:
65
+ description: Number of items you would like to receive.
66
+ type: integer
67
+ example: 1
68
+ required: false
69
+ responses:
70
+ 503:
71
+ description: |
72
+ Server Unavailable. Check Your Rate Limits.
73
+ post?:
74
+ responses:
75
+ 503:
76
+ description: |
77
+ Server Unavailable. Check Your Rate Limits.
78
+ delete?:
79
+ responses:
80
+ 503:
81
+ description: |
82
+ Server Unavailable. Check Your Rate Limits.
83
+ documentation:
84
+ - title: Authentication
85
+ content: |
86
+ Instagram's API uses the [OAuth 2.0 protocol](http://tools.ietf.org/html/draft-ietf-oauth-v2-12) for simple, but effective authentication and authorization. OAuth 2.0 is much easier to use than previous schemes; developers can start using the Instagram API almost immediately. The one thing to keep in mind is that all requests to the API must be made over SSL (https:// not http://)
87
+
88
+ ## Do you need to authenticate?
89
+
90
+ For the most part, Instagram's API only requires the use of a _client_id). A client_id simply associates your server, script, or program with a specific application. However, some requests require authentication - specifically requests made on behalf of a user. Authenticated requests require an _access_token_. These tokens are unique to a user and should be stored securely. Access tokens may expire at any time in the future.
91
+
92
+ Note that in many situations, you may not need to authenticate users at all. For instance, you may request popular photos without authenticating (i.e. you do not need to provide an access_token; just use your client ID with your request). We only require authentication in cases where your application is making requests on behalf of a user (commenting, liking, browsing a user's feed, etc.).
93
+
94
+ ## Receiving an access_token
95
+
96
+ In order to receive an access_token, you must do the following:
97
+
98
+ - Direct the user to our authorization url.
99
+ * If the user is not logged in, they will be asked to log in.
100
+ * The user will be asked if they'd like to give your application access to his/her Instagram data.
101
+ - The server will redirect the user in one of two ways that you choose:
102
+ * *Server-side* flow (reccommended):Redirect the user to a URI of your choice. Take the provided
103
+ code parameter and exchange it for an access_token by POSTing the code to our access_token url.
104
+ * *Implicit flow*: Instead of handling a code, we include the access_token as a fragment (#) in the URL. This method allows applications without any server component to receive an access_token with ease.
105
+
106
+ ## Server-side (Explicit) Flow
107
+
108
+ Using the server-side flow is quite easy. Simply follow these steps:
109
+
110
+ ### Step One: Direct your user to our authorization URL
111
+
112
+ ```
113
+ https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=code
114
+ ```
115
+
116
+ *Note:* You may provide an optional *scope* parameter to request additional permissions outside of the "basic" permissions scope. [Learn more about scope](http://instagram.com/developer/authentication/#scope).
117
+
118
+ *Note*: You may provide an optional *state* parameter to carry through any server-specific state you need to, for example, protect against CSRF issues.
119
+
120
+ At this point, we present the user with a login screen and then a confirmation screen where they approve your app's access to his/her Instagram data.
121
+
122
+ ### Step Two: Receive the redirect from Instagram
123
+
124
+ Once a user successfully authenticates and authorizes your application, we will redirect the user to your redirect_uri with a code parameter that you'll use in step three.
125
+
126
+ ```
127
+ http://your-redirect-uri?code=CODE
128
+ ```
129
+
130
+ Note that your redirect URI's host and path MUST match exactly (including trailing slashes) to your registered redirect_uri. You may also include additional query parameters in the supplied redirect_uri, if you need to vary your behavior dynamically. Examples:
131
+
132
+ |REGISTERED REDIRECT URI |REDIRECT URI SENT TO /AUTHORIZE |VALID?|
133
+ |----------------------------------|-----------------------------------------------|------|
134
+ |http://yourcallback.com/ |http://yourcallback.com/ |yes |
135
+ |http://yourcallback.com/ |http://yourcallback.com/?this=that |yes |
136
+ |http://yourcallback.com/?this=that|http://yourcallback.com/ |no |
137
+ |http://yourcallback.com/?this=that|http://yourcallback.com/?this=that&another=true|yes |
138
+ |http://yourcallback.com/?this=that|http://yourcallback.com/?another=true&this=that|no |
139
+ |http://yourcallback.com/callback |http://yourcallback.com/ |no |
140
+ |http://yourcallback.com/callback |http://yourcallback.com/callback/?type=mobile |yes |
141
+
142
+ If your request for approval is denied by the user, then we will redirect the user to your *redirect_uri* with the following parameters:
143
+
144
+ * *error*: access_denied
145
+
146
+ * *error_reason*: user_denied
147
+
148
+ * *error_description*: The user denied your request
149
+
150
+ ```
151
+ http://your-redirect-uri?error=access_denied&error_reason=user_denied&error_description=The+user+denied+your+request
152
+ ```
153
+
154
+ It is your responsibility to fail gracefully in this situation and display a corresponding error message to your user.
155
+
156
+ ### Step Three: Request the access_token
157
+
158
+ In the previous step, you'll have received a code which you'll have to exchange in order to receive an access_token for the user. In order to make this exchange, you simply have to POST this code, along with some app identification parameters to our access_token endpoint. Here are the required parameters:
159
+
160
+ * *client_id*: your client id
161
+ * *client_secret*: your client secret
162
+ * *grant_type*: authorization_code is currently the only supported value
163
+ redirect_uri: the redirect_uri you used in the authorization request. Note: this has to be the same value as in the authorization request.
164
+ * *code*: the exact code you received during the authorization step.
165
+
166
+ For example, you could request an access_token like so:
167
+
168
+ ```
169
+ curl \-F 'client_id=CLIENT-ID' \
170
+ -F 'client_secret=CLIENT-SECRET' \
171
+ -F 'grant_type=authorization_code' \
172
+ -F 'redirect_uri=YOUR-REDIRECT-URI' \
173
+ -F 'code=CODE' \https://api.instagram.com/oauth/access_token
174
+ ```
175
+
176
+ If successful, this call will return a neatly packaged OAuth Token that you can use to make authenticated calls to the API. We also include the user who just authenticated for your convenience:
177
+
178
+ ```json
179
+ {
180
+ "access_token": "fb2e77d.47a0479900504cb3ab4a1f626d174d2d",
181
+ "user": {
182
+ "id": "1574083",
183
+ "username": "snoopdogg",
184
+ "full_name": "Snoop Dogg",
185
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1574083_75sq_1295469061.jpg"
186
+ }
187
+ }
188
+ ```
189
+
190
+ Note that we do not include an expiry time. Our access_tokens have no explicit expiry, though your app should handle the case that either the user revokes access or we expire the token after some period of time. In this case, your response's meta will contain an "error_type=OAuthAccessTokenError". In other words: do do not assume your access_token is valid forever.
191
+
192
+ ##Client-Side (Implicit) Authentication
193
+
194
+ If you're building an app that does not have a server component (a purely javascript app, for instance), you'll notice that it's impossible to complete step three above to receive your access_token without also having to ship your client secret. You should never ship your client secret onto devices you don't control. Then how do you get an access_token? Well the smart folks in charge of the OAuth 2.0 spec anticipated this problem and created the Implicit Authentication Flow.
195
+
196
+ ### Step One: Direct your user to our authorization URL
197
+
198
+ ```
199
+ https://instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=token
200
+ ```
201
+
202
+ At this point, we present the user with a login screen and then a confirmation screen where they approve your app's access to their Instagram data. Note that unlike the explicit flow the response type here is "token".
203
+
204
+ ### Step Two: Receive the access_token via the URL fragment
205
+
206
+ Once the user has authenticated and then authorized your application, we'll redirect them to your redirect_uri with the access_token in the url fragment. It'll look like so:
207
+
208
+ ```
209
+ http://your-redirect-uri#access_token=ACCESS-TOKEN
210
+ ```
211
+
212
+ Simply grab the access_token off the URL fragment and you're good to go. If the user chooses not to authorize your application, you'll receive the same error response as in the explicit flow
213
+
214
+ ## Scope (Permissions)
215
+
216
+ The OAuth 2.0 spec allows you to specify the scope of the access you're requesting from the user. Currently, all apps have basic read access by default. If all you want to do is access data then you do not need to specify a scope (the "basic" scope will be granted automatically).
217
+
218
+ However, if you plan on asking for extended access such as liking, commenting, or managing friendships, you'll have to specify these scopes in your authorization request. Here are the scopes we currently support:
219
+
220
+ * basic - to read any and all data related to a user (e.g. following/followed-by lists, photos, etc.) (granted by default)
221
+ * comments - to create or delete comments on a user's behalf
222
+ * relationships - to follow and unfollow users on a user's behalf
223
+ * likes - to like and unlike items on a user's behalf
224
+
225
+ You should only request the scope you need at the time of authorization. If in the future you require additional scope, you may forward the user to the authorization URL with that additional scope to be granted. If you attempt to perform a request with an access token that isn't authorized for that scope, you will receive an OAuthPermissionsException error return.
226
+
227
+ If you'd like to request multiple scopes at once, simply separate the scopes by a space. In the url, this equates to an escaped space ("+"). So if you're requesting the likes and comments permission, the parameter will look like this:
228
+
229
+ ```
230
+ scope=likes+comments
231
+ ```
232
+
233
+ Note that an empty scope parameter (scope=) is invalid; you must either omit the scope, or specify a non-empty scope list.
234
+ # Media
235
+ /media:
236
+ /{mediaId}:
237
+ uriParameters:
238
+ mediaId:
239
+ type: integer
240
+ type: base
241
+ get:
242
+ # TODO can be different outcomes, so need to define a couple of examples and
243
+ # a couple of schemas instead of given one for 'image'.
244
+ description: |
245
+ Get information about a media object. The returned type key will allow you
246
+ to differentiate between image and video media.
247
+ Note: if you authenticate with an OAuth Token, you will receive the
248
+ user_has_liked key which quickly tells you whether the current user has liked
249
+ this media item.
250
+ responses:
251
+ 200:
252
+ body:
253
+ schema: |
254
+ {
255
+ "": "http://json-schema.org/draft-03/schema",
256
+ "type": "object",
257
+ "properties": {
258
+ "data": {
259
+ "type": "array",
260
+ "users_in_photo": [
261
+ {
262
+ "properties": {
263
+ "user": {
264
+ "properties": {
265
+ "username": {
266
+ "type": "string"
267
+ },
268
+ "full_name": {
269
+ "type": "string"
270
+ },
271
+ "id": {
272
+ "type": "string"
273
+ },
274
+ "profile_picture": {
275
+ "type": "string"
276
+ }
277
+ },
278
+ "type": "object"
279
+ },
280
+ "position": {
281
+ "properties": {
282
+ "x": {
283
+ "type": "number"
284
+ },
285
+ "y": {
286
+ "type": "number"
287
+ }
288
+ },
289
+ "type": "object"
290
+ }
291
+ },
292
+ "type": "object"
293
+ }
294
+ ],
295
+ "filter": {
296
+ "type": "string"
297
+ },
298
+ "tags": [
299
+ {
300
+ "type": "string"
301
+ }
302
+ ],
303
+ "comments": {
304
+ "properties": {
305
+ "data": [
306
+ {
307
+ "properties": {
308
+ "created_time": {
309
+ "type": "string"
310
+ },
311
+ "text": {
312
+ "type": "string"
313
+ },
314
+ "from": {
315
+ "properties": {
316
+ "username": {
317
+ "type": "string"
318
+ },
319
+ "full_name": {
320
+ "type": "string"
321
+ },
322
+ "id": {
323
+ "type": "string"
324
+ },
325
+ "profile_picture": {
326
+ "type": "string"
327
+ }
328
+ },
329
+ "type": "object"
330
+ },
331
+ "id": {
332
+ "type": "string"
333
+ }
334
+ },
335
+ "type": "object"
336
+ }
337
+ ],
338
+ "type": "array",
339
+ "count": {
340
+ "type": "integer"
341
+ }
342
+ },
343
+ "type": "object"
344
+ },
345
+ "caption": {
346
+ "type": "string"
347
+ },
348
+ "likes": {
349
+ "properties": {
350
+ "count": {
351
+ "type": "integer"
352
+ },
353
+ "data": [
354
+ {
355
+ "properties": {
356
+ "username": {
357
+ "type": "string"
358
+ },
359
+ "full_name": {
360
+ "type": "string"
361
+ },
362
+ "id": {
363
+ "type": "string"
364
+ },
365
+ "profile_picture": {
366
+ "type": "string"
367
+ }
368
+ },
369
+ "type": "object"
370
+ }
371
+ ],
372
+ "type": "array"
373
+ },
374
+ "type": "object"
375
+ },
376
+ "link": {
377
+ "type": "string"
378
+ },
379
+ "user": {
380
+ "properties": {
381
+ "username": {
382
+ "type": "string"
383
+ },
384
+ "full_name": {
385
+ "type": "string"
386
+ },
387
+ "profile_picture": {
388
+ "type": "string"
389
+ },
390
+ "bio": {
391
+ "type": "string"
392
+ },
393
+ "website": {
394
+ "type": "string"
395
+ },
396
+ "id": {
397
+ "type": "string"
398
+ }
399
+ },
400
+ "type": "object"
401
+ },
402
+ "created_time": {
403
+ "type": "string"
404
+ },
405
+ "images": {
406
+ "properties": {
407
+ "low_resolution": {
408
+ "properties": {
409
+ "url": {
410
+ "type": "string"
411
+ },
412
+ "width": {
413
+ "type": "integer"
414
+ },
415
+ "height": {
416
+ "type": "integer"
417
+ }
418
+ },
419
+ "type": "object"
420
+ },
421
+ "thumbnail": {
422
+ "properties": {
423
+ "url": {
424
+ "type": "string"
425
+ },
426
+ "width": {
427
+ "type": "integer"
428
+ },
429
+ "height": {
430
+ "type": "integer"
431
+ }
432
+ },
433
+ "type": "object"
434
+ },
435
+ "standard_resolution": {
436
+ "properties": {
437
+ "url": {
438
+ "type": "string"
439
+ },
440
+ "width": {
441
+ "type": "integer"
442
+ },
443
+ "height": {
444
+ "type": "integer"
445
+ }
446
+ },
447
+ "type": "object"
448
+ }
449
+ },
450
+ "type": "object"
451
+ },
452
+ "id": {
453
+ "type": "string"
454
+ },
455
+ "location": {
456
+ "type": "string"
457
+ }
458
+ }
459
+ }
460
+ }
461
+ example: |
462
+ {
463
+ "data": {
464
+ "type": "image",
465
+ "users_in_photo": [{
466
+ "user": {
467
+ "username": "kevin",
468
+ "full_name": "Kevin S",
469
+ "id": "3",
470
+ "profile_picture": "..."
471
+ },
472
+ "position": {
473
+ "x": 0.315,
474
+ "y": 0.9111
475
+ }
476
+ }],
477
+ "filter": "Walden",
478
+ "tags": [],
479
+ "comments": {
480
+ "data": [{
481
+ "created_time": "1279332030",
482
+ "text": "Love the sign here",
483
+ "from": {
484
+ "username": "mikeyk",
485
+ "full_name": "Mikey Krieger",
486
+ "id": "4",
487
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg"
488
+ },
489
+ "id": "8"
490
+ }],
491
+ "count": 2
492
+ },
493
+ "caption": null,
494
+ "likes": {
495
+ "count": 1,
496
+ "data": [{
497
+ "username": "mikeyk",
498
+ "full_name": "Mikeyk",
499
+ "id": "4",
500
+ "profile_picture": "..."
501
+ }]
502
+ },
503
+ "link": "http://instagr.am/p/D/",
504
+ "user": {
505
+ "username": "kevin",
506
+ "full_name": "Kevin S",
507
+ "profile_picture": "...",
508
+ "bio": "...",
509
+ "website": "...",
510
+ "id": "3"
511
+ },
512
+ "created_time": "1279340983",
513
+ "images": {
514
+ "low_resolution": {
515
+ "url": "http://distillery.s3.amazonaws.com/media/2010/07/16/4de37e03aa4b4372843a7eb33fa41cad_6.jpg",
516
+ "width": 306,
517
+ "height": 306
518
+ },
519
+ "thumbnail": {
520
+ "url": "http://distillery.s3.amazonaws.com/media/2010/07/16/4de37e03aa4b4372843a7eb33fa41cad_5.jpg",
521
+ "width": 150,
522
+ "height": 150
523
+ },
524
+ "standard_resolution": {
525
+ "url": "http://distillery.s3.amazonaws.com/media/2010/07/16/4de37e03aa4b4372843a7eb33fa41cad_7.jpg",
526
+ "width": 612,
527
+ "height": 612
528
+ }
529
+ },
530
+ "id": "3",
531
+ "location": null
532
+ }
533
+ }
534
+ /comments:
535
+ securedBy: [ oauth_2_0: { scopes: [ comments ] } ]
536
+ type: base
537
+ get:
538
+ description: Get a full list of comments on a media.
539
+ responses:
540
+ 200:
541
+ body:
542
+ schema: |
543
+ {
544
+ "": "http://json-schema.org/draft-03/schema",
545
+ "type": "object",
546
+ "properties": {
547
+ "meta": {
548
+ "properties": {
549
+ "code": {
550
+ "type": "integer"
551
+ }
552
+ },
553
+ "type": "object"
554
+ },
555
+ "data": [
556
+ {
557
+ "properties": {
558
+ "created_time": {
559
+ "type": "string"
560
+ },
561
+ "text": {
562
+ "type": "string"
563
+ },
564
+ "from": {
565
+ "properties": {
566
+ "username": {
567
+ "type": "string"
568
+ },
569
+ "profile_picture": {
570
+ "type": "string"
571
+ },
572
+ "id": {
573
+ "type": "string"
574
+ },
575
+ "full_name": {
576
+ "type": "string"
577
+ }
578
+ },
579
+ "type": "object"
580
+ },
581
+ "id": {
582
+ "type": "string"
583
+ }
584
+ },
585
+ "type": "object"
586
+ }
587
+ ],
588
+ "type": "array"
589
+ }
590
+ }
591
+ example: |
592
+ {
593
+ "meta": {
594
+ "code": 200
595
+ },
596
+ "data": [
597
+ {
598
+ "created_time": "1280780324",
599
+ "text": "Really amazing photo!",
600
+ "from": {
601
+ "username": "snoopdogg",
602
+ "profile_picture": "http://images.instagram.com/profiles/profile_16_75sq_1305612434.jpg",
603
+ "id": "1574083",
604
+ "full_name": "Snoop Dogg"
605
+ },
606
+ "id": "420"
607
+ },
608
+ ...
609
+ ]
610
+ }
611
+ post:
612
+ description: Create a comment on a media. Please email apidevelopers[at]instagram.com for access.
613
+ body:
614
+ application/x-www-form-urlencoded:
615
+ formParameters:
616
+ text:
617
+ description: Text to post as a comment on the media as specified in {mediaId}.
618
+ type: string
619
+ required: true
620
+ responses:
621
+ 200:
622
+ body:
623
+ schema: |
624
+ {
625
+ "": "http://json-schema.org/draft-03/schema",
626
+ "type": "object",
627
+ "properties": {
628
+ "meta": {
629
+ "properties": {
630
+ "code": {
631
+ "type": "integer"
632
+ }
633
+ },
634
+ "type": "object"
635
+ },
636
+ "data": [
637
+ {
638
+ "properties": {
639
+ "created_time": {
640
+ "type": "string"
641
+ },
642
+ "text": {
643
+ "type": "string"
644
+ },
645
+ "from": {
646
+ "properties": {
647
+ "username": {
648
+ "type": "string"
649
+ },
650
+ "profile_picture": {
651
+ "type": "string"
652
+ },
653
+ "id": {
654
+ "type": "string"
655
+ },
656
+ "full_name": {
657
+ "type": "string"
658
+ }
659
+ },
660
+ "type": "object"
661
+ },
662
+ "id": {
663
+ "type": "string"
664
+ }
665
+ },
666
+ "type": "object"
667
+ }
668
+ ],
669
+ "type": "array"
670
+ }
671
+ }
672
+ example: |
673
+ {
674
+ "meta": {
675
+ "code": 200
676
+ },
677
+ "data": [
678
+ {
679
+ "created_time": "1280780324",
680
+ "text": "Really amazing photo!",
681
+ "from": {
682
+ "username": "snoopdogg",
683
+ "profile_picture": "http://images.instagram.com/profiles/profile_16_75sq_1305612434.jpg",
684
+ "id": "1574083",
685
+ "full_name": "Snoop Dogg"
686
+ },
687
+ "id": "420"
688
+ },
689
+ ...
690
+ ]
691
+ }
692
+ /{commentId}:
693
+ type: base
694
+ uriParameters:
695
+ commentId:
696
+ type: integer
697
+ description: Idenifier of the comment
698
+ delete:
699
+ description: |
700
+ Remove a comment either on the authenticated user's media or authored by the authenticated user.
701
+ responses:
702
+ 200:
703
+ description: Comment removed.
704
+ /likes:
705
+ securedBy: [ oauth_2_0: { scopes: [ likes ] } ]
706
+ type: base
707
+ get:
708
+ description: |
709
+ Get a list of users who have liked this media.
710
+ Required scope: likes.
711
+ responses:
712
+ 200:
713
+ body:
714
+ schema: |
715
+ {
716
+ "": "http://json-schema.org/draft-03/schema",
717
+ "type": "object",
718
+ "properties": {
719
+ "data": [
720
+ {
721
+ "properties": {
722
+ "username": {
723
+ "type": "string"
724
+ },
725
+ "first_name": {
726
+ "type": "string"
727
+ },
728
+ "last_name": {
729
+ "type": "string"
730
+ },
731
+ "type": {
732
+ "type": "string"
733
+ },
734
+ "id": {
735
+ "type": "string"
736
+ }
737
+ },
738
+ "type": "object"
739
+ }
740
+ ],
741
+ "type": "array"
742
+ }
743
+ }
744
+ example: |
745
+ {
746
+ "data": [{
747
+ "username": "jack",
748
+ "first_name": "Jack",
749
+ "last_name": "Dorsey",
750
+ "type": "user",
751
+ "id": "66"
752
+ },
753
+ {
754
+ "username": "sammyjack",
755
+ "first_name": "Sammy",
756
+ "last_name": "Jack",
757
+ "type": "user",
758
+ "id": "29648"
759
+ }]
760
+ }
761
+ post:
762
+ description: Set a like on this media by the currently authenticated user.
763
+ responses:
764
+ 201:
765
+ description: |
766
+ Successfully liked a media object
767
+ delete:
768
+ description: Remove a like on this media by the currently authenticated user.
769
+ responses:
770
+ 204:
771
+ description: |
772
+ Like removed succesfully
773
+ /search:
774
+ type: base
775
+ get:
776
+ is: [ limitableByTime ]
777
+ description: |
778
+ Search for media in a given area. The default time span is set to 5 days.
779
+ The time span must not exceed 7 days. Defaults time stamps cover the
780
+ last 5 days.
781
+ # TODO oneOf
782
+ queryParameters:
783
+ lat:
784
+ description: Latitude of the center search coordinate. If used, lng is required.
785
+ type: number
786
+ lng:
787
+ description: Longitude of the center search coordinate. If used, lat is required.
788
+ type: number
789
+ distance:
790
+ description: Default is 1km (distance=1000), max distance is 5km.
791
+ responses:
792
+ 200:
793
+ body:
794
+ schema: |
795
+ {
796
+ "": "http://json-schema.org/draft-03/schema",
797
+ "type": "object",
798
+ "properties": {
799
+ "data": [
800
+ {
801
+ "oneOf": [
802
+ {
803
+ "properties": {
804
+ "distance": {
805
+ "type": "number"
806
+ },
807
+ "type": "array",
808
+ "users_in_photo": [
809
+ {
810
+ "type": "string"
811
+ }
812
+ ],
813
+ "filter": {
814
+ "type": "string"
815
+ },
816
+ "tags": [
817
+ {
818
+ "type": "string"
819
+ }
820
+ ],
821
+ "comments": {
822
+ "properties": {
823
+ "data": [
824
+ {
825
+ "properties": {
826
+ "created_time": {
827
+ "type": "string"
828
+ },
829
+ "text": {
830
+ "type": "string"
831
+ },
832
+ "from": {
833
+ "properties": {
834
+ "username": {
835
+ "type": "string"
836
+ },
837
+ "full_name": {
838
+ "type": "string"
839
+ },
840
+ "id": {
841
+ "type": "string"
842
+ },
843
+ "profile_picture": {
844
+ "type": "string"
845
+ }
846
+ },
847
+ "type": "object"
848
+ },
849
+ "id": {
850
+ "type": "string"
851
+ }
852
+ },
853
+ "type": "object"
854
+ }
855
+ ],
856
+ "type": "array",
857
+ "count": {
858
+ "type": "integer"
859
+ }
860
+ },
861
+ "type": "object"
862
+ },
863
+ "caption": {
864
+ "type": "string"
865
+ },
866
+ "likes": {
867
+ "properties": {
868
+ "count": {
869
+ "type": "integer"
870
+ },
871
+ "data": [
872
+ {
873
+ "properties": {
874
+ "username": {
875
+ "type": "string"
876
+ },
877
+ "full_name": {
878
+ "type": "string"
879
+ },
880
+ "id": {
881
+ "type": "string"
882
+ },
883
+ "profile_picture": {
884
+ "type": "string"
885
+ }
886
+ },
887
+ "type": "object"
888
+ }
889
+ ],
890
+ "type": "array"
891
+ },
892
+ "type": "object"
893
+ },
894
+ "link": {
895
+ "type": "string"
896
+ },
897
+ "user": {
898
+ "properties": {
899
+ "username": {
900
+ "type": "string"
901
+ },
902
+ "profile_picture": {
903
+ "type": "string"
904
+ },
905
+ "id": {
906
+ "type": "string"
907
+ }
908
+ },
909
+ "type": "object"
910
+ },
911
+ "created_time": {
912
+ "type": "string"
913
+ },
914
+ "images": {
915
+ "properties": {
916
+ "low_resolution": {
917
+ "properties": {
918
+ "url": {
919
+ "type": "string"
920
+ },
921
+ "width": {
922
+ "type": "integer"
923
+ },
924
+ "height": {
925
+ "type": "integer"
926
+ }
927
+ },
928
+ "type": "object"
929
+ },
930
+ "thumbnail": {
931
+ "properties": {
932
+ "url": {
933
+ "type": "string"
934
+ },
935
+ "width": {
936
+ "type": "integer"
937
+ },
938
+ "height": {
939
+ "type": "integer"
940
+ }
941
+ },
942
+ "type": "object"
943
+ },
944
+ "standard_resolution": {
945
+ "properties": {
946
+ "url": {
947
+ "type": "string"
948
+ },
949
+ "width": {
950
+ "type": "integer"
951
+ },
952
+ "height": {
953
+ "type": "integer"
954
+ }
955
+ },
956
+ "type": "object"
957
+ }
958
+ },
959
+ "type": "object"
960
+ },
961
+ "id": {
962
+ "type": "string"
963
+ },
964
+ "location": {
965
+ "type": "string"
966
+ }
967
+ },
968
+ "type": "object"
969
+ },
970
+ {
971
+ "properties": {
972
+ "distance": {
973
+ "type": "number"
974
+ },
975
+ "type": "object",
976
+ "videos": {
977
+ "low_resolution": {
978
+ "properties": {
979
+ "url": {
980
+ "type": "string"
981
+ },
982
+ "width": {
983
+ "type": "integer"
984
+ },
985
+ "height": {
986
+ "type": "integer"
987
+ }
988
+ },
989
+ "type": "object"
990
+ },
991
+ "standard_resolution": {
992
+ "properties": {
993
+ "url": {
994
+ "type": "string"
995
+ },
996
+ "width": {
997
+ "type": "integer"
998
+ },
999
+ "height": {
1000
+ "type": "integer"
1001
+ }
1002
+ },
1003
+ "type": "object"
1004
+ },
1005
+ "users_in_photo": {
1006
+ "type": "string"
1007
+ },
1008
+ "filter": {
1009
+ "type": "string"
1010
+ },
1011
+ "tags": [
1012
+ {
1013
+ "type": "string"
1014
+ }
1015
+ ],
1016
+ "type": "array",
1017
+ "comments": {
1018
+ "data": [
1019
+ {
1020
+ "properties": {
1021
+ "created_time": {
1022
+ "type": "string"
1023
+ },
1024
+ "text": {
1025
+ "type": "string"
1026
+ },
1027
+ "from": {
1028
+ "properties": {
1029
+ "username": {
1030
+ "type": "string"
1031
+ },
1032
+ "full_name": {
1033
+ "type": "string"
1034
+ },
1035
+ "id": {
1036
+ "type": "string"
1037
+ },
1038
+ "profile_picture": {
1039
+ "type": "string"
1040
+ }
1041
+ },
1042
+ "type": "object"
1043
+ },
1044
+ "id": {
1045
+ "type": "string"
1046
+ }
1047
+ },
1048
+ "type": "object"
1049
+ }
1050
+ ],
1051
+ "count": {
1052
+ "type": "integer"
1053
+ }
1054
+ },
1055
+ "caption": {
1056
+ "type": "string"
1057
+ },
1058
+ "likes": {
1059
+ "properties": {
1060
+ "count": {
1061
+ "type": "integer"
1062
+ },
1063
+ "data": [
1064
+ {
1065
+ "properties": {
1066
+ "username": {
1067
+ "type": "string"
1068
+ },
1069
+ "full_name": {
1070
+ "type": "string"
1071
+ },
1072
+ "id": {
1073
+ "type": "string"
1074
+ },
1075
+ "profile_picture": {
1076
+ "type": "string"
1077
+ }
1078
+ },
1079
+ "type": "object"
1080
+ }
1081
+ ],
1082
+ "type": "array"
1083
+ },
1084
+ "type": "object"
1085
+ },
1086
+ "link": {
1087
+ "type": "string"
1088
+ },
1089
+ "user": {
1090
+ "properties": {
1091
+ "username": {
1092
+ "type": "string"
1093
+ },
1094
+ "full_name": {
1095
+ "type": "string"
1096
+ },
1097
+ "profile_picture": {
1098
+ "type": "string"
1099
+ },
1100
+ "bio": {
1101
+ "type": "string"
1102
+ },
1103
+ "website": {
1104
+ "type": "string"
1105
+ },
1106
+ "id": {
1107
+ "type": "string"
1108
+ }
1109
+ },
1110
+ "type": "object"
1111
+ },
1112
+ "created_time": {
1113
+ "type": "string"
1114
+ },
1115
+ "images": {
1116
+ "properties": {
1117
+ "low_resolution": {
1118
+ "properties": {
1119
+ "url": {
1120
+ "type": "string"
1121
+ },
1122
+ "width": {
1123
+ "type": "integer"
1124
+ },
1125
+ "height": {
1126
+ "type": "integer"
1127
+ }
1128
+ },
1129
+ "type": "object"
1130
+ },
1131
+ "thumbnail": {
1132
+ "properties": {
1133
+ "url": {
1134
+ "type": "string"
1135
+ },
1136
+ "width": {
1137
+ "type": "integer"
1138
+ },
1139
+ "height": {
1140
+ "type": "integer"
1141
+ }
1142
+ },
1143
+ "type": "object"
1144
+ },
1145
+ "standard_resolution": {
1146
+ "properties": {
1147
+ "url": {
1148
+ "type": "string"
1149
+ },
1150
+ "width": {
1151
+ "type": "integer"
1152
+ },
1153
+ "height": {
1154
+ "type": "integer"
1155
+ }
1156
+ },
1157
+ "type": "object"
1158
+ }
1159
+ },
1160
+ "type": "object"
1161
+ },
1162
+ "id": {
1163
+ "type": "string"
1164
+ },
1165
+ "location": {
1166
+ "type": "string"
1167
+ }
1168
+ }
1169
+ }
1170
+ }
1171
+ ]
1172
+ }
1173
+ ],
1174
+ "type": "array"
1175
+ }
1176
+ }
1177
+ example: |
1178
+ {
1179
+ "meta": {
1180
+ "code": 200
1181
+ },
1182
+ "data": [{
1183
+ "distance": 41.741369194629698,
1184
+ "type": "image",
1185
+ "users_in_photo": [],
1186
+ "filter": "Earlybird",
1187
+ "tags": [],
1188
+ "comments": { ... },
1189
+ "caption": null,
1190
+ "likes": { ... },
1191
+ "link": "http://instagr.am/p/BQEEq/",
1192
+ "user": {
1193
+ "username": "mahaface",
1194
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1329896_75sq_1294131373.jpg",
1195
+ "id": "1329896"
1196
+ },
1197
+ "created_time": "1296251679",
1198
+ "images": {
1199
+ "low_resolution": {
1200
+ "url": "http://distillery.s3.amazonaws.com/media/2011/01/28/0cc4f24f25654b1c8d655835c58b850a_6.jpg",
1201
+ "width": 306,
1202
+ "height": 306
1203
+ },
1204
+ "thumbnail": {
1205
+ "url": "http://distillery.s3.amazonaws.com/media/2011/01/28/0cc4f24f25654b1c8d655835c58b850a_5.jpg",
1206
+ "width": 150,
1207
+ "height": 150
1208
+ },
1209
+ "standard_resolution": {
1210
+ "url": "http://distillery.s3.amazonaws.com/media/2011/01/28/0cc4f24f25654b1c8d655835c58b850a_7.jpg",
1211
+ "width": 612,
1212
+ "height": 612
1213
+ }
1214
+ },
1215
+ "id": "20988202",
1216
+ "location": null
1217
+ },
1218
+ ...
1219
+ ]
1220
+ }
1221
+ /popular:
1222
+ type: base
1223
+ get:
1224
+ description: |
1225
+ Get a list of what media is most popular at the moment.
1226
+ responses:
1227
+ 200:
1228
+ body:
1229
+ schema: |
1230
+ {
1231
+ "": "http://json-schema.org/draft-03/schema",
1232
+ "type": "object",
1233
+ "properties": {
1234
+ "data": [
1235
+ {
1236
+ "oneOf": [
1237
+ {
1238
+ "properties": {
1239
+ "distance": {
1240
+ "type": "number"
1241
+ },
1242
+ "type": "array",
1243
+ "users_in_photo": [
1244
+ {
1245
+ "type": "string"
1246
+ }
1247
+ ],
1248
+ "filter": {
1249
+ "type": "string"
1250
+ },
1251
+ "tags": [
1252
+ {
1253
+ "type": "string"
1254
+ }
1255
+ ],
1256
+ "comments": {
1257
+ "properties": {
1258
+ "data": [
1259
+ {
1260
+ "properties": {
1261
+ "created_time": {
1262
+ "type": "string"
1263
+ },
1264
+ "text": {
1265
+ "type": "string"
1266
+ },
1267
+ "from": {
1268
+ "properties": {
1269
+ "username": {
1270
+ "type": "string"
1271
+ },
1272
+ "full_name": {
1273
+ "type": "string"
1274
+ },
1275
+ "id": {
1276
+ "type": "string"
1277
+ },
1278
+ "profile_picture": {
1279
+ "type": "string"
1280
+ }
1281
+ },
1282
+ "type": "object"
1283
+ },
1284
+ "id": {
1285
+ "type": "string"
1286
+ }
1287
+ },
1288
+ "type": "object"
1289
+ }
1290
+ ],
1291
+ "type": "array",
1292
+ "count": {
1293
+ "type": "integer"
1294
+ }
1295
+ },
1296
+ "type": "object"
1297
+ },
1298
+ "caption": {
1299
+ "type": "string"
1300
+ },
1301
+ "likes": {
1302
+ "properties": {
1303
+ "count": {
1304
+ "type": "integer"
1305
+ },
1306
+ "data": [
1307
+ {
1308
+ "properties": {
1309
+ "username": {
1310
+ "type": "string"
1311
+ },
1312
+ "full_name": {
1313
+ "type": "string"
1314
+ },
1315
+ "id": {
1316
+ "type": "string"
1317
+ },
1318
+ "profile_picture": {
1319
+ "type": "string"
1320
+ }
1321
+ },
1322
+ "type": "object"
1323
+ }
1324
+ ],
1325
+ "type": "array"
1326
+ },
1327
+ "type": "object"
1328
+ },
1329
+ "link": {
1330
+ "type": "string"
1331
+ },
1332
+ "user": {
1333
+ "properties": {
1334
+ "username": {
1335
+ "type": "string"
1336
+ },
1337
+ "profile_picture": {
1338
+ "type": "string"
1339
+ },
1340
+ "id": {
1341
+ "type": "string"
1342
+ }
1343
+ },
1344
+ "type": "object"
1345
+ },
1346
+ "created_time": {
1347
+ "type": "string"
1348
+ },
1349
+ "images": {
1350
+ "properties": {
1351
+ "low_resolution": {
1352
+ "properties": {
1353
+ "url": {
1354
+ "type": "string"
1355
+ },
1356
+ "width": {
1357
+ "type": "integer"
1358
+ },
1359
+ "height": {
1360
+ "type": "integer"
1361
+ }
1362
+ },
1363
+ "type": "object"
1364
+ },
1365
+ "thumbnail": {
1366
+ "properties": {
1367
+ "url": {
1368
+ "type": "string"
1369
+ },
1370
+ "width": {
1371
+ "type": "integer"
1372
+ },
1373
+ "height": {
1374
+ "type": "integer"
1375
+ }
1376
+ },
1377
+ "type": "object"
1378
+ },
1379
+ "standard_resolution": {
1380
+ "properties": {
1381
+ "url": {
1382
+ "type": "string"
1383
+ },
1384
+ "width": {
1385
+ "type": "integer"
1386
+ },
1387
+ "height": {
1388
+ "type": "integer"
1389
+ }
1390
+ },
1391
+ "type": "object"
1392
+ }
1393
+ },
1394
+ "type": "object"
1395
+ },
1396
+ "id": {
1397
+ "type": "string"
1398
+ },
1399
+ "location": {
1400
+ "type": "string"
1401
+ }
1402
+ },
1403
+ "type": "object"
1404
+ },
1405
+ {
1406
+ "properties": {
1407
+ "distance": {
1408
+ "type": "number"
1409
+ },
1410
+ "type": "object",
1411
+ "videos": {
1412
+ "low_resolution": {
1413
+ "properties": {
1414
+ "url": {
1415
+ "type": "string"
1416
+ },
1417
+ "width": {
1418
+ "type": "integer"
1419
+ },
1420
+ "height": {
1421
+ "type": "integer"
1422
+ }
1423
+ },
1424
+ "type": "object"
1425
+ },
1426
+ "standard_resolution": {
1427
+ "properties": {
1428
+ "url": {
1429
+ "type": "string"
1430
+ },
1431
+ "width": {
1432
+ "type": "integer"
1433
+ },
1434
+ "height": {
1435
+ "type": "integer"
1436
+ }
1437
+ },
1438
+ "type": "object"
1439
+ },
1440
+ "users_in_photo": {
1441
+ "type": "string"
1442
+ },
1443
+ "filter": {
1444
+ "type": "string"
1445
+ },
1446
+ "tags": [
1447
+ {
1448
+ "type": "string"
1449
+ }
1450
+ ],
1451
+ "type": "array",
1452
+ "comments": {
1453
+ "data": [
1454
+ {
1455
+ "properties": {
1456
+ "created_time": {
1457
+ "type": "string"
1458
+ },
1459
+ "text": {
1460
+ "type": "string"
1461
+ },
1462
+ "from": {
1463
+ "properties": {
1464
+ "username": {
1465
+ "type": "string"
1466
+ },
1467
+ "full_name": {
1468
+ "type": "string"
1469
+ },
1470
+ "id": {
1471
+ "type": "string"
1472
+ },
1473
+ "profile_picture": {
1474
+ "type": "string"
1475
+ }
1476
+ },
1477
+ "type": "object"
1478
+ },
1479
+ "id": {
1480
+ "type": "string"
1481
+ }
1482
+ },
1483
+ "type": "object"
1484
+ }
1485
+ ],
1486
+ "count": {
1487
+ "type": "integer"
1488
+ }
1489
+ },
1490
+ "caption": {
1491
+ "type": "string"
1492
+ },
1493
+ "likes": {
1494
+ "properties": {
1495
+ "count": {
1496
+ "type": "integer"
1497
+ },
1498
+ "data": [
1499
+ {
1500
+ "properties": {
1501
+ "username": {
1502
+ "type": "string"
1503
+ },
1504
+ "full_name": {
1505
+ "type": "string"
1506
+ },
1507
+ "id": {
1508
+ "type": "string"
1509
+ },
1510
+ "profile_picture": {
1511
+ "type": "string"
1512
+ }
1513
+ },
1514
+ "type": "object"
1515
+ }
1516
+ ],
1517
+ "type": "array"
1518
+ },
1519
+ "type": "object"
1520
+ },
1521
+ "link": {
1522
+ "type": "string"
1523
+ },
1524
+ "user": {
1525
+ "properties": {
1526
+ "username": {
1527
+ "type": "string"
1528
+ },
1529
+ "full_name": {
1530
+ "type": "string"
1531
+ },
1532
+ "profile_picture": {
1533
+ "type": "string"
1534
+ },
1535
+ "bio": {
1536
+ "type": "string"
1537
+ },
1538
+ "website": {
1539
+ "type": "string"
1540
+ },
1541
+ "id": {
1542
+ "type": "string"
1543
+ }
1544
+ },
1545
+ "type": "object"
1546
+ },
1547
+ "created_time": {
1548
+ "type": "string"
1549
+ },
1550
+ "images": {
1551
+ "properties": {
1552
+ "low_resolution": {
1553
+ "properties": {
1554
+ "url": {
1555
+ "type": "string"
1556
+ },
1557
+ "width": {
1558
+ "type": "integer"
1559
+ },
1560
+ "height": {
1561
+ "type": "integer"
1562
+ }
1563
+ },
1564
+ "type": "object"
1565
+ },
1566
+ "thumbnail": {
1567
+ "properties": {
1568
+ "url": {
1569
+ "type": "string"
1570
+ },
1571
+ "width": {
1572
+ "type": "integer"
1573
+ },
1574
+ "height": {
1575
+ "type": "integer"
1576
+ }
1577
+ },
1578
+ "type": "object"
1579
+ },
1580
+ "standard_resolution": {
1581
+ "properties": {
1582
+ "url": {
1583
+ "type": "string"
1584
+ },
1585
+ "width": {
1586
+ "type": "integer"
1587
+ },
1588
+ "height": {
1589
+ "type": "integer"
1590
+ }
1591
+ },
1592
+ "type": "object"
1593
+ }
1594
+ },
1595
+ "type": "object"
1596
+ },
1597
+ "id": {
1598
+ "type": "string"
1599
+ },
1600
+ "location": {
1601
+ "type": "string"
1602
+ }
1603
+ }
1604
+ }
1605
+ }
1606
+ ]
1607
+ }
1608
+ ],
1609
+ "type": "array"
1610
+ }
1611
+ }
1612
+ example: |
1613
+ {
1614
+ "meta": {
1615
+ "code": 200
1616
+ },
1617
+ "data": [{
1618
+ "distance": 41.741369194629698,
1619
+ "type": "image",
1620
+ "users_in_photo": [],
1621
+ "filter": "Earlybird",
1622
+ "tags": [],
1623
+ "comments": { ... },
1624
+ "caption": null,
1625
+ "likes": { ... },
1626
+ "link": "http://instagr.am/p/BQEEq/",
1627
+ "user": {
1628
+ "username": "mahaface",
1629
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1329896_75sq_1294131373.jpg",
1630
+ "id": "1329896"
1631
+ },
1632
+ "created_time": "1296251679",
1633
+ "images": {
1634
+ "low_resolution": {
1635
+ "url": "http://distillery.s3.amazonaws.com/media/2011/01/28/0cc4f24f25654b1c8d655835c58b850a_6.jpg",
1636
+ "width": 306,
1637
+ "height": 306
1638
+ },
1639
+ "thumbnail": {
1640
+ "url": "http://distillery.s3.amazonaws.com/media/2011/01/28/0cc4f24f25654b1c8d655835c58b850a_5.jpg",
1641
+ "width": 150,
1642
+ "height": 150
1643
+ },
1644
+ "standard_resolution": {
1645
+ "url": "http://distillery.s3.amazonaws.com/media/2011/01/28/0cc4f24f25654b1c8d655835c58b850a_7.jpg",
1646
+ "width": 612,
1647
+ "height": 612
1648
+ }
1649
+ },
1650
+ "id": "20988202",
1651
+ "location": null
1652
+ },
1653
+ ...
1654
+ ]
1655
+ }
1656
+ # Tags
1657
+ /tags:
1658
+ /{tagName}:
1659
+ uriParameters:
1660
+ tagName:
1661
+ description: Name of tag.
1662
+ type: string
1663
+ type: base
1664
+ get:
1665
+ description: Get information about a tag object.
1666
+ responses:
1667
+ 200:
1668
+ body:
1669
+ schema: |
1670
+ {
1671
+ "": "http://json-schema.org/draft-03/schema",
1672
+ "type": "object",
1673
+ "properties": {
1674
+ "data": {
1675
+ "properties": {
1676
+ "media_count": {
1677
+ "type": "integer"
1678
+ },
1679
+ "name": {
1680
+ "type": "string"
1681
+ }
1682
+ },
1683
+ "type": "object"
1684
+ }
1685
+ }
1686
+ }
1687
+ example: |
1688
+ {
1689
+ "data": {
1690
+ "media_count": 472,
1691
+ "name": "nofilter",
1692
+ }
1693
+ }
1694
+ /media/recent:
1695
+ type: base
1696
+ get:
1697
+ is: [ limitableById ]
1698
+ description: |
1699
+ Get a list of recently tagged media. Note that this media is ordered by when the media was tagged
1700
+ with this tag, rather than the order it was posted. Use the max_tag_id and min_tag_id parameters
1701
+ in the pagination response to paginate through these objects.
1702
+ responses:
1703
+ 200:
1704
+ body:
1705
+ schema: |
1706
+ {
1707
+ "": "http://json-schema.org/draft-03/schema",
1708
+ "type": "object",
1709
+ "properties": {
1710
+ "data": [
1711
+ {
1712
+ "properties": {
1713
+ "data": [
1714
+ {
1715
+ "type": "array",
1716
+ "users_in_photo": [
1717
+ {
1718
+ "type": "string"
1719
+ }
1720
+ ],
1721
+ "filter": {
1722
+ "type": "string"
1723
+ },
1724
+ "tags": [
1725
+ {
1726
+ "type": "string"
1727
+ }
1728
+ ],
1729
+ "comments": {
1730
+ "properties": {
1731
+ "data": [
1732
+ {
1733
+ "properties": {
1734
+ "created_time": {
1735
+ "type": "string"
1736
+ },
1737
+ "text": {
1738
+ "type": "string"
1739
+ },
1740
+ "from": {
1741
+ "properties": {
1742
+ "username": {
1743
+ "type": "string"
1744
+ },
1745
+ "id": {
1746
+ "type": "string"
1747
+ }
1748
+ },
1749
+ "type": "object"
1750
+ },
1751
+ "id": {
1752
+ "type": "string"
1753
+ }
1754
+ },
1755
+ "type": "object"
1756
+ }
1757
+ ],
1758
+ "type": "array",
1759
+ "count": {
1760
+ "type": "integer"
1761
+ }
1762
+ },
1763
+ "type": "object"
1764
+ },
1765
+ "caption": {
1766
+ "properties": {
1767
+ "created_time": {
1768
+ "type": "string"
1769
+ },
1770
+ "text": {
1771
+ "type": "string"
1772
+ },
1773
+ "from": {
1774
+ "properties": {
1775
+ "username": {
1776
+ "type": "string"
1777
+ },
1778
+ "id": {
1779
+ "type": "string"
1780
+ }
1781
+ },
1782
+ "type": "object"
1783
+ },
1784
+ "id": {
1785
+ "type": "string"
1786
+ }
1787
+ },
1788
+ "type": "object"
1789
+ },
1790
+ "likes": {
1791
+ "count": {
1792
+ "type": "integer"
1793
+ },
1794
+ "data": [
1795
+ {
1796
+ "properties": {
1797
+ "username": {
1798
+ "type": "string"
1799
+ },
1800
+ "full_name": {
1801
+ "type": "string"
1802
+ },
1803
+ "id": {
1804
+ "type": "string"
1805
+ },
1806
+ "profile_picture": {
1807
+ "type": "string"
1808
+ }
1809
+ },
1810
+ "type": "object"
1811
+ }
1812
+ ],
1813
+ "type": "array"
1814
+ },
1815
+ "link": {
1816
+ "type": "string"
1817
+ },
1818
+ "user": {
1819
+ "properties": {
1820
+ "username": {
1821
+ "type": "string"
1822
+ },
1823
+ "profile_picture": {
1824
+ "type": "string"
1825
+ },
1826
+ "id": {
1827
+ "type": "string"
1828
+ },
1829
+ "full_name": {
1830
+ "type": "string"
1831
+ }
1832
+ },
1833
+ "type": "object"
1834
+ },
1835
+ "created_time": {
1836
+ "type": "string"
1837
+ },
1838
+ "images": {
1839
+ "properties": {
1840
+ "low_resolution": {
1841
+ "properties": {
1842
+ "url": {
1843
+ "type": "string"
1844
+ },
1845
+ "width": {
1846
+ "type": "integer"
1847
+ },
1848
+ "height": {
1849
+ "type": "integer"
1850
+ }
1851
+ },
1852
+ "type": "object"
1853
+ },
1854
+ "thumbnail": {
1855
+ "properties": {
1856
+ "url": {
1857
+ "type": "string"
1858
+ },
1859
+ "width": {
1860
+ "type": "integer"
1861
+ },
1862
+ "height": {
1863
+ "type": "integer"
1864
+ }
1865
+ },
1866
+ "type": "object"
1867
+ },
1868
+ "standard_resolution": {
1869
+ "properties": {
1870
+ "url": {
1871
+ "type": "string"
1872
+ },
1873
+ "width": {
1874
+ "type": "integer"
1875
+ },
1876
+ "height": {
1877
+ "type": "integer"
1878
+ }
1879
+ },
1880
+ "type": "object"
1881
+ }
1882
+ },
1883
+ "type": "object"
1884
+ },
1885
+ "id": {
1886
+ "type": "string"
1887
+ },
1888
+ "location": {
1889
+ "type": "string"
1890
+ }
1891
+ }
1892
+ ],
1893
+ "type": "array"
1894
+ },
1895
+ "type": "object"
1896
+ }
1897
+ ],
1898
+ "type": "array"
1899
+ }
1900
+ }
1901
+ example: |
1902
+ {
1903
+ "data": [{
1904
+ "type": "image",
1905
+ "users_in_photo": [],
1906
+ "filter": "Earlybird",
1907
+ "tags": ["snow"],
1908
+ "comments": {
1909
+ "data": [{
1910
+ "created_time": "1296703540",
1911
+ "text": "Snow",
1912
+ "from": {
1913
+ "username": "emohatch",
1914
+ "username": "Dave",
1915
+ "id": "1242695"
1916
+ },
1917
+ "id": "26589964"
1918
+ },
1919
+ {
1920
+ "created_time": "1296707889",
1921
+ "text": "#snow",
1922
+ "from": {
1923
+ "username": "emohatch",
1924
+ "username": "Emo Hatch",
1925
+ "id": "1242695"
1926
+ },
1927
+ "id": "26609649"
1928
+ }],
1929
+ "count": 3
1930
+ },
1931
+ "caption": {
1932
+ "created_time": "1296703540",
1933
+ "text": "#Snow",
1934
+ "from": {
1935
+ "username": "emohatch",
1936
+ "id": "1242695"
1937
+ },
1938
+ "id": "26589964"
1939
+ },
1940
+ "likes": {
1941
+ "count": 1,
1942
+ "data": [{
1943
+ "username": "mikeyk",
1944
+ "full_name": "Mike Krieger",
1945
+ "id": "4",
1946
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg"
1947
+ }]
1948
+ },
1949
+ "link": "http://instagr.am/p/BWl6P/",
1950
+ "user": {
1951
+ "username": "emohatch",
1952
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg",
1953
+ "id": "1242695",
1954
+ "full_name": "Dave"
1955
+ },
1956
+ "created_time": "1296703536",
1957
+ "images": {
1958
+ "low_resolution": {
1959
+ "url": "http://distillery.s3.amazonaws.com/media/2011/02/02/f9443f3443484c40b4792fa7c76214d5_6.jpg",
1960
+ "width": 306,
1961
+ "height": 306
1962
+ },
1963
+ "thumbnail": {
1964
+ "url": "http://distillery.s3.amazonaws.com/media/2011/02/02/f9443f3443484c40b4792fa7c76214d5_5.jpg",
1965
+ "width": 150,
1966
+ "height": 150
1967
+ },
1968
+ "standard_resolution": {
1969
+ "url": "http://distillery.s3.amazonaws.com/media/2011/02/02/f9443f3443484c40b4792fa7c76214d5_7.jpg",
1970
+ "width": 612,
1971
+ "height": 612
1972
+ }
1973
+ },
1974
+ "id": "22699663",
1975
+ "location": null
1976
+ }
1977
+ ]
1978
+ }
1979
+ /search:
1980
+ type: base
1981
+ get:
1982
+ description: |
1983
+ Search for tags by name. Results are ordered first as an exact match, then by popularity.
1984
+ Short tags will be treated as exact matches.
1985
+ queryParameters:
1986
+ q:
1987
+ description: |
1988
+ A valid tag name without a leading #.
1989
+ type: string
1990
+ required: true
1991
+ example: nofilter
1992
+ responses:
1993
+ 200:
1994
+ body:
1995
+ schema: |
1996
+ {
1997
+ "": "http://json-schema.org/draft-03/schema",
1998
+ "type": "object",
1999
+ "properties": {
2000
+ "data": [
2001
+ {
2002
+ "properties": {
2003
+ "media_count": {
2004
+ "type": "integer"
2005
+ },
2006
+ "name": {
2007
+ "type": "string"
2008
+ }
2009
+ },
2010
+ "type": "object"
2011
+ }
2012
+ ],
2013
+ "type": "array"
2014
+ }
2015
+ }
2016
+ example: |
2017
+ {
2018
+ "data": [
2019
+ {
2020
+ "media_count": 43590,
2021
+ "name": "snowy"
2022
+ },
2023
+ {
2024
+ "media_count": 3264,
2025
+ "name": "snowyday"
2026
+ },
2027
+ {
2028
+ "media_count": 1880,
2029
+ "name": "snowymountains"
2030
+ },
2031
+ {
2032
+ "media_count": 1164,
2033
+ "name": "snowydays"
2034
+ },
2035
+ {
2036
+ "media_count": 776,
2037
+ "name": "snowyowl"
2038
+ },
2039
+ {
2040
+ "media_count": 680,
2041
+ "name": "snowynight"
2042
+ },
2043
+ {
2044
+ "media_count": 568,
2045
+ "name": "snowylebanon"
2046
+ },
2047
+ {
2048
+ "media_count": 522,
2049
+ "name": "snowymountain"
2050
+ },
2051
+ {
2052
+ "media_count": 490,
2053
+ "name": "snowytrees"
2054
+ },
2055
+ {
2056
+ "media_count": 260,
2057
+ "name": "snowynights"
2058
+ },
2059
+ {
2060
+ "media_count": 253,
2061
+ "name": "snowyegret"
2062
+ },
2063
+ {
2064
+ "media_count": 223,
2065
+ "name": "snowytree"
2066
+ },
2067
+ {
2068
+ "media_count": 214,
2069
+ "name": "snowymorning"
2070
+ },
2071
+ {
2072
+ "media_count": 212,
2073
+ "name": "snowyweather"
2074
+ },
2075
+ {
2076
+ "media_count": 161,
2077
+ "name": "snowyoursupport"
2078
+ },
2079
+ {
2080
+ "media_count": 148,
2081
+ "name": "snowyrange"
2082
+ },
2083
+ {
2084
+ "media_count": 136,
2085
+ "name": "snowynui3z"
2086
+ },
2087
+ {
2088
+ "media_count": 128,
2089
+ "name": "snowypeaks"
2090
+ },
2091
+ {
2092
+ "media_count": 124,
2093
+ "name": "snowy_dog"
2094
+ },
2095
+ {
2096
+ "media_count": 120,
2097
+ "name": "snowyroad"
2098
+ },
2099
+ {
2100
+ "media_count": 108,
2101
+ "name": "snowyoghurt"
2102
+ },
2103
+ {
2104
+ "media_count": 107,
2105
+ "name": "snowyriver"
2106
+ }
2107
+ ],
2108
+ "meta": {
2109
+ "code": 200
2110
+ }
2111
+ }
2112
+ # Users
2113
+ /users:
2114
+ /{userId}:
2115
+ uriParameters:
2116
+ userId:
2117
+ type: integer
2118
+ type: base
2119
+ get:
2120
+ description: Get basic information about a user.
2121
+ responses:
2122
+ 200:
2123
+ body:
2124
+ schema: |
2125
+ {
2126
+ "": "http://json-schema.org/draft-03/schema",
2127
+ "type": "object",
2128
+ "properties": {
2129
+ "data": {
2130
+ "properties": {
2131
+ "id": {
2132
+ "type": "string"
2133
+ },
2134
+ "username": {
2135
+ "type": "string"
2136
+ },
2137
+ "full_name": {
2138
+ "type": "string"
2139
+ },
2140
+ "profile_picture": {
2141
+ "type": "string"
2142
+ },
2143
+ "bio": {
2144
+ "type": "string"
2145
+ },
2146
+ "website": {
2147
+ "type": "string"
2148
+ },
2149
+ "counts": {
2150
+ "properties": {
2151
+ "media": {
2152
+ "type": "integer"
2153
+ },
2154
+ "follows": {
2155
+ "type": "integer"
2156
+ },
2157
+ "followed_by": {
2158
+ "type": "integer"
2159
+ }
2160
+ },
2161
+ "type": "object"
2162
+ }
2163
+ },
2164
+ "type": "object"
2165
+ }
2166
+ }
2167
+ }
2168
+ example: |
2169
+ {
2170
+ "data": {
2171
+ "id": "1574083",
2172
+ "username": "snoopdogg",
2173
+ "full_name": "Snoop Dogg",
2174
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1574083_75sq_1295469061.jpg",
2175
+ "bio": "This is my bio",
2176
+ "website": "http://snoopdogg.com",
2177
+ "counts": {
2178
+ "media": 1320,
2179
+ "follows": 420,
2180
+ "followed_by": 3410
2181
+ }
2182
+ }
2183
+ }
2184
+ # Follows
2185
+ /follows:
2186
+ securedBy: [ oauth_2_0: { scopes: [ relationships ] } ]
2187
+ type: base
2188
+ get:
2189
+ description: Get the list of users this user follows.
2190
+ responses:
2191
+ 200:
2192
+ body:
2193
+ schema: |
2194
+ {
2195
+ "": "http://json-schema.org/draft-03/schema",
2196
+ "type": "object",
2197
+ "properties": {
2198
+ "data": [
2199
+ {
2200
+ "properties": {
2201
+ "username": {
2202
+ "type": "string"
2203
+ },
2204
+ "first_name": {
2205
+ "type": "string"
2206
+ },
2207
+ "profile_picture": {
2208
+ "type": "string"
2209
+ },
2210
+ "id": {
2211
+ "type": "string"
2212
+ },
2213
+ "last_name": {
2214
+ "type": "string"
2215
+ }
2216
+ },
2217
+ "type": "object"
2218
+ }
2219
+ ],
2220
+ "type": "array"
2221
+ }
2222
+ }
2223
+ example: |
2224
+ {
2225
+ "data": [{
2226
+ "username": "jack",
2227
+ "first_name": "Jack",
2228
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_66_75sq.jpg",
2229
+ "id": "66",
2230
+ "last_name": "Dorsey"
2231
+ },
2232
+ {
2233
+ "username": "sammyjack",
2234
+ "first_name": "Sammy",
2235
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_29648_75sq_1294520029.jpg",
2236
+ "id": "29648",
2237
+ "last_name": "Jack"
2238
+ },
2239
+ {
2240
+ "username": "jacktiddy",
2241
+ "first_name": "Jack",
2242
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_13096_75sq_1286441317.jpg",
2243
+ "id": "13096",
2244
+ "last_name": "Tiddy"
2245
+ }]
2246
+ }
2247
+ # Followed by
2248
+ /followed-by:
2249
+ securedBy: [ oauth_2_0: { scopes: [ relationships ] } ]
2250
+ type: base
2251
+ get:
2252
+ description: Get the list of users this user is followed by.
2253
+ responses:
2254
+ 200:
2255
+ body:
2256
+ schema: |
2257
+ {
2258
+ "": "http://json-schema.org/draft-03/schema",
2259
+ "type": "object",
2260
+ "properties": {
2261
+ "data": [
2262
+ {
2263
+ "properties": {
2264
+ "username": {
2265
+ "type": "string"
2266
+ },
2267
+ "first_name": {
2268
+ "type": "string"
2269
+ },
2270
+ "profile_picture": {
2271
+ "type": "string"
2272
+ },
2273
+ "id": {
2274
+ "type": "string"
2275
+ },
2276
+ "last_name": {
2277
+ "type": "string"
2278
+ }
2279
+ },
2280
+ "type": "object"
2281
+ }
2282
+ ],
2283
+ "type": "array"
2284
+ }
2285
+ }
2286
+ example: |
2287
+ {
2288
+ "data": [{
2289
+ "username": "jack",
2290
+ "first_name": "Jack",
2291
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_66_75sq.jpg",
2292
+ "id": "66",
2293
+ "last_name": "Dorsey"
2294
+ },
2295
+ {
2296
+ "username": "sammyjack",
2297
+ "first_name": "Sammy",
2298
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_29648_75sq_1294520029.jpg",
2299
+ "id": "29648",
2300
+ "last_name": "Jack"
2301
+ },
2302
+ {
2303
+ "username": "jacktiddy",
2304
+ "first_name": "Jack",
2305
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_13096_75sq_1286441317.jpg",
2306
+ "id": "13096",
2307
+ "last_name": "Tiddy"
2308
+ }]
2309
+ }
2310
+ # Requested by
2311
+ /self/requested-by:
2312
+ securedBy: [ oauth_2_0: { scopes: [ relationships ] } ]
2313
+ type: base
2314
+ get:
2315
+ description: List the users who have requested this user's permission to follow.
2316
+ responses:
2317
+ 200:
2318
+ body:
2319
+ schema: |
2320
+ {
2321
+ "": "http://json-schema.org/draft-03/schema",
2322
+ "type": "object",
2323
+ "properties": {
2324
+ "meta": {
2325
+ "properties": {
2326
+ "code": {
2327
+ "type": "integer"
2328
+ }
2329
+ },
2330
+ "type": "object"
2331
+ },
2332
+ "data": [
2333
+ {
2334
+ "properties": {
2335
+ "username": {
2336
+ "type": "string"
2337
+ },
2338
+ "profile_picture": {
2339
+ "type": "string"
2340
+ },
2341
+ "id": {
2342
+ "type": "string"
2343
+ }
2344
+ },
2345
+ "type": "object"
2346
+ }
2347
+ ]
2348
+ }
2349
+ }
2350
+ example: |
2351
+ {
2352
+ "meta": {
2353
+ "code": 200
2354
+ },
2355
+ "data": [
2356
+ {
2357
+ "username": "mikeyk",
2358
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_4_75sq_1292324747_debug.jpg",
2359
+ "id": "4"
2360
+ }
2361
+ ]
2362
+ }
2363
+ /media/recent:
2364
+ type: base
2365
+ get:
2366
+ is: [ limitableById, limitableByTime ]
2367
+ description: |
2368
+ See the authenticated user's feed. May return a mix of both image and
2369
+ video types.
2370
+ responses:
2371
+ 200:
2372
+ body:
2373
+ example: |
2374
+ {
2375
+ "data": [{
2376
+ "location": {
2377
+ "id": "833",
2378
+ "latitude": 37.77956816727314,
2379
+ "longitude": -122.41387367248539,
2380
+ "name": "Civic Center BART"
2381
+ },
2382
+ "comments": {
2383
+ "count": 16,
2384
+ "data": [ ... ]
2385
+ },
2386
+ "caption": null,
2387
+ "link": "http://instagr.am/p/BXsFz/",
2388
+ "likes": {
2389
+ "count": 190,
2390
+ "data": [{
2391
+ "username": "shayne",
2392
+ "full_name": "Shayne Sweeney",
2393
+ "id": "20",
2394
+ "profile_picture": "..."
2395
+ }, {...subset of likers...}]
2396
+ },
2397
+ "created_time": "1296748524",
2398
+ "images": {
2399
+ "low_resolution": {
2400
+ "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_6.jpg",
2401
+ "width": 306,
2402
+ "height": 306
2403
+ },
2404
+ "thumbnail": {
2405
+ "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_5.jpg",
2406
+ "width": 150,
2407
+ "height": 150
2408
+ },
2409
+ "standard_resolution": {
2410
+ "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_7.jpg",
2411
+ "width": 612,
2412
+ "height": 612
2413
+ }
2414
+ },
2415
+ "type": "image",
2416
+ "users_in_photo": [],
2417
+ "filter": "Earlybird",
2418
+ "tags": [],
2419
+ "id": "22987123",
2420
+ "user": {
2421
+ "username": "kevin",
2422
+ "full_name": "Kevin S",
2423
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg",
2424
+ "id": "3"
2425
+ }
2426
+ },
2427
+ {
2428
+ "videos": {
2429
+ "low_resolution": {
2430
+ "url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_102.mp4",
2431
+ "width": 480,
2432
+ "height": 480
2433
+ },
2434
+ "standard_resolution": {
2435
+ "url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_101.mp4",
2436
+ "width": 640,
2437
+ "height": 640
2438
+ },
2439
+ "comments": {
2440
+ "data": [{
2441
+ "created_time": "1279332030",
2442
+ "text": "Love the sign here",
2443
+ "from": {
2444
+ "username": "mikeyk",
2445
+ "full_name": "Mikey Krieger",
2446
+ "id": "4",
2447
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg"
2448
+ },
2449
+ "id": "8"
2450
+ },
2451
+ {
2452
+ "created_time": "1279341004",
2453
+ "text": "Chilako taco",
2454
+ "from": {
2455
+ "username": "kevin",
2456
+ "full_name": "Kevin S",
2457
+ "id": "3",
2458
+ "profile_picture": "..."
2459
+ },
2460
+ "id": "3"
2461
+ }],
2462
+ "count": 2
2463
+ },
2464
+ "caption": null,
2465
+ "likes": {
2466
+ "count": 1,
2467
+ "data": [{
2468
+ "username": "mikeyk",
2469
+ "full_name": "Mikeyk",
2470
+ "id": "4",
2471
+ "profile_picture": "..."
2472
+ }]
2473
+ },
2474
+ "link": "http://instagr.am/p/D/",
2475
+ "created_time": "1279340983",
2476
+ "images": {
2477
+ "low_resolution": {
2478
+ "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_6.jpg",
2479
+ "width": 306,
2480
+ "height": 306
2481
+ },
2482
+ "thumbnail": {
2483
+ "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_5.jpg",
2484
+ "width": 150,
2485
+ "height": 150
2486
+ },
2487
+ "standard_resolution": {
2488
+ "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_7.jpg",
2489
+ "width": 612,
2490
+ "height": 612
2491
+ }
2492
+ },
2493
+ "type": "video",
2494
+ "users_in_photo": null,
2495
+ "filter": "Vesper",
2496
+ "tags": [],
2497
+ "id": "363839373298",
2498
+ "user": {
2499
+ "username": "kevin",
2500
+ "full_name": "Kevin S",
2501
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg",
2502
+ "id": "3"
2503
+ },
2504
+ "location": null
2505
+ },
2506
+ ...]
2507
+ }
2508
+ /relationship:
2509
+ securedBy: [ oauth_2_0: { scopes: [ relationships ] } ]
2510
+ type: base
2511
+ get:
2512
+ description: Get information about a relationship to another user.
2513
+ responses:
2514
+ 200:
2515
+ body:
2516
+ schema: |
2517
+ {
2518
+ "": "http://json-schema.org/draft-03/schema",
2519
+ "type": "object",
2520
+ "properties": {
2521
+ "meta": {
2522
+ "properties": {
2523
+ "code": {
2524
+ "type": "integer"
2525
+ }
2526
+ },
2527
+ "type": "object"
2528
+ },
2529
+ "data": {
2530
+ "properties": {
2531
+ "outgoing_status": {
2532
+ "enum": [
2533
+ "follows",
2534
+ "requested",
2535
+ "none"
2536
+ ]
2537
+ },
2538
+ "incoming_status": {
2539
+ "enum": [
2540
+ "followed_by",
2541
+ "requested_by",
2542
+ "blocked_by_you",
2543
+ "none"
2544
+ ]
2545
+ }
2546
+ },
2547
+ "type": "object"
2548
+ }
2549
+ }
2550
+ }
2551
+ example: |
2552
+ {
2553
+ "meta": {
2554
+ "code": 200
2555
+ },
2556
+ "data": {
2557
+ "outgoing_status": "none",
2558
+ "incoming_status": "requested_by"
2559
+ }
2560
+ }
2561
+ post:
2562
+ description: Modify the relationship between the current user and the target user.
2563
+ body:
2564
+ formParameters:
2565
+ action:
2566
+ description: One of follow/unfollow/block/unblock/approve/deny.
2567
+ enum:
2568
+ - follow
2569
+ - unfollow
2570
+ - block
2571
+ - unblock
2572
+ - approve
2573
+ - deny
2574
+ responses:
2575
+ 200:
2576
+ body:
2577
+ schema: |
2578
+ {
2579
+ "": "http://json-schema.org/draft-03/schema",
2580
+ "type": "object",
2581
+ "properties": {
2582
+ "meta": {
2583
+ "properties": {
2584
+ "code": {
2585
+ "type": "integer"
2586
+ }
2587
+ },
2588
+ "type": "object"
2589
+ },
2590
+ "data": {
2591
+ "properties": {
2592
+ "outgoing_status": {
2593
+ "enum": [
2594
+ "follows",
2595
+ "requested",
2596
+ "none"
2597
+ ]
2598
+ },
2599
+ "incoming_status": {
2600
+ "enum": [
2601
+ "followed_by",
2602
+ "requested_by",
2603
+ "blocked_by_you",
2604
+ "none"
2605
+ ]
2606
+ }
2607
+ },
2608
+ "type": "object"
2609
+ }
2610
+ }
2611
+ }
2612
+ example: |
2613
+ {
2614
+ "meta": {
2615
+ "code": 200
2616
+ },
2617
+ "data": {
2618
+ "outgoing_status": "none",
2619
+ "incoming_status": "requested_by"
2620
+ }
2621
+ }
2622
+ /search:
2623
+ type: base
2624
+ get:
2625
+ description: Search for a user by name.
2626
+ queryParameters:
2627
+ q:
2628
+ description: A query string.
2629
+ type: string
2630
+ required: true
2631
+ count:
2632
+ description: Number of users to return.
2633
+ type: integer
2634
+ responses:
2635
+ 200:
2636
+ body:
2637
+ schema: |
2638
+ {
2639
+ "": "http://json-schema.org/draft-03/schema",
2640
+ "type": "object",
2641
+ "properties": {
2642
+ "data": [
2643
+ {
2644
+ "properties": {
2645
+ "username": {
2646
+ "type": "string"
2647
+ },
2648
+ "first_name": {
2649
+ "type": "string"
2650
+ },
2651
+ "profile_picture": {
2652
+ "type": "string"
2653
+ },
2654
+ "id": {
2655
+ "type": "string"
2656
+ },
2657
+ "last_name": {
2658
+ "type": "string"
2659
+ }
2660
+ },
2661
+ "type": "object"
2662
+ }
2663
+ ],
2664
+ "type": "array"
2665
+ }
2666
+ }
2667
+ example: |
2668
+ {
2669
+ "data": [{
2670
+ "username": "jack",
2671
+ "first_name": "Jack",
2672
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_66_75sq.jpg",
2673
+ "id": "66",
2674
+ "last_name": "Dorsey"
2675
+ },
2676
+ {
2677
+ "username": "sammyjack",
2678
+ "first_name": "Sammy",
2679
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_29648_75sq_1294520029.jpg",
2680
+ "id": "29648",
2681
+ "last_name": "Jack"
2682
+ },
2683
+ {
2684
+ "username": "jacktiddy",
2685
+ "first_name": "Jack",
2686
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_13096_75sq_1286441317.jpg",
2687
+ "id": "13096",
2688
+ "last_name": "Tiddy"
2689
+ }]
2690
+ }
2691
+ /self:
2692
+ /feed:
2693
+ type: base
2694
+ get:
2695
+ is: [ limitableById ]
2696
+ description: |
2697
+ See the authenticated user's feed. May return a mix of both image and
2698
+ video types.
2699
+ responses:
2700
+ 200:
2701
+ body:
2702
+ example: |
2703
+ {
2704
+ "data": [{
2705
+ "location": {
2706
+ "id": "833",
2707
+ "latitude": 37.77956816727314,
2708
+ "longitude": -122.41387367248539,
2709
+ "name": "Civic Center BART"
2710
+ },
2711
+ "comments": {
2712
+ "count": 16,
2713
+ "data": [ ... ]
2714
+ },
2715
+ "caption": null,
2716
+ "link": "http://instagr.am/p/BXsFz/",
2717
+ "likes": {
2718
+ "count": 190,
2719
+ "data": [{
2720
+ "username": "shayne",
2721
+ "full_name": "Shayne Sweeney",
2722
+ "id": "20",
2723
+ "profile_picture": "..."
2724
+ }, {...subset of likers...}]
2725
+ },
2726
+ "created_time": "1296748524",
2727
+ "images": {
2728
+ "low_resolution": {
2729
+ "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_6.jpg",
2730
+ "width": 306,
2731
+ "height": 306
2732
+ },
2733
+ "thumbnail": {
2734
+ "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_5.jpg",
2735
+ "width": 150,
2736
+ "height": 150
2737
+ },
2738
+ "standard_resolution": {
2739
+ "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_7.jpg",
2740
+ "width": 612,
2741
+ "height": 612
2742
+ }
2743
+ },
2744
+ "type": "image",
2745
+ "users_in_photo": [],
2746
+ "filter": "Earlybird",
2747
+ "tags": [],
2748
+ "id": "22987123",
2749
+ "user": {
2750
+ "username": "kevin",
2751
+ "full_name": "Kevin S",
2752
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg",
2753
+ "id": "3"
2754
+ }
2755
+ },
2756
+ {
2757
+ "videos": {
2758
+ "low_resolution": {
2759
+ "url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_102.mp4",
2760
+ "width": 480,
2761
+ "height": 480
2762
+ },
2763
+ "standard_resolution": {
2764
+ "url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_101.mp4",
2765
+ "width": 640,
2766
+ "height": 640
2767
+ },
2768
+ "comments": {
2769
+ "data": [{
2770
+ "created_time": "1279332030",
2771
+ "text": "Love the sign here",
2772
+ "from": {
2773
+ "username": "mikeyk",
2774
+ "full_name": "Mikey Krieger",
2775
+ "id": "4",
2776
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg"
2777
+ },
2778
+ "id": "8"
2779
+ },
2780
+ {
2781
+ "created_time": "1279341004",
2782
+ "text": "Chilako taco",
2783
+ "from": {
2784
+ "username": "kevin",
2785
+ "full_name": "Kevin S",
2786
+ "id": "3",
2787
+ "profile_picture": "..."
2788
+ },
2789
+ "id": "3"
2790
+ }],
2791
+ "count": 2
2792
+ },
2793
+ "caption": null,
2794
+ "likes": {
2795
+ "count": 1,
2796
+ "data": [{
2797
+ "username": "mikeyk",
2798
+ "full_name": "Mikeyk",
2799
+ "id": "4",
2800
+ "profile_picture": "..."
2801
+ }]
2802
+ },
2803
+ "link": "http://instagr.am/p/D/",
2804
+ "created_time": "1279340983",
2805
+ "images": {
2806
+ "low_resolution": {
2807
+ "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_6.jpg",
2808
+ "width": 306,
2809
+ "height": 306
2810
+ },
2811
+ "thumbnail": {
2812
+ "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_5.jpg",
2813
+ "width": 150,
2814
+ "height": 150
2815
+ },
2816
+ "standard_resolution": {
2817
+ "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_7.jpg",
2818
+ "width": 612,
2819
+ "height": 612
2820
+ }
2821
+ },
2822
+ "type": "video",
2823
+ "users_in_photo": null,
2824
+ "filter": "Vesper",
2825
+ "tags": [],
2826
+ "id": "363839373298",
2827
+ "user": {
2828
+ "username": "kevin",
2829
+ "full_name": "Kevin S",
2830
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg",
2831
+ "id": "3"
2832
+ },
2833
+ "location": null
2834
+ },
2835
+ ...]
2836
+ }
2837
+ /media/liked:
2838
+ type: base
2839
+ get:
2840
+ description: |
2841
+ See the authenticated user's list of media they've liked. May return a mix
2842
+ of both image and video types.
2843
+ Note: This list is ordered by the order in which the user liked the media.
2844
+ Private media is returned as long as the authenticated user has permission
2845
+ to view that media. Liked media lists are only available for the currently
2846
+ authenticated user.
2847
+ queryParameters:
2848
+ max_like_id:
2849
+ description: Return media liked before this id.
2850
+ type: integer
2851
+ responses:
2852
+ 200:
2853
+ body:
2854
+ example: |
2855
+ {
2856
+ "data": [{
2857
+ "location": {
2858
+ "id": "833",
2859
+ "latitude": 37.77956816727314,
2860
+ "longitude": -122.41387367248539,
2861
+ "name": "Civic Center BART"
2862
+ },
2863
+ "comments": {
2864
+ "count": 16,
2865
+ "data": [ ... ]
2866
+ },
2867
+ "caption": null,
2868
+ "link": "http://instagr.am/p/BXsFz/",
2869
+ "likes": {
2870
+ "count": 190,
2871
+ "data": [{
2872
+ "username": "shayne",
2873
+ "full_name": "Shayne Sweeney",
2874
+ "id": "20",
2875
+ "profile_picture": "..."
2876
+ }, {...subset of likers...}]
2877
+ },
2878
+ "created_time": "1296748524",
2879
+ "images": {
2880
+ "low_resolution": {
2881
+ "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_6.jpg",
2882
+ "width": 306,
2883
+ "height": 306
2884
+ },
2885
+ "thumbnail": {
2886
+ "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_5.jpg",
2887
+ "width": 150,
2888
+ "height": 150
2889
+ },
2890
+ "standard_resolution": {
2891
+ "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_7.jpg",
2892
+ "width": 612,
2893
+ "height": 612
2894
+ }
2895
+ },
2896
+ "type": "image",
2897
+ "users_in_photo": [],
2898
+ "filter": "Earlybird",
2899
+ "tags": [],
2900
+ "id": "22987123",
2901
+ "user": {
2902
+ "username": "kevin",
2903
+ "full_name": "Kevin S",
2904
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg",
2905
+ "id": "3"
2906
+ }
2907
+ },
2908
+ {
2909
+ "videos": {
2910
+ "low_resolution": {
2911
+ "url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_102.mp4",
2912
+ "width": 480,
2913
+ "height": 480
2914
+ },
2915
+ "standard_resolution": {
2916
+ "url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_101.mp4",
2917
+ "width": 640,
2918
+ "height": 640
2919
+ },
2920
+ "comments": {
2921
+ "data": [{
2922
+ "created_time": "1279332030",
2923
+ "text": "Love the sign here",
2924
+ "from": {
2925
+ "username": "mikeyk",
2926
+ "full_name": "Mikey Krieger",
2927
+ "id": "4",
2928
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg"
2929
+ },
2930
+ "id": "8"
2931
+ },
2932
+ {
2933
+ "created_time": "1279341004",
2934
+ "text": "Chilako taco",
2935
+ "from": {
2936
+ "username": "kevin",
2937
+ "full_name": "Kevin S",
2938
+ "id": "3",
2939
+ "profile_picture": "..."
2940
+ },
2941
+ "id": "3"
2942
+ }],
2943
+ "count": 2
2944
+ },
2945
+ "caption": null,
2946
+ "likes": {
2947
+ "count": 1,
2948
+ "data": [{
2949
+ "username": "mikeyk",
2950
+ "full_name": "Mikeyk",
2951
+ "id": "4",
2952
+ "profile_picture": "..."
2953
+ }]
2954
+ },
2955
+ "link": "http://instagr.am/p/D/",
2956
+ "created_time": "1279340983",
2957
+ "images": {
2958
+ "low_resolution": {
2959
+ "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_6.jpg",
2960
+ "width": 306,
2961
+ "height": 306
2962
+ },
2963
+ "thumbnail": {
2964
+ "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_5.jpg",
2965
+ "width": 150,
2966
+ "height": 150
2967
+ },
2968
+ "standard_resolution": {
2969
+ "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_7.jpg",
2970
+ "width": 612,
2971
+ "height": 612
2972
+ }
2973
+ },
2974
+ "type": "video",
2975
+ "users_in_photo": null,
2976
+ "filter": "Vesper",
2977
+ "tags": [],
2978
+ "id": "363839373298",
2979
+ "user": {
2980
+ "username": "kevin",
2981
+ "full_name": "Kevin S",
2982
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg",
2983
+ "id": "3"
2984
+ },
2985
+ "location": null
2986
+ },
2987
+ ...]
2988
+ }
2989
+ # Oembed
2990
+ /oembed:
2991
+ type: base
2992
+ get:
2993
+ description: |
2994
+ Given a short link, returns information about the media associated with
2995
+ that link.
2996
+ queryParameters:
2997
+ url:
2998
+ type: string
2999
+ maxheight:
3000
+ type: integer
3001
+ maxwidth:
3002
+ type: integer
3003
+ responses:
3004
+ 200:
3005
+ body:
3006
+ schema: |
3007
+ {
3008
+ "": "http://json-schema.org/draft-03/schema",
3009
+ "type": "object",
3010
+ "properties": {
3011
+ "author_id": {
3012
+ "type": "integer"
3013
+ },
3014
+ "author_name": {
3015
+ "type": "string"
3016
+ },
3017
+ "author_url": {
3018
+ "type": "string"
3019
+ },
3020
+ "height": {
3021
+ "type": "integer"
3022
+ },
3023
+ "media_id": {
3024
+ "type": "string"
3025
+ },
3026
+ "provider_name": {
3027
+ "type": "string"
3028
+ },
3029
+ "provider_url": {
3030
+ "type": "string"
3031
+ },
3032
+ "title": {
3033
+ "type": "string"
3034
+ },
3035
+ "type": {
3036
+ "type": "string"
3037
+ },
3038
+ "url": {
3039
+ "type": "string"
3040
+ },
3041
+ "version": {
3042
+ "type": "string"
3043
+ },
3044
+ "width": {
3045
+ "type": "integer"
3046
+ }
3047
+ }
3048
+ }
3049
+ example: |
3050
+ {
3051
+ "author_id": 72,
3052
+ "author_name": "danrubin",
3053
+ "author_url": "http://instagram.com/",
3054
+ "height": 612,
3055
+ "media_id": "5382_72",
3056
+ "provider_name": "Instagram",
3057
+ "provider_url": "http://instagram.com/",
3058
+ "title": "Rays",
3059
+ "type": "photo",
3060
+ "url": "http://distillery.s3.amazonaws.com/media/2010/10/02/7e4051fdcf1d45ab9bc1fba2582c0c6b_7.jpg",
3061
+ "version": "1.0",
3062
+ "width": 612
3063
+ }
3064
+ /p/{shortcode}/media:
3065
+ uriParameters:
3066
+ shortcode:
3067
+ type: string
3068
+ required: true
3069
+ type: base
3070
+ get:
3071
+ description: |
3072
+ Given a short link, issues a redirect to that media's JPG file.
3073
+ queryParameters:
3074
+ size:
3075
+ enum:
3076
+ - t,
3077
+ - m,
3078
+ - l
3079
+ default: m
3080
+ responses:
3081
+ 302:
3082
+ body:
3083
+ text/html:
3084
+ example: |
3085
+ HTTP/1.1 302 FOUND
3086
+ Location: http://distillery.s3.amazonaws.com/media/2010/10/02/7e4051fdcf1d45ab9bc1fba2582c0c6b_6.jpg
3087
+ # Locations
3088
+ /locations:
3089
+ /{locId}:
3090
+ uriParameters:
3091
+ locId:
3092
+ type: integer
3093
+ type: base
3094
+ get:
3095
+ description: Get information about a location.
3096
+ /media/recent:
3097
+ type: base
3098
+ get:
3099
+ is: [ limitableById, limitableByTime ]
3100
+ description: |
3101
+ Get a list of recent media objects from a given location. May return a
3102
+ mix of both image and video types.
3103
+ responses:
3104
+ 200:
3105
+ body:
3106
+ example: |
3107
+ {
3108
+ "data": [{
3109
+ "location": {
3110
+ "id": "833",
3111
+ "latitude": 37.77956816727314,
3112
+ "longitude": -122.41387367248539,
3113
+ "name": "Civic Center BART"
3114
+ },
3115
+ "comments": {
3116
+ "count": 16,
3117
+ "data": [ ... ]
3118
+ },
3119
+ "caption": null,
3120
+ "link": "http://instagr.am/p/BXsFz/",
3121
+ "likes": {
3122
+ "count": 190,
3123
+ "data": [{
3124
+ "username": "shayne",
3125
+ "full_name": "Shayne Sweeney",
3126
+ "id": "20",
3127
+ "profile_picture": "..."
3128
+ }, {...subset of likers...}]
3129
+ },
3130
+ "created_time": "1296748524",
3131
+ "images": {
3132
+ "low_resolution": {
3133
+ "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_6.jpg",
3134
+ "width": 306,
3135
+ "height": 306
3136
+ },
3137
+ "thumbnail": {
3138
+ "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_5.jpg",
3139
+ "width": 150,
3140
+ "height": 150
3141
+ },
3142
+ "standard_resolution": {
3143
+ "url": "http://distillery.s3.amazonaws.com/media/2011/02/03/efc502667a554329b52d9a6bab35b24a_7.jpg",
3144
+ "width": 612,
3145
+ "height": 612
3146
+ }
3147
+ },
3148
+ "type": "image",
3149
+ "users_in_photo": [],
3150
+ "filter": "Earlybird",
3151
+ "tags": [],
3152
+ "id": "22987123",
3153
+ "user": {
3154
+ "username": "kevin",
3155
+ "full_name": "Kevin S",
3156
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg",
3157
+ "id": "3"
3158
+ }
3159
+ },
3160
+ {
3161
+ "videos": {
3162
+ "low_resolution": {
3163
+ "url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_102.mp4",
3164
+ "width": 480,
3165
+ "height": 480
3166
+ },
3167
+ "standard_resolution": {
3168
+ "url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_101.mp4",
3169
+ "width": 640,
3170
+ "height": 640
3171
+ },
3172
+ "comments": {
3173
+ "data": [{
3174
+ "created_time": "1279332030",
3175
+ "text": "Love the sign here",
3176
+ "from": {
3177
+ "username": "mikeyk",
3178
+ "full_name": "Mikey Krieger",
3179
+ "id": "4",
3180
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg"
3181
+ },
3182
+ "id": "8"
3183
+ },
3184
+ {
3185
+ "created_time": "1279341004",
3186
+ "text": "Chilako taco",
3187
+ "from": {
3188
+ "username": "kevin",
3189
+ "full_name": "Kevin S",
3190
+ "id": "3",
3191
+ "profile_picture": "..."
3192
+ },
3193
+ "id": "3"
3194
+ }],
3195
+ "count": 2
3196
+ },
3197
+ "caption": null,
3198
+ "likes": {
3199
+ "count": 1,
3200
+ "data": [{
3201
+ "username": "mikeyk",
3202
+ "full_name": "Mikeyk",
3203
+ "id": "4",
3204
+ "profile_picture": "..."
3205
+ }]
3206
+ },
3207
+ "link": "http://instagr.am/p/D/",
3208
+ "created_time": "1279340983",
3209
+ "images": {
3210
+ "low_resolution": {
3211
+ "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_6.jpg",
3212
+ "width": 306,
3213
+ "height": 306
3214
+ },
3215
+ "thumbnail": {
3216
+ "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_5.jpg",
3217
+ "width": 150,
3218
+ "height": 150
3219
+ },
3220
+ "standard_resolution": {
3221
+ "url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_7.jpg",
3222
+ "width": 612,
3223
+ "height": 612
3224
+ }
3225
+ },
3226
+ "type": "video",
3227
+ "users_in_photo": null,
3228
+ "filter": "Vesper",
3229
+ "tags": [],
3230
+ "id": "363839373298",
3231
+ "user": {
3232
+ "username": "kevin",
3233
+ "full_name": "Kevin S",
3234
+ "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg",
3235
+ "id": "3"
3236
+ },
3237
+ "location": null
3238
+ },
3239
+ ...]
3240
+ }
3241
+ /search:
3242
+ type: base
3243
+ get:
3244
+ #TODO oneOf
3245
+ description: Search for a location by geographic coordinate.
3246
+ queryParameters:
3247
+ lat:
3248
+ description: Latitude of the center search coordinate. If used, lng is required.
3249
+ type: number
3250
+ lng:
3251
+ description: Longitude of the center search coordinate. If used, lat is required.
3252
+ type: number
3253
+ distance:
3254
+ description: Default is 1000m (distance=1000), max distance is 5000.
3255
+ type: integer
3256
+ maximum: 5000
3257
+ default: 1000
3258
+ foursquare_v2_id:
3259
+ description: |
3260
+ Returns a location mapped off of a foursquare v2 api location id. If
3261
+ used, you are not required to use lat and lng.
3262
+ foursquare_id:
3263
+ description: |
3264
+ Returns a location mapped off of a foursquare v1 api location id. If used,
3265
+ you are not required to use lat and lng. Note that this method is deprecated;
3266
+ you should use the new foursquare IDs with V2 of their API.
3267
+ responses:
3268
+ 200:
3269
+ body:
3270
+ schema: |
3271
+ {
3272
+ "": "http://json-schema.org/draft-03/schema",
3273
+ "type": "object",
3274
+ "properties": {
3275
+ "meta": {
3276
+ "properties": {
3277
+ "code": {
3278
+ "type": "integer"
3279
+ }
3280
+ },
3281
+ "type": "object"
3282
+ },
3283
+ "data": [
3284
+ {
3285
+ "properties": {
3286
+ "latitude": {
3287
+ "type": "number"
3288
+ },
3289
+ "id": {
3290
+ "type": "string"
3291
+ },
3292
+ "longitude": {
3293
+ "type": "number"
3294
+ },
3295
+ "name": {
3296
+ "type": "string"
3297
+ }
3298
+ },
3299
+ "type": "object"
3300
+ }
3301
+ ]
3302
+ }
3303
+ }
3304
+ example: |
3305
+ {
3306
+ "meta": {
3307
+ "code": 200
3308
+ },
3309
+ "data": [
3310
+ {
3311
+ "latitude": 48.850059509,
3312
+ "id": "125983371",
3313
+ "longitude": 2.294613838,
3314
+ "name": "cairo universty, ElSheikh Zaid branch"
3315
+ },
3316
+ {
3317
+ "latitude": 48.850191,
3318
+ "id": "46295095",
3319
+ "longitude": 2.294195,
3320
+ "name": "82 Boulevard De Grenelle"
3321
+ },
3322
+ {
3323
+ "latitude": 48.850232,
3324
+ "id": "17463171",
3325
+ "longitude": 2.294276,
3326
+ "name": "Monan chaussure"
3327
+ },
3328
+ {
3329
+ "latitude": 48.849993048,
3330
+ "id": "58664053",
3331
+ "longitude": 2.294816312,
3332
+ "name": "Rue Juge"
3333
+ },
3334
+ {
3335
+ "latitude": 48.850235602,
3336
+ "id": "3277432",
3337
+ "longitude": 2.294731778,
3338
+ "name": "Pizza Di Napoli"
3339
+ },
3340
+ {
3341
+ "latitude": 48.85030795,
3342
+ "id": "3632655",
3343
+ "longitude": 2.294114341,
3344
+ "name": "Marche Grenelle"
3345
+ },
3346
+ {
3347
+ "latitude": 48.850311575,
3348
+ "id": "47202559",
3349
+ "longitude": 2.294123981,
3350
+ "name": "London Styl'"
3351
+ },
3352
+ {
3353
+ "latitude": 48.84975,
3354
+ "id": "16095374",
3355
+ "longitude": 2.294726,
3356
+ "name": "Sami Coiffure 2000"
3357
+ }
3358
+ ]
3359
+ }
3360
+ # Geo
3361
+ /geographies/{geoId}/media/recent:
3362
+ type: base
3363
+ uriParameters:
3364
+ geoId:
3365
+ type: integer
3366
+ get:
3367
+ description: |
3368
+ Get recent media from a geography subscription that you created.
3369
+ Note: You can only access Geographies that were explicitly created by your
3370
+ OAuth client. Check the Geography Subscriptions section of the real-time
3371
+ updates page. When you create a subscription to some geography that you
3372
+ define, you will be returned a unique geo-id that can be used in this
3373
+ query. To backfill photos from the location covered by this geography,
3374
+ use the media search endpoint.
3375
+ queryParameters:
3376
+ min_id:
3377
+ description: Return media before this min_id.
3378
+ type: integer