Vai al contenuto

database_api.list_proposal_votes ​

Purpose ​

Restituisce tutti i voti sulle proposte (proposal vote), a partire dal votante indicato o da proposal.id. Parametri: start:array; limit:int; order:string; order_direction:string; status:string

  • start dipende da order (vedere sotto)
    • voter - votante della proposta (stringa nome account)
    • proposal.id - id della proposta (int)
  • limit è fino a 1000.
  • order può essere uno tra:
    • by_voter_proposal - ordina per votante della proposta
    • by_proposal_voter - ordina per proposal.id
  • order_direction può essere uno tra:
    • ascending
    • descending
  • status
    • all
    • inactive
    • active
    • expired
    • votable
start (array)limit (int)order (string)order_direction (string)status (string)
["alice"]10by_voter_proposalascendingactiveelenca 10 proposte con stato active, ordinate per votante, in ordine ascendente
[10]1000by_proposal_voterascendingvotableelenca 1000 voti sulla proposta 10, ordinati per proposal.id, in ordine ascendente

Vedere anche: Paginated API Methods

Parameters ​

PARAMETERS
json
{
  "start": null,
  "limit": 0,
  "order": "by_name",
  "order_direction": "ascending",
  "status": "all"
}

Example ​

Example 1 ​

BASH
bash
curl -s https://api.steemit.com \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "jsonrpc": "2.0",
    "method": "database_api.list_proposal_votes",
    "params": {
      "start": [
        ""
      ],
      "limit": 10,
      "order": "by_voter_proposal",
      "order_direction": "ascending",
      "status": "active"
    },
    "id": 1
  }'

Example 2 ​

BASH
bash
curl -s https://api.steemit.com \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "jsonrpc": "2.0",
    "method": "database_api.list_proposal_votes",
    "params": {
      "start": [
        0
      ],
      "limit": 10,
      "order": "by_proposal_voter",
      "order_direction": "ascending",
      "status": "active"
    },
    "id": 1
  }'

Response ​

RESPONSE
json
{
  "proposal_votes": [
    {
      "id": 0,
      "voter": "charlie",
      "proposal": {
        "id": 0,
        "proposal_id": 0,
        "creator": "alice",
        "receiver": "bob",
        "start_date": "2019-07-01T00:00:00",
        "end_date": "2019-08-01T23:59:59",
        "daily_pay": {
          "amount": "4800000",
          "precision": 3,
          "nai": "@@000000013"
        },
        "subject": "My Proposal",
        "permlink": "creator-proposal-permlink",
        "total_votes": "77351826710",
        "status": "active"
      }
    }
  ]
}