LoudVoice API \ Comments
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 |
Comments are messages posted by authors.
Each comment is part of a discussion and uniquely identified by a comment_token.
Structure
Comment nodes have the format below. Absent values are returned as null.
{
"comment": {
"comment_token": "#comment_token#",
"comment_reference": "#comment_reference#",
"parent_comment_token": "#parent_comment_token#",
"parent_comment_reference": "#parent_comment_reference#",
"num_child_comments": #num_child_comments#,
"date_creation": "#date_creation#",
"date_last_update": "#date_last_update#",
"post_order": "#post_order#",
"has_been_approved": #has_been_approved#,
"is_spam": #is_spam#,
"is_trashed": #is_trashed#,
"ip_address": "#ip_address#",
"text": "#text#",
"votes": {
"num_votes_up": #num_votes_up#,
"num_votes_down": #num_votes_down#,
"date_last_vote": "#date_last_vote#"
},
"reports": {
"num_reports": #num_reports#,
"date_last_report": "#date_last_report#"
},
"author": {
#author#
},
"discussion": {
#discussion#
}
}
}
| Node | Description |
|---|---|
| Comment Reference | |
comment_tokenstring, uuid, automatically generated
|
Identifier of the comment. This value is unique amongst all comments. Example: 5e52eae4-7293-4cea-8c18-ee7cb6c1eb72 |
comment_referencestring
|
Your custom reference for this comment. This value is unique amongst all comments of the same discussion. Example: POST-1234 |
| Parent Comment Reference | |
parent_comment_tokenstring, uuid, automatically generated
|
Identifier of the parent comment. Example : 8ffb8b57-7906-41a3-9b57-0a81195ccc4c |
parent_comment_referencestring
|
Your custom reference to the parent comment. Example: POST-1233 |
| Comment Metadata | |
num_child_commentsinteger
|
Indicates how many child-comment this comment has. Example: 3 |
date_creationstring, RFC 2822
|
Date indicating when the comment was posted. Example: Wed, 14 Mar 2018 14:19:49 +0100 |
date_last_updatestring, RFC 2822
|
Date indicating when the comment was updated last. Example: Wed, 14 Mar 2018 14:19:49 +0100 |
post_orderinteger
|
The order in which the comment was posted. Example: This is my comment |
has_been_approvedboolean
|
Indicates whether the comment has been approved or not. The LoudVoice widget displays comments
that have not been approved only to it's author. Example: true |
is_spamboolean
|
Indication if the message has been flagged as spam or not. Example: false |
is_trashedboolean
|
Indication if the message was moved to the trashbox or not. Example: false |
ip_addressstring, IPv4
|
IP address that was used to post the comment. Example: 172.16.0.1 |
textstring
|
The comment contents. Example: This is my comment |
| Comment Votes | |
num_votes_upinteger
|
Number of times this comment has been voted up. Example: 42 |
num_votes_downinteger
|
Number of times this comment has been voted down. Example: 28 |
date_last_votestring, RFC 2822
|
Date of the last vote. Example: Wed, 14 Mar 2018 14:19:49 +0100 |
| Comment Reports | |
num_reportsinteger
|
Number of times this comment has been reported. Example: 22 |
date_last_reportstring, RFC 2822
|
Date of the last report. Example: Wed, 14 Mar 2018 14:19:49 +0100 |
| Author Metadata | |
authorJSON
|
Data representing the author of the comment. |
| Discussion Metadata | |
discussionJSON
|
Data representing the discussion the comment is part of. |