-
Notifications
You must be signed in to change notification settings - Fork 1
Comments
Christof Dorner edited this page Aug 19, 2012
·
12 revisions
This is the documentation for v1 of the Readmill API which is deprecated and will be discontinued on 2012-12-16. Please upgrade to v2, the new developer documentations are at developers.readmill.com.
This part of the API has to do with interacting with comments.
- /comments/#{id}, GET, PUT, DELETE
An example of the JSON representation of a comment below,
{
"id":1,
"user":
{
"id":2,
"username":"henrik",
"firstname":"Henrik",
"fullname":"Henrik Berggren",
"avatar_url":"http://static.readmill.com/avatars/c4f503989a8115d83d198c8dd2635ef4-medium.png?1320247666",
"permalink_url":"http://api.readmill.com/users/2",
"followers":338,
"followings":220,
"uri":"http://api.readmill.com/users/2",
"permalink_url":"http://readmill.com/henrik"
},
"reading_id":40,
"highlight_id":null,
"content":"Great beginning so far. I really want to go to India and Mombai now...",
"posted_at":"2010-12-29T10:30:10Z",
"uri":"http://api.readmill.com/comments/1"
}
Retrieves the representation of a single comment.
- id: The id of the comment.
- client_id
- access_token (optional)
- Success: 200 and a comment.
- Failure: 404
curl http://api.readmill.com/comments/1?client_id=CLIENT_ID
Update a comment
- id (integer): The id of the comment to update.
- comment[content] '(string): The content of the comment.
- access_token
- Success: 200
- Failure: 422
curl -X PUT http://api.readmill.com/comments/370?access_token=TOKEN -H 'Content-Type: application/json' -d '{"comment": {"content": "An updated comment"}}'
Deletes a comment
- id: The id of the comment to delete.
- access_token
- Success: 200
- Failure: 404
curl -X DELETE http://api.readmill.com/comments/370?access_token=TOKEN