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
cid bafyreieuk4seoxbwignvmhlpaxdkbtrwrwqbhiocypfqn5q5q6mqunlkrm

Checks

Valid Lint pass
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "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.",
      "errors": [
        {
          "description": "User is not authorized to vote on this content",
          "name": "NotAuthorized"
        },
        {
          "description": "The subject reference is invalid or malformed",
          "name": "InvalidSubject"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "direction": {
              "description": "Vote direction: up for upvote, down for downvote",
              "knownValues": [
                "up",
                "down"
              ],
              "maxLength": 64,
              "type": "string"
            },
            "subject": {
              "description": "Strong reference to the post or comment being voted on",
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            }
          },
          "required": [
            "subject",
            "direction"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cid": {
              "description": "CID of the created vote. Absent if the vote was toggled off.",
              "format": "cid",
              "type": "string"
            },
            "uri": {
              "description": "AT-URI of the created vote. Absent if the vote was toggled off.",
              "format": "at-uri",
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "social.coves.feed.vote.create",
  "lexicon": 1
}