LoudVoice API \ Votes
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 |
A vote is the opinion of an author about a specific comment.
Authors may either upvote (approve) or downvote (disapprove) comments. There can only be one single vote per author per comment
and each vote is uniquely identified by a comment_token
/author_token
combination.
Structure
Vote nodes have the format below. Absent values are returned as null
.
{ "vote": { "comment_token": "#comment_token#", "author_token": "#author_token#", "direction": "#direction#", "ip_address": "#ip_address#", "date_creation": "#date_creation#", } }
Node | Description |
---|---|
Identifiers | |
comment_tokenstring, uuid-v4
|
Identifier of the comment for which the vote was left for. Example: e570f17a-f018-49f2-be95-35dd31105c93 |
author_tokenstring, uuid-v4
|
Identifier of the author who casted the vote. Example: e570f17a-f018-49f2-be95-35dd31105c93 |
Vote Metadata | |
directionstring, predefined
|
The direction of this vote. May either be up or down .Example: up |
ip_addressstring, IPv4
|
IP address that was used to leave the vote. Example: 172.16.0.1 |
date_creationstring, RFC 2822
|
Date indicating when the vote was left. Example: Wed, 14 Mar 2018 14:19:49 +0100 |