condenser_api.list_proposals
Purpose
返回全部提案(proposal),从指定的创建者或开始日期开始。参数:start:array;limit:int;order:string;order_direction:string;status:string
start取决于order(见下文)creator- 提案的创建者(账户名字符串)start_date- 提案的开始日期(日期字符串)end_date- 提案的结束日期(日期字符串)total_votes- 提案的总票数(int)
limit最大 1000。order可取以下值:by_creator- 按提案创建者排序by_start_date- 按提案开始日期排序by_end_date- 按提案结束日期排序by_total_votes- 按提案总票数排序
order_direction可取以下值:ascendingdescending
statusallinactiveactiveexpiredvotable
start (array) | limit (int) | order (string) | order_direction (string) | status (string) | |
|---|---|---|---|---|---|
[""] | 10 | by_creator | ascending | active | 列出 10 条 active 状态的提案,按创建者升序排列 |
["2019-08-07T16:54:03"] | 1000 | by_start_date | ascending | inactive | 列出自 2019-08-07T16:54:03 起 inactive 状态的 1000 条提案,按开始日期升序排列 |
["a"] | 1 | by_creator | ascending | expired | 列出以 "a" 开头账户的 1 条 expired 状态提案,按创建者升序排列 |
["alice"] | 10 | by_creator | ascending | all | 列出 alice 的 10 条任意状态提案,按创建者升序排列 |
[""] | 1000 | by_creator | ascending | votable | 列出 1000 条 votable 状态的提案,按创建者升序排列 |
[10] | 1000 | by_total_votes | ascending | votable | 列出至少有 10 票的 1000 条 votable 状态提案,按创建者升序排列 |
另见:datbase_api.list_proposals
Parameters
PARAMETERS
json
[
[],
0,
"by_name",
"ascending",
"all"
]Example
Example 1
BASH
bash
curl -s https://api.steemit.com \
-H 'Content-Type: application/json' \
--data-binary '{
"jsonrpc": "2.0",
"method": "condenser_api.list_proposals",
"params": [
[
""
],
10,
"by_creator",
"ascending",
"active"
],
"id": 1
}'Example 2
BASH
bash
curl -s https://api.steemit.com \
-H 'Content-Type: application/json' \
--data-binary '{
"jsonrpc": "2.0",
"method": "condenser_api.list_proposals",
"params": [
[
"2019-08-07T16:54:03"
],
1000,
"by_start_date",
"ascending",
"inactive"
],
"id": 1
}'Example 3
BASH
bash
curl -s https://api.steemit.com \
-H 'Content-Type: application/json' \
--data-binary '{
"jsonrpc": "2.0",
"method": "condenser_api.list_proposals",
"params": [
[
"a"
],
1,
"by_creator",
"ascending",
"expired"
],
"id": 1
}'Example 4
BASH
bash
curl -s https://api.steemit.com \
-H 'Content-Type: application/json' \
--data-binary '{
"jsonrpc": "2.0",
"method": "condenser_api.list_proposals",
"params": [
[
"alice"
],
10,
"by_creator",
"ascending",
"all"
],
"id": 1
}'Example 5
BASH
bash
curl -s https://api.steemit.com \
-H 'Content-Type: application/json' \
--data-binary '{
"jsonrpc": "2.0",
"method": "condenser_api.list_proposals",
"params": [
[
""
],
1000,
"by_creator",
"ascending",
"votable"
],
"id": 1
}'Example 6
BASH
bash
curl -s https://api.steemit.com \
-H 'Content-Type: application/json' \
--data-binary '{
"jsonrpc": "2.0",
"method": "condenser_api.list_proposals",
"params": [
[
10
],
1000,
"by_total_votes",
"ascending",
"votable"
],
"id": 1
}'Response
RESPONSE
json
[
{
"id": 0,
"proposal_id": "1103806595072",
"creator": "alice",
"receiver": "bob",
"start_date": "2019-07-01T00:00:00",
"end_date": "2019-08-01T23:59:59",
"daily_pay": "4800.000 SBD",
"subject": "My Proposal",
"permlink": "creator-proposal-permlink",
"total_votes": "77351826710",
"status": "active"
}
]