-
Notifications
You must be signed in to change notification settings - Fork 9
/
500px-api.xml
697 lines (556 loc) · 21.7 KB
/
500px-api.xml
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
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:apigee="http://api.apigee.com/wadl/2010/07/"
xmlns="http://wadl.dev.java.net/2009/02"
xsi:schemaLocation="http://wadl.dev.java.net/2009/02 http://apigee.com/schemas/wadl-schema.xsd http://api.apigee.com/wadl/2010/07/ http://apigee.com/schemas/apigee-wadl-extensions.xsd">
<!-- Base defines the domain and base path of the endpoint -->
<resources base="https://api.500px.com/v1">
<resource path="photos">
<param name="feature" default="fresh_today" required="true">
<doc>
Photo stream.
</doc>
<option value="popular"/>
<option value="upcoming"/>
<option value="editors"/>
<option value="fresh_today"/>
<option value="fresh_yesterday"/>
<option value="fresh_week"/>
<option value="user" />
<option value="user_friends" />
</param>
<param name="user_id" type="xsd:string">
<doc>User ID 'user' Photo streeam</doc>
</param>
<param name="username" type="xsd:string">
<doc>OR username for 'user' Photo streeam</doc>
</param>
<param name="only" type="xsd:string">
<doc>String name of the category to return photos from</doc>
</param>
<param name="exclude" type="xsd:string">
<doc>String name of the category to exclude photos by.</doc>
</param>
<param name="sort" type="xsd:string">
<doc>
Sort photos in the specified order.
</doc>
<option value="created_at"/>
<option value="rating"/>
<option value="times_viewed"/>
<option value="votes_count"/>
<option value="comments_count"/>
<option value="taken_at" />
</param>
<param name="page" type="xsd:string">
<doc>Return a specific page in the photo stream. Page numbering is 1-based.</doc>
</param>
<param name="rpp" type="xsd:string">
<doc>The number of results to return. Can not be over 100, default 20.</doc>
</param>
<param name="image_size" default="3">
<doc>
The photo size to be returned.
</doc>
<option value="1"/>
<option value="2"/>
<option value="3"/>
<option value="4"/>
</param>
<param name="include_store">
<doc>
Returns market infomation about the photo.
</doc>
<option value="store_download"/>
<option value="store_print"/>
</param>
<param name="include_states">
<doc>
Returns state of the photo for the currently logged in user and authenticated request.
</doc>
<option value="voted"/>
<option value="purchased"/>
</param>
<param name="tags" type="xsd:string" style="query">
<doc>Returns an array of tags for the photo.</doc>
</param>
<method id="get_photos" name="GET" apigee:displayName="photos">
<apigee:tags>
<apigee:tag primary="true">Photos</apigee:tag>
<apigee:tag>Show</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<apigee:example url="/photos" />
<doc title="GET Photos" apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/photo/GET_photos.md">
Retrieves list of photos
</doc>
</method>
</resource>
<resource path="photos/search">
<param name="term" type="xsd:string">
<doc>A keyword to search for.</doc>
</param>
<param name="tag" type="xsd:string">
<doc>A complete tag string to search for.</doc>
</param>
<param name="page" type="xsd:integer">
<doc>Return a specific page. Page numbering is 1-based.</doc>
</param>
<param name="rpp" type="xsd:integer">
<doc>The number of results to return. Can not be over 100, default 20.</doc>
</param>
<param name="tags" type="xsd:string">
<doc>Returns an array of tags for each photo.</doc>
</param>
<method id="get_photos_search" name="GET" apigee:displayName="photos/search">
<apigee:tags>
<apigee:tag primary="true">Photos</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/photo/GET_photos_search.md">
Returns a listing of twenty (up to one hundred) photos from search results for a specified tag or keyword.
</doc>
</method>
</resource>
<resource path="photos/{id}">
<param name="id" type="xsd:string" required="true">
<doc>The Photo ID</doc>
</param>
<param name="image_size" default="3">
<doc>
The photo size to be returned.
</doc>
<option value="1"/>
<option value="2"/>
<option value="3"/>
<option value="4"/>
</param>
<param name="comments">
<doc>Return comments to the photo in the response. Comments are returned in order of creation, 20 entries per page.</doc>
<option value="1"/>
<option value="2"/>
</param>
<param name="comments_page" type="xsd:integer">
<doc>Return the specified page from the comments listing. Page numbers are 1-based.</doc>
</param>
<param name="tags" type="xsd:string">
<doc>Returns an array of tags for the photo.</doc>
</param>
<method id="get_photos_id" name="GET" apigee:displayName="photos/{id}">
<apigee:tags>
<apigee:tag primary="true">Photos</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/photo/GET_photos_id.md">
Returns detailed information of a single photo.
</doc>
</method>
</resource>
<resource path="photos/{id}/comments">
<param name="id" type="xsd:string" required="true">
<doc>The Photo ID</doc>
</param>
<param name="page" type="xsd:integer">
<doc>Return a specific page in the comment listing. Page numbering is 1-based.</doc>
</param>
<method id="get_photos_id_comments" name="GET" apigee:displayName="photos/{id}/comments">
<apigee:tags>
<apigee:tag primary="true">Photos</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/photo/GET_photos_id_comments.md">
Returns a listing of twenty comments for the photo.
</doc>
</method>
</resource>
<resource path="photos/{id}/votes">
<param name="id" type="xsd:string" required="true">
<doc>The Photo ID</doc>
</param>
<param name="page" type="xsd:integer">
<doc>Return a specific page in the comment listing. Page numbering is 1-based.</doc>
</param>
<param name="rpp" type="xsd:integer">
<doc>The number of results to return. Can not be over 100, default 20.</doc>
</param>
<method id="get_photos_id_votes" name="GET" apigee:displayName="photos/{id}/votes">
<apigee:tags>
<apigee:tag primary="true">Photos</apigee:tag>
<apigee:tag>Photos</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<apigee:example url="/photos/{id}/votes" />
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/photo/GET_photos_id_votes.md">
Likes the photo
</doc>
</method>
</resource>
<resource path="photos/{id}">
<param name="id" type="xsd:string" required="true">
<doc>The Photo ID</doc>
</param>
<param name="id" type="xsd:integer">
<doc>The Photo ID to update.</doc>
</param>
<param name="name" type="xsd:string">
<doc>Title for the photo.</doc>
</param>
<param name="description" type="xsd:string">
<doc>The description of the photo.</doc>
</param>
<method id="put_photos_id" name="PUT" apigee:displayName="photos/{id}">
<apigee:tags>
<apigee:tag primary="true">Photos</apigee:tag>
<apigee:tag>Photos</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<apigee:example url="/photos/{id}" />
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/photo/PUT_photos_id.md">
Updates a photo.
</doc>
</method>
</resource>
<resource path="photos">
<param name="name" type="xsd:string">
<doc>Title for the photo.</doc>
</param>
<param name="description" type="xsd:string">
<doc>The description of the photo.</doc>
</param>
<param name="category" type="xsd:integer">
<doc>A numerical ID for the Category of the photo</doc>
</param>
<!-- Photo technical details -->
<param name="shutter_speed" type="xsd:string">
<doc>Shutter speed in seconds, represented by string containing a rational expression if the value is 1sec.</doc>
</param>
<param name="focal_length" type="xsd:string">
<doc>Focal length in millimetres, a string representing an integer value</doc>
</param>
<param name="aperture" type="xsd:string">
<doc>Aperture value</doc>
</param>
<param name="iso" type="xsd:string">
<doc>ISO value</doc>
</param>
<param name="camera" type="xsd:string">
<doc>Make and model of the camera. Note: Please make sure it contains sensible information (eg., does not contain camera's make or model twice)</doc>
</param>
<param name="lens" type="xsd:string">
<doc>Lens used to make this photo</doc>
</param>
<!-- Geographical information of the photo: -->
<param name="latitude" type="xsd:string">
<doc>Latitude, in decimal format</doc>
</param>
<param name="longitude" type="xsd:string">
<doc>Longitude, in decimal format</doc>
</param>
<!-- Geographical information of the photo: -->
<param name="privacy" type="xsd:integer">
<doc> Whether to hide the photo from the user profile on the website. Otherwise, the photo is only available for use in galleries. Recognized values: 1, 0.</doc>
</param>
<method id="post_photos" name="POST" apigee:displayName="photos">
<apigee:tags>
<apigee:tag primary="true">Photos</apigee:tag>
<apigee:tag>Photos</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<apigee:example url="/photos" />
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/photo/POST_photos.md">
Create a new photo on behalf of the user, and receive an upload key in exchange.
</doc>
</method>
</resource>
<resource path="photos/{id}/vote">
<param name="id" type="xsd:string" required="true">
<doc> ID of the photo the vote is cast upon.</doc>
</param>
<param name="vote" default="1">
<doc>
vote, values: '0' for 'dislike' or '1' for 'like'.
</doc>
<option value="0"/>
<option value="1"/>
</param>
<method id="post_photos_id_vote" name="POST" apigee:displayName="photos/{id}/vote">
<apigee:tags>
<apigee:tag primary="true">Photos</apigee:tag>
</apigee:tags>
<apigee:authentication required="true"/>
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/photo/POST_photos_id_vote.md">
Allows the user to vote for a photo.
</doc>
</method>
</resource>
<resource path="photos/{id}/tags">
<param name="id" type="xsd:string" required="true">
<doc>The Photo ID to add tags for.</doc>
</param>
<param name="tags" type="xsd:string">
<doc>Coma separated tags.</doc>
</param>
<method id="post_photos_id_tags" name="POST" apigee:displayName="photos/{id}/tags">
<apigee:tags>
<apigee:tag primary="true">Photos</apigee:tag>
</apigee:tags>
<apigee:authentication required="true"/>
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/photo/POST_photos_id_tags.md">
Adds tags to the photo. Accepts one or multiple coma separated tags.
</doc>
</method>
</resource>
<resource path="photos/{id}/comments">
<param name="id" type="xsd:string" required="true">
<doc>The Photo ID to post comments for.</doc>
</param>
<param name="body" type="xsd:string">
<doc>Content of the comment.</doc>
</param>
<method id="post_photos_id_comments" name="POST" apigee:displayName="photos/{id}/comments">
<apigee:tags>
<apigee:tag primary="true">Photos</apigee:tag>
</apigee:tags>
<apigee:authentication required="true"/>
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/photo/POST_photos_id_comments.md">
Creates a new comment for the photo.
</doc>
</method>
</resource>
<resource path="photos/{id}">
<param name="id" type="xsd:string" required="true">
<doc>The Photo ID to delete.</doc>
</param>
<method id="delete_photos_id" name="DELETE" apigee:displayName="photos/{id}">
<apigee:tags>
<apigee:tag primary="true">Photos</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/photo/DELETE_photos_id.md">
Deletes the photo from the User's library.
</doc>
</method>
</resource>
<resource path="photos/{id}/tags">
<param name="id" type="xsd:string" required="true">
<doc>The Photo ID to remove tags from.</doc>
</param>
<param name="tags" type="xsd:string">
<doc>Coma separated tags.</doc>
</param>
<method id="delete_photos_id_tags" name="DELETE" apigee:displayName="photos/{id}/tags">
<apigee:tags>
<apigee:tag primary="true">Photos</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/photo/DELETE_photos_id_tags.md">
Removes tags from the photo. Accepts one or multiple coma separated tags.
</doc>
</method>
</resource>
<!-- UPLOAD -->
<resource path="upload">
<param name="photo_id" type="xsd:string" required="true">
<doc>The ID of the photo the file is being uploaded for. The ID should be known to the client from the POST photos request result.</doc>
</param>
<param name="upload_key" type="xsd:string" required="true">
<doc>Upload key</doc>
</param>
<param name="consumer_key" type="xsd:string" required="true">
<doc>Your application Consumer key.</doc>
</param>
<param name="access_key" type="xsd:string" required="true">
<doc>Oauth token.</doc>
</param>
<param name="file" type="xsd:string" required="true">
<doc>The multipart HTTP upload. This is expected to be of the same format as when a file is being sent from an HTML file form.</doc>
</param>
<method id="upload" name="POST" apigee:displayName="upload">
<apigee:tags>
<apigee:tag primary="true">Upload</apigee:tag>
</apigee:tags>
<apigee:authentication required="false" />
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/upload/POST_upload.md">
Allows an application to upload the photo file.
Warning: This endpoint cannot accept oauth signed requests.
</doc>
</method>
</resource>
<resource path="photos/upload">
<param name="file" type="xsd:string" required="true">
<doc>The multipart HTTP upload. This is expected to be of the same format as when a file is being sent from an HTML file form.</doc>
</param>
<!-- optional params -->
<param name="name" type="xsd:string">
<doc>Title for the photo.</doc>
</param>
<param name="description" type="xsd:string">
<doc>The description of the photo.</doc>
</param>
<param name="category" type="xsd:integer">
<doc>A numerical ID for the Category of the photo</doc>
</param>
<param name="privacy" type="xsd:integer" default="0">
<doc>Whether to hide the photo from the user profile on the website. Otherwise, the photo is only available for use in Collections/Portfolio. 0 - Public, 1 - Private</doc>
<option value="0"/>
<option value="1"/>
</param>
<!-- Photo technical details -->
<param name="shutter_speed" type="xsd:string">
<doc>Shutter speed in seconds, represented by string containing a rational expression if the value is 1sec.</doc>
</param>
<param name="focal_length" type="xsd:string">
<doc>Focal length in millimetres, a string representing an integer value</doc>
</param>
<param name="aperture" type="xsd:string">
<doc>Aperture value</doc>
</param>
<param name="iso" type="xsd:string">
<doc>ISO value</doc>
</param>
<param name="camera" type="xsd:string">
<doc>Make and model of the camera. Note: Please make sure it contains sensible information (eg., does not contain camera's make or model twice)</doc>
</param>
<param name="lens" type="xsd:string">
<doc>Lens used to make this photo</doc>
</param>
<!-- Geographical information of the photo: -->
<param name="latitude" type="xsd:string">
<doc>Latitude, in decimal format</doc>
</param>
<param name="longitude" type="xsd:string">
<doc>Longitude, in decimal format</doc>
</param>
<method id="photos_upload" name="POST" apigee:displayName="(NEW) photos/upload">
<apigee:tags>
<apigee:tag primary="true">Upload</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<doc>
(This is a new, simplified upload endpoint.) Allows an application to upload the photo.
</doc>
</method>
</resource>
<!-- //end UPLOAD -->
<!-- USER -->
<resource path="users">
<method id="get_users" name="GET" apigee:displayName="users">
<apigee:tags>
<apigee:tag primary="true">User</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/user/GET_users.md">
Returns the profile information for the current user.
</doc>
</method>
</resource>
<resource path="users/show">
<param name="id" type="xsd:string">
<doc>
Return information for the specified user ID.
</doc>
</param>
<param name="username" type="xsd:string">
<doc>Return information for the user with the specified username.</doc>
</param>
<param name="email" type="xsd:string">
<doc>Return information for the user with the specified email address.</doc>
</param>
<method id="get_users_show" name="GET" apigee:displayName="users/show">
<apigee:tags>
<apigee:tag primary="true">User</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/user/GET_users_show.md">
Returns the profile information for a specified user.
</doc>
</method>
</resource>
<resource path="users/{id}/friends">
<param name="id" type="xsd:string" required="true">
<doc>Return information for the specified user ID</doc>
</param>
<param name="page" type="xsd:string">
<doc>Return the specified page of the resource. Page numbering is 1-based.</doc>
</param>
<param name="rpp" type="xsd:string">
<doc>Results Per Page, default 20, max 100.</doc>
</param>
<method id="get_users_id_friends" name="GET" apigee:displayName="users/{id}/friends">
<apigee:tags>
<apigee:tag primary="true">User</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/user/GET_users_id_friends.md">
Returns a list of friends for the specified user.
</doc>
</method>
</resource>
<resource path="users/{id}/followers">
<param name="id" type="xsd:string" required="true">
<doc>ID of the user.</doc>
</param>
<param name="page" type="xsd:string">
<doc>Return the specified page of the resource. Page numbering is 1-based.</doc>
</param>
<method id="get_users_id_followers" name="GET" apigee:displayName="users/{id}/followers">
<apigee:tags>
<apigee:tag primary="true">User</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/user/GET_users_id_followers.md">
Returns a list of users who follow the specified user.
</doc>
</method>
</resource>
<resource path="users/search">
<param name="term" type="xsd:string" required="true">
<doc>A keyword to search for.</doc>
</param>
<param name="page" type="xsd:string">
<doc>Return the specified page of the resource. Page numbering is 1-based.</doc>
</param>
<param name="rpp" type="xsd:string">
<doc>Results Per Page, default 20, max 100.</doc>
</param>
<method id="get_users_search" name="GET" apigee:displayName="users/search">
<apigee:tags>
<apigee:tag primary="true">User</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/user/GET_users_search.md">
Return listing of ten (up to one hundred) users from search results for a specified search term.
</doc>
</method>
</resource>
<resource path="users/{id}/friends">
<param name="id" type="xsd:string" required="true">
<doc> ID of the User to add to the followers list.</doc>
</param>
<method id="post_users_search" name="POST" apigee:displayName="users/{id}/friends">
<apigee:tags>
<apigee:tag primary="true">User</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/user/POST_users_id_friends.md">
Add the user to the list of followers.
</doc>
</method>
</resource>
<resource path="users/{id}/friends">
<param name="id" type="xsd:string" required="true">
<doc>ID of the User to remove from the followers list.</doc>
</param>
<method id="delete_users_search" name="DELETE" apigee:displayName="users/{id}/friends">
<apigee:tags>
<apigee:tag primary="true">User</apigee:tag>
</apigee:tags>
<apigee:authentication required="true" />
<doc apigee:url="https://github.com/500px/api-documentation/blob/master/endpoints/user/DELETE_users_id_friends.md">
Removes the user from the list of followers.
</doc>
</method>
</resource>
<!-- //end USERS -->
</resources>
</application>