Vai al contenuto

condenser_api.list_proposals ​

Purpose ​

Restituisce tutte le proposte (proposal), a partire dal creatore indicato o dalla data di inizio. Parametri: start:array; limit:int; order:string; order_direction:string; status:string

  • start dipende da order (vedere sotto)
    • creator - creatore della proposta (stringa nome account)
    • start_date - data di inizio della proposta (stringa data)
    • end_date - data di fine della proposta (stringa data)
    • total_votes - voti totali della proposta (int)
  • limit è fino a 1000.
  • order può essere uno tra:
    • by_creator - ordina per creatore della proposta
    • by_start_date - ordina per data di inizio della proposta
    • by_end_date - ordina per data di fine della proposta
    • by_total_votes - ordina per voti totali della proposta
  • order_direction può essere uno tra:
    • ascending
    • descending
  • status
    • all
    • inactive
    • active
    • expired
    • votable
start (array)limit (int)order (string)order_direction (string)status (string)
[""]10by_creatorascendingactiveelenca 10 proposte con stato active, ordinate per creatore, in ordine ascendente
["2019-08-07T16:54:03"]1000by_start_dateascendinginactiveelenca 1000 proposte con stato inactive, ordinate per data di inizio, in ordine ascendente, dal 2019-08-07T16:54:03
["a"]1by_creatorascendingexpiredelenca 1 proposta con stato expired, ordinata per creatore, in ordine ascendente, per gli account che iniziano per "a"
["alice"]10by_creatorascendingallelenca 10 proposte con qualsiasi stato, ordinate per creatore, in ordine ascendente, per alice
[""]1000by_creatorascendingvotableelenca 1000 proposte votabili, ordinate per creatore, in ordine ascendente
[10]1000by_total_votesascendingvotableelenca 1000 proposte votabili, ordinate per creatore, in ordine ascendente, con almeno 10 voti

Vedere anche: 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"
  }
]