-
Notifications
You must be signed in to change notification settings - Fork 2
RESTful API C3
annypanny edited this page Nov 29, 2016
·
12 revisions
/comments/[comment_id]
-
It used to show the info of a comments for the given comment_id on the server.
-
It returned a JSON.
-
JSON file contains:
- "author"
- "comment"
- "pubdate"
- "id"
- "contentType"
- "post"
and each "author" contains:
- "displayName"
- "id"
- "host"
- "url"
- "github"
Method:
GET
Example:
GET /comments/837e4ede-231c-48bb-af23-441ecf0154c2
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
{
"author": {
"displayName": "Jiafeng Wu",
"id": "eb572e7b-7856-468b-bfdf-9b6388f9165c",
"host": "http://socialnets404.herokuapp.com/",
"url": "http://socialnets404.herokuapp.com/author/eb572e7b-7856-468b-bfdf-9b6388f9165c",
"github": "jiafengwu0301"
},
"comment": "ha ha ha",
"pubdate": "2016-11-29T07:32:32.497690Z",
"id": "837e4ede-231c-48bb-af23-441ecf0154c2",
"contentType": "text/plain",
"post": "http://socialnets404.herokuapp.com/posts/e0420969-e020-4bdb-8285-3ea5d0f97878"
}