Pulling specific posts using Rest API?
I'd like to find information on how to pull a specific post using Rest API and then display it using a mix of HTML and CSS.
I'm fine with the display, just need help with the call.
Essentially, I'd like to pull the title of the post, description, user information (username, icon, post time) and the number of replies and then display them on a separate page.
If anyone could point me in the right direction, that would be amazing.
Thanks in advance!
If you have post id with you you can get any information about that post by using API calls.
API Call:
http://community.lithium.com/community-name/restapi/vc/messages/id/[Post ID]/?restapi.response_style=view
You will get the XML response contains detailed information about that post like author, subject, URL of the post etc..
append parameter &xslt=json.xsl to the above the api call to get JSON response.
http://community.lithium.com/community-name/restapi/vc/messages/id/[Post ID]/?restapi.response_style=view&xslt=json.xsl
You can check replies, solution to the thread by using following api call.
http://community.lithium.com/community-name/restapi/vc/threads/id/[Thread ID]/?restapi.response_style=view