Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 50 lines (33 sloc) 1.304 kb
a481512 Vova Drižepolov new methods and stuff
vovko authored
1 # Photo Resources
2
70f5ac8 Vova Drižepolov url fixes
vovko authored
3 POST photos/:id/favorite
a481512 Vova Drižepolov new methods and stuff
vovko authored
4
5 ## Description
6 Adds the photo to user's list of favorites.
7
8 ***
9
10 ## Requires authentication
11 **[OAuth][]**
12
13 ***
14
15 ## Parameters
16
17 - **id** _(required)_ — ID of the photo the favorite is cast upon.
18
19 ***
20
21 ## Return format
22 A JSON object containing keys: **status**, **message** and **error**(if happened).
23
24 ***
25
26 ## Errors
27 All known errors cause the resource to return HTTP error code header together with a JSON array containing at least 'status' and 'error' keys describing the source of error.
28
29 - **400 Bad Request** — The request issued is missing one or more of the required parameters or contains parameters in an invalid form.
30 - **403 Forbidden** — The favorite request has been rejected; common reasons are: current user is inactive, has not completed their profile, or already has the photo in favorites list.
31 - **404 Not Found** — Photo with the specified ID does not exist.
32
33 ***
34
35 ## Example
36 **Request**
37
38 POST /v1/photos/7942222/favorite
39
40 **Return**
2073079 Vova Drižepolov Style changes
vovko authored
41 ``` json
42 {
43 status: 200,
44 message: "Successfully created added a favorite.",
45 error: "None"
46 }
47 ```
a481512 Vova Drižepolov new methods and stuff
vovko authored
48
49 [OAuth]: https://github.com/500px/api-documentation/tree/master/authentication
50 [full format]: https://github.com/500px/api-documentation/blob/master/basics/formats_and_terms.md#full-format
Something went wrong with that request. Please try again.