Skip to content
This repository
Newer
Older
100644 88 lines (67 sloc) 2.104 kb
a4815125 » vovko
2012-06-08 new methods and stuff
1 # Blog Resources
2
3 PUT blogs/:id
4
5 ## Description
6 Updates the Story.
7
8 ***
9
10 ## Requires authentication
11 **[OAuth][]**
12
13 ***
14
15 ## Parameters
16
606fea75 » Alex Riedler
2012-11-16 remove invalid statement about allowing id as query argument.
17 - **id** _(required)_ — The Blog Post ID to update.
a4815125 » vovko
2012-06-08 new methods and stuff
18 - **title** — Title for the blog post.
19 - **body** — Content of the blog post.
20 - **latitude** — Latitude for the blog post.
21 - **longitude** — Longitude for the blog post.
22 - **tags** — Comma separated list of tags.
23 - **photo_ids** — Comma separated list of Photo IDs for photos that are in the blog post.
24
25 ***
26
27 ## Return format
28 Story information in **[full format][]**.
29
30
31
32 ***
33
34 ## Errors
35 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.
36
37 - **403 Forbidden** — You do not own the blog post you are trying to update.
38 - **404 Not Found** — The requested blog post does not exist or was deleted.
39 - **422 Unprocessable Entity** — One or more of the required fields didn't include valid data.
40
41 ***
42
43 ## Example
44 **Request**
45
46 POST v1/blogs/40185
47
48 **Body**
49
50 title=My+Vacation&title=Hawaii+trip
51
52 **Return**
2073079e » vovko
2012-06-08 Style changes
53 ``` json
54 {
55 "id": 40185,
56 "title": "Hawaii trip",
57 "body": "I went on a vacation to Hawaii",
58 "created_at": "2012-06-07T17:10:54-04:00",
59 "latitude": null,
60 "longitude": null,
61 "user": {
62 "id": 173,
63 "username": "vovko",
64 "firstname": "Vladimir",
65 "lastname": "Drizhepolov",
66 "city": "Toronto",
67 "country": "Canada",
68 "fullname": "Vladimir Drizhepolov",
69 "userpic_url": "http://acdn.500px.net/173.jpg",
70 "upgrade_status": 2
71 },
72 "tags": null,
73 "photos": [
74 {
75 "id": 8309863,
76 "name": "Untitled",
77 "rating": 59.7,
78 "created_at": "2012-06-05T17:40:48-04:00",
79 "category": 0,
80 "votes_count": 1,
81 "image_url": "http://pcdn.500px.net/8309863/49a60b97f30125b223f4e38ab53c6525435888f2/4.jpg"
82 }
83 ]
84 }
85 ```
a4815125 » vovko
2012-06-08 new methods and stuff
86
87 [OAuth]: https://github.com/500px/api-documentation/tree/master/authentication
606fea75 » Alex Riedler
2012-11-16 remove invalid statement about allowing id as query argument.
88 [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.