Vai al contenuto

database_api.list_votes ​

Purpose ​

Restituisce tutti i voti (vote), a partire dal votante indicato e/o dall’autore e permlink indicati. Parametri: start:array; limit:int; order:string

  • start dipende da order (vedere sotto)
    • voter è facoltativo
    • author e permlink sono facoltativi, ma se uno è vuoto, entrambi devono essere vuoti
  • limit è fino a 1000.
  • order può essere uno tra:
    • by_comment_voter - ordina per commento-votante
      • start è un array di tre valori facoltativi: author, permlink, voter
    • by_voter_comment - ordina per votante-commento
      • start è un array di tre valori facoltativi: voter, author, permlink

| start (array) | limit (int) | order (string) | | |----------------------------|---------------|-| | ["", "", ""] | 10 | "by_comment_voter" | Interroga i primi 10 voti, ordina per commento-votante | | ["", "", ""] | 10 | "by_voter_comment" | Interroga i primi 10 voti, ordina per votante-commento | | ["xeroc", "vanteem-config", ""] | 10 | "by_comment_voter" | Interroga i successivi 10 voti a partire dal post @xeroc/vanteem-config, ordina per commento-votante | | ["alice", "xeroc", "vanteem-config"] | 10 | "by_voter_comment" | Interroga i successivi 10 voti a partire da alice sul post @xeroc/vanteem-config, ordina per votante-commento |

Vedere anche: Paginated API Methods

Parameters ​

PARAMETERS
json
{
  "start": [
    "",
    "",
    ""
  ],
  "limit": 10,
  "order": "by_comment_voter"
}

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_votes",
    "params": {
      "start": [
        "",
        "",
        ""
      ],
      "limit": 10,
      "order": "by_comment_voter"
    },
    "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_votes",
    "params": {
      "start": [
        "",
        "",
        ""
      ],
      "limit": 10,
      "order": "by_voter_comment"
    },
    "id": 1
  }'

Example 3 ​

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

Example 4 ​

BASH
bash
curl -s https://api.steemit.com \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "jsonrpc": "2.0",
    "method": "database_api.list_votes",
    "params": {
      "start": [
        "alice",
        "xeroc",
        "vanteem-config"
      ],
      "limit": 10,
      "order": "by_voter_comment"
    },
    "id": 1
  }'

Response ​

RESPONSE
json
{
  "votes": [
    {
      "id": 9,
      "voter": "dantheman",
      "author": "steemit",
      "permlink": "firstpost",
      "weight": "32866333630",
      "rshares": 375241,
      "vote_percent": 100,
      "last_update": "2016-04-07T19:15:36",
      "num_changes": -1
    }
  ]
}