Aller au contenu

database_api.list_votes ​

Purpose ​

Retourne tous les votes (vote), à partir du votant et/ou de l'auteur avec le permlink (lien permanent) spécifiés. Paramètres : start:array ; limit:int ; order:string

  • start dépend de order (voir ci-dessous)
    • voter est facultatif
    • author et permlink sont facultatifs, mais si l'un est vide, les deux doivent être vides
  • limit est limité à 1000.
  • order peut être l'un des suivants :
    • by_comment_voter - tri par votant du commentaire (comment voter)
      • start est un tableau de trois valeurs facultatives : author, permlink, voter
    • by_voter_comment - tri par votant et commentaire
      • start est un tableau de trois valeurs facultatives : voter, author, permlink

| start (array) | limit (int) | order (string) | | |----------------------------|---------------|-| | ["", "", ""] | 10 | "by_comment_voter" | Interroge les 10 premiers votes, tri par votant du commentaire | | ["", "", ""] | 10 | "by_voter_comment" | Interroge les 10 premiers votes, tri par votant et commentaire | | ["xeroc", "vanteem-config", ""] | 10 | "by_comment_voter" | Interroge les 10 votes suivants à partir du post (publication) @xeroc/vanteem-config, tri par votant du commentaire | | ["alice", "xeroc", "vanteem-config"] | 10 | "by_voter_comment" | Interroge les 10 votes suivants à partir de alice sur le post @xeroc/vanteem-config, tri par votant et commentaire |

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