Vote
Voting on a post or a comment is done via the following endpoint.
POST: https://api.scored.co/api/v2/action/vote
Parameters
The following parameters are valid.
Value | Type | Required | Description |
---|---|---|---|
id | int | true | id of requested post |
type | string | true | "true" (post) or "false" (comment) |
direction | boolean | true | upvote (true) or downvote (false) |
For clarify, if you are voting on a post, your type
parameter should be true
. If you are voting on a comment, the value should be false
.
type
should never be set to post
or comment
.