Aller au contenu

condenser_api.list_proposals ​

Purpose ​

Retourne toutes les propositions (proposal), à partir du créateur ou de la date de début spécifiés. Paramètres : start:array ; limit:int ; order:string ; order_direction:string ; status:string

  • start dépend de order (voir ci-dessous)
    • creator - créateur de la proposition (nom de compte sous forme de chaîne)
    • start_date - date de début de la proposition (chaîne date)
    • end_date - date de fin de la proposition (chaîne date)
    • total_votes - nombre total de votes de la proposition (int)
  • limit est limité à 1000.
  • order peut être l'un des suivants :
    • by_creator - tri par créateur de la proposition
    • by_start_date - tri par date de début de la proposition
    • by_end_date - tri par date de fin de la proposition
    • by_total_votes - tri par nombre total de votes de la proposition
  • order_direction peut être l'un des suivants :
    • ascending
    • descending
  • status
    • all
    • inactive
    • active
    • expired
    • votable
start (array)limit (int)order (string)order_direction (string)status (string)
[""]10by_creatorascendingactiveliste 10 propositions avec le statut actif, triées par créateur, ordre croissant
["2019-08-07T16:54:03"]1000by_start_dateascendinginactiveliste 1000 propositions avec le statut inactif, triées par date de début, ordre croissant, depuis 2019-08-07T16:54:03
["a"]1by_creatorascendingexpiredliste 1 proposition avec le statut expiré, triée par créateur, ordre croissant, pour les comptes commençant par "a"
["alice"]10by_creatorascendingallliste 10 propositions avec n'importe quel statut, triées par créateur, ordre croissant, pour alice
[""]1000by_creatorascendingvotableliste 1000 propositions votables, triées par créateur, ordre croissant
[10]1000by_total_votesascendingvotableliste 1000 propositions votables, triées par créateur, ordre croissant, ayant au moins 10 votes

Voir aussi : 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"
  }
]