Перейти к содержимому

database_api.list_votes ​

Purpose ​

Возвращает все голоса (vote), начиная с указанного голосующего и/или автора с пермалинком (permlink). Параметры: start:array; limit:int; order:string

  • start зависит от order (см. ниже)
    • voter - необязательный
    • author и permlink - необязательные, но если один из них пуст, оба должны быть пустыми
  • limit - до 1000.
  • order может быть одним из:
    • by_comment_voter - упорядочение по голосующему за комментарий
      • start - массив из трёх необязательных значений: author, permlink, voter
    • by_voter_comment - упорядочение по голосующему и комментарию
      • start - массив из трёх необязательных значений: voter, author, permlink

| start (array) | limit (int) | order (string) | | |----------------------------|---------------|-| | ["", "", ""] | 10 | "by_comment_voter" | Запрос первых 10 голосов, сортировка по голосующему за комментарий | | ["", "", ""] | 10 | "by_voter_comment" | Запрос первых 10 голосов, сортировка по голосующему и комментарию | | ["xeroc", "vanteem-config", ""] | 10 | "by_comment_voter" | Запрос следующих 10 голосов начиная с поста (post) @xeroc/vanteem-config, сортировка по голосующему за комментарий | | ["alice", "xeroc", "vanteem-config"] | 10 | "by_voter_comment" | Запрос следующих 10 голосов начиная с alice по посту @xeroc/vanteem-config, сортировка по голосующему и комментарию |

См. также: 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
    }
  ]
}