跳到正文

condenser_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 可取以下值:
    • ascending
    • descending
  • status
    • all
    • inactive
    • active
    • expired
    • votable
start (array)limit (int)order (string)order_direction (string)status (string)
["alice"]10by_voter_proposalascendingactive列出 10 条 active 状态的提案,按投票者升序排列
[10]1000by_proposal_voterascendingvotable列出提案 10 的 1000 条投票,按 proposal.id 升序排列

另见: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_proposal_votes",
    "params": [
      [
        ""
      ],
      10,
      "by_voter_proposal",
      "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_proposal_votes",
    "params": [
      [
        0
      ],
      10,
      "by_proposal_voter",
      "ascending",
      "active"
    ],
    "id": 1
  }'

Response ​

RESPONSE
json
[
  {
    "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"
    }
  }
]