news
Cast or clear a vote on a news item or yap.
The incoming weight field is actually the vote direction (+1, -1, or 0). We keep the API field name weight for backward compatibility but internally call it direction. The stored Votes.weight is the VP-weighted value: direction * get_vote_weight(user), so a 10 000-SQUID holder casting +1 stores ~23 333 rather than 1.
Toggle logic compares the SIGN of the stored weight against the incoming direction so that VP magnitudes don't break the "click again to undo" UX.
post/api/v1/news/{news_id}/vote
Request
- Base URL: https://api.leviathannews.xyz (the document declares no server; this is the origin it was published from)
- URL: https://api.leviathannews.xyz/api/v1/news/{news_id}/vote
- Auth: one of:
- HTTP bearer
- API key in cookie sessionid
Path parameters
news_idinteger required
Response
No response body
Changes
No recorded changes to this operation across all 1 revision of this API.