-
Notifications
You must be signed in to change notification settings - Fork 0
API Doc: Single Post Access
Ryan Satyabrata edited this page Nov 4, 2016
·
9 revisions
(not yet implemented)
Used to get the contents of post. Used with HTTP GET, {POST_ID} is the UUID of the post, which is required.
It returns a JSON which is an object and cointains an author field, an UUID field that matches the post_id of the request.
GET /posts/92c4cbd3-2e36-4b53-a66b-01bff793e62d HTTP/1.1
Header: Value
200 Ok ...
{
# title of a post
"title":"A post title",
# where did you get this post from?
"source":"http://lastplaceigotthisfrom.com/post/92c4cbd3-2e36-4b53-a66b-01bff793e62d",
# where is it actually from
"origin":"http://whereitcamefrom.com/post/92c4cbd3-2e36-4b53-a66b-01bff793e62d",
# a brief description of the post
"description":"This post discusses stuff -- brief",
# The content type of the post assume either
# text/x-markdown
# text/plain
# for HTML you will want to strip tags before displaying
"contentType":"text/plain",
"content":"This post is ° ☾ ☆ ¸. ¸ ★ :. . • ○ ° ★ .♬~♪ VROOOOM ♩♬~♪ .
♩♬~♪ VROOOOM ♩♬~♪ ° ☾ ☆ ¸. ¸ ★ :. . • ○ ° ★ . Yes sir!",
# the author has an ID where by authors can be disambiguated
"author":{
# ID of the Author (UUID)
"id":"de305d54-75b4-431b-adb2-eb6b9e546013",
# the home host of the author
"host":"http://127.0.0.1:5454/",
# the display name of the author
"displayName":"Lara Croft",
# url to the authors information
"url":"http://127.0.0.1:5454/author/9de17f29c12e8f97bcbbd34cc908f1baba40658e",
# HATEOS url for Github API
"github": "http://github.com/laracroft"
},
# categories this post fits into (a list of strings
"categories":["web","tutorial"],
# comments about the post
# return a maximum number of comments
# total number of comments for this post
"count": 1023,
# page size
"size": 50,
# the first page of comments
"next": "http://service/posts/{post_id}/comments",
# You should return ~ 5 comments per post.
# should be sorted newest(first) to oldest(last)
"comments":[
{
"author":{
# ID of the Author (UUID)
"id":"de305d54-75b4-431b-adb2-eb6b9e546013",
"host":"http://127.0.0.1:5454/",
"displayName":"Greg Johnson",
# url to the authors information
"url":"http://127.0.0.1:5454/author
/9de17f29c12e8f97bcbbd34cc908f1baba40658e",
# HATEOS url for Github API
"github": "http://github.com/gjohnson"
},
"comment":"Sick Olde English",
"contentType":"text/x-markdown",
# ISO 8601 TIMESTAMP
"published":"2015-03-09T13:07:04+00:00",
# ID of the Comment (UUID)
"id":"de305d54-75b4-431b-adb2-eb6b9e546013"
}
]
# ISO 8601 TIMESTAMP
"published":"2015-03-09T13:07:04+00:00",
# ID of the Post (UUID)
"id":"92c4cbd3-2e36-4b53-a66b-01bff793e62d",
# visibility ["PUBLIC","FOAF","FRIENDS","PRIVATE","SERVERONLY"]
"visibility":"PUBLIC"
# for visibility PUBLIC means it is open to the wild web
# FOAF means it is only visible to Friends of A Friend
# If any of my friends are your friends I can see the post
# FRIENDS means if we're direct friends I can see the post
# PRIVATE means only you can see the post
# SERVERONLY means only those on your server (your home server) can see the post
}