social.coves.feed.vote.create

Create or toggle a vote on a post or comment. If a vote in the same direction exists, it will be removed (toggled off). If a vote in the opposite direction exists, it will be replaced.

Repository @coves.social did:web:coves.social namespace authority
Details · procedure
Kindprocedure
Authorityvote.feed.coves.social
Indexed

Procedure

procedure · POST

Input

application/json

direction

requiredstring

Vote direction: up for upvote, down for downvote

  • maxLength: 64
  • knownValues: up | down

subject

requiredref

Strong reference to the post or comment being voted on

Output

application/json

cid

string · cid

CID of the created vote. Absent if the vote was toggled off.

uri

string · at-uri

AT-URI of the created vote. Absent if the vote was toggled off.

Errors

NotAuthorized

User is not authorized to vote on this content

InvalidSubject

The subject reference is invalid or malformed

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • Record declaring a vote (upvote or downvote) on a post or comment. Requires authentication.

  • Delete a vote on a post or comment

  • site.filae.agora.vote

    record not from the namespace authority

    An upvote or downvote on a post or comment

  • cc.coffeencode.forum.vote

    record not from the namespace authority

    An upvote or downvote on a post or reply. Indexers should keep the latest vote per (author, subject).

  • One vote per member per subject: the rkey is derived from the subject URI, so a changed vote is a putRecord and an unvote a deleteRecord.