pub.chive.governance.getUserVote

chive.pub

Documentation

Get a user's vote on a specific proposal, if they have voted

main query

Get a user's vote on a specific proposal, if they have voted

Parameters

proposalId string Required

Proposal identifier

userDid string did Required

User DID

Output

Encodingapplication/json
vote union Required

Vote if found, or null

Errors

NotFound
Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://api.bsky.social)
Parameters
Proposal identifier
User DID
View raw schema
{
  "type": "query",
  "errors": [
    {
      "name": "NotFound"
    }
  ],
  "output": {
    "schema": {
      "type": "object",
      "required": [
        "vote"
      ],
      "properties": {
        "vote": {
          "refs": [
            "#voteView"
          ],
          "type": "union",
          "description": "Vote if found, or null"
        }
      }
    },
    "encoding": "application/json"
  },
  "parameters": {
    "type": "params",
    "required": [
      "proposalId",
      "userDid"
    ],
    "properties": {
      "userDid": {
        "type": "string",
        "format": "did",
        "description": "User DID"
      },
      "proposalId": {
        "type": "string",
        "description": "Proposal identifier"
      }
    }
  },
  "description": "Get a user's vote on a specific proposal, if they have voted"
}
voteView object

View of a vote on a proposal

Properties

cid string Required

Content identifier

createdAt string datetime Required

Vote timestamp

id string Required

Vote identifier

proposalUri string at-uri Required

Proposal AT-URI

rationale string Optional

Vote rationale

uri string at-uri Required

Vote AT-URI

vote string Required

Vote value

Known values: approve, reject, abstain, request-changes
voterDid string did Required

Voter DID

voterRole string Required

Voter governance role

Known values: community-member, reviewer, domain-expert, administrator
weight integer Required

Weighted vote value (scaled by 1000 for 0.0-1.0 range)

minimum: 0maximum: 1000
View raw schema
{
  "type": "object",
  "required": [
    "id",
    "uri",
    "cid",
    "proposalUri",
    "voterDid",
    "voterRole",
    "vote",
    "weight",
    "createdAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Vote identifier"
    },
    "cid": {
      "type": "string",
      "description": "Content identifier"
    },
    "uri": {
      "type": "string",
      "format": "at-uri",
      "description": "Vote AT-URI"
    },
    "vote": {
      "type": "string",
      "description": "Vote value",
      "knownValues": [
        "approve",
        "reject",
        "abstain",
        "request-changes"
      ]
    },
    "weight": {
      "type": "integer",
      "maximum": 1000,
      "minimum": 0,
      "description": "Weighted vote value (scaled by 1000 for 0.0-1.0 range)"
    },
    "voterDid": {
      "type": "string",
      "format": "did",
      "description": "Voter DID"
    },
    "createdAt": {
      "type": "string",
      "format": "datetime",
      "description": "Vote timestamp"
    },
    "rationale": {
      "type": "string",
      "description": "Vote rationale"
    },
    "voterRole": {
      "type": "string",
      "description": "Voter governance role",
      "knownValues": [
        "community-member",
        "reviewer",
        "domain-expert",
        "administrator"
      ]
    },
    "proposalUri": {
      "type": "string",
      "format": "at-uri",
      "description": "Proposal AT-URI"
    }
  },
  "description": "View of a vote on a proposal"
}

Lexicon Garden

@