database_api.list_proposal_votes
Purpose
返回全部提案(proposal)投票(vote),从指定的投票者或 proposal.id 开始。参数:start:array;limit:int;order:string;order_direction:string;status:string
start取决于order(见下文)voter- 提案的投票者(账户名字符串)proposal.id- 提案的 id(int)
limit最大 1000。order可取以下值:by_voter_proposal- 按提案投票者排序by_proposal_voter- 按proposal.id排序
order_direction可取以下值:ascendingdescending
statusallinactiveactiveexpiredvotable
start (array) | limit (int) | order (string) | order_direction (string) | status (string) | |
|---|---|---|---|---|---|
["alice"] | 10 | by_voter_proposal | ascending | active | 列出 10 条 active 状态的提案,按投票者升序排列 |
[10] | 1000 | by_proposal_voter | ascending | votable | 列出提案 10 的 1000 条投票,按 proposal.id 升序排列 |
另见: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"
}
}
]
}