Aller au contenu

database_api.list_proposal_votes ​

Purpose ​

Retourne tous les votes pour les propositions (proposal vote), à partir du votant ou du proposal.id spécifiés. Paramètres : start:array ; limit:int ; order:string ; order_direction:string ; status:string

  • start dépend de order (voir ci-dessous)
    • voter - votant de la proposition (nom de compte sous forme de chaîne)
    • proposal.id - identifiant de la proposition (int)
  • limit est limité à 1000.
  • order peut être l'un des suivants :
    • by_voter_proposal - tri par votant de la proposition
    • by_proposal_voter - tri par proposal.id
  • order_direction peut être l'un des suivants :
    • ascending
    • descending
  • status
    • all
    • inactive
    • active
    • expired
    • votable
start (array)limit (int)order (string)order_direction (string)status (string)
["alice"]10by_voter_proposalascendingactiveliste 10 propositions avec le statut actif, triées par votant, ordre croissant
[10]1000by_proposal_voterascendingvotableliste 1000 votes sur la proposition 10, triés par proposal.id, ordre croissant

Voir aussi : 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"
      }
    }
  ]
}