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" | 查询从帖子 @xeroc/vanteem-config 起的下 10 条投票,按评论投票者排序 | | ["alice", "xeroc", "vanteem-config"] | 10 | "by_voter_comment" | 查询从帖子 @xeroc/vanteem-config 上 alice 起的下 10 条投票,按投票者评论排序 |
另见: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
}
]
}