Loudvoice API \ Comments \ Get comment details
LoudVoice API Resources
| Resource/URI - Discussions | GET | POST | PUT | DELETE |
|---|---|---|---|---|
Discussions
/loudvoice/discussions.json
|
List all discussions | Create a discussion | – | – |
Discussion
/loudvoice/discussions/<discussion_token>.json
|
Read a discussion | – | Update a discussion | Delete a discussion |
Discussion messages
/loudvoice/comments/<discussion_token>/comments.json
|
Read discussion comments | – | – | – |
| Resource/URI - Authors | GET | POST | PUT | DELETE |
|---|---|---|---|---|
Authors
/loudvoice/authors.json
|
List all authors | Create an author | – | – |
Author
/loudvoice/authors/<author_token>.json
|
Read an author | – | Update an author | Delete an author |
| Resource/URI - Author Sessions | GET | POST | PUT | DELETE |
|---|---|---|---|---|
Author Sessions
/loudvoice/authors/sessions.json
|
List all sessions | – | Create or update a session | – |
Author Session
/loudvoice/authors/sessions/<session_token>.json
|
– | – | – | Delete a session |
| Resource/URI - Comments | GET | POST | PUT | DELETE |
|---|---|---|---|---|
Comments
/loudvoice/comments.json
|
List all comments | Create a comment | – | – |
Comment
/loudvoice/comments/<comment_token>.json
|
Read a comment | – | Update a comment | Delete a comment |
| Resource/URI - Votes | GET | POST | PUT | DELETE |
|---|---|---|---|---|
Votes
/loudvoice/votes.json
|
List all votes |
– | – | – |
Vote
/loudvoice/votes/comments/<comment_token>/authors/<author_token>.json
|
Read a vote | – | Cast a vote | Delete a vote |
Workflow
Request: the code to send to the API
Send an API request to this endpoint in order to retrieve the details of a comment:
GET
/loudvoice/comments/<comment_token>.json
The <comment_token> has to be replaced by the unique token of an existing comment.
Result: the code returned by the API
The API will either return a HTTP status code 200 on success or an appropriate message body with
further details on the error that occured.
Example Resultset
{
"response": {
"request": {
"date": "Fri, 06 Apr 2018 11:45:08 0200",
"resource": "/loudvoice/comments/093e489f-5a19-4432-ad8b-0e7a6e220408.json",
"status": {
"flag": "success",
"code": 200,
"info": "Your request has been processed successfully"
}
},
"result": {
"data": {
"comment": {
"comment_token": "093e489f-5a19-4432-ad8b-0e7a6e220408",
"comment_reference": null,
"parent_comment_token": null,
"parent_comment_reference": null,
"num_child_comments": 0,
"date_creation": "Fri, 06 Apr 2018 11:36:49 0200",
"date_last_update": null,
"post_order": 42,
"has_been_approved": true,
"is_spam": false,
"is_trashed": false,
"ip_address": "127.0.0.1",
"text": "Hello World! This is my first comment.",
"votes":{
"num_votes_up": 0,
"num_votes_down": 0,
"date_last_vote": null
},
"reports": {
"num_reports": 0,
"date_last_report": null
},
"author": {
"author_token": "71e944f8-394e-4808-9c00-163928c59ba8",
"author_reference": null,
"name": "John Smith",
"email": "john.smith@example.com",
"description": null,
"picture_url": "https://www.example.com/john-smith/avatar.jpg",
"website_url": null,
"num_comments": 17,
"date_last_comment": "Fri, 06 Apr 2018 11:45:00 0200",
"date_creation": "Tue, 27 Mar 2018 11:19:52 0200",
"date_last_update": "Fri, 06 Apr 2018 11:45:00 0200"
},
"discussion":{
"discussion_token": "b0ad71f8-0323-486c-916f-0c3f767f6174",
"discussion_reference": "/api/resources/loudvoice/author/session/",
"date_creation": "Tue, 27 Mar 2018 10:58:21 0200",
"title": "Loudvoice Documentation",
"url": "https://docs.oneall.com/",
"is_closed": false,
"is_trashed": false,
"num_comments": 43,
"date_last_comment": "Fri, 06 Apr 2018 11:45:00 0200",
"date_last_update": "Tue, 27 Mar 2018 10:58:24 0200"
}
}
}
}
}
}