Ir al contenido

database_api.list_comments ​

Purpose ​

Devuelve todos los comentarios (comment), empezando por las opciones especificadas. Parámetros: start:array; limit:int; order:string

  • start depende de order (ver más abajo)
  • limit es hasta 1000.
  • order puede ser uno de:
    • by_cashout_time - ordenar por hora de cobro (cashout time)
      • start es un array de un valor obligatorio y dos opcionales: timestamp, author, permlink
    • by_permlink - ordenar por permlink
      • start es un array de dos valores opcionales: author, permlink
    • by_root - ordenar por raíz (root)
      • start es un array de dos valores obligatorios y dos opcionales: root_author, root_permlink, child_author, child_permlink
    • by_parent - ordenar por padre (parent)
      • start es un array de dos valores obligatorios y dos opcionales: parent_author, parent_permlink, child_author, child_permlink

| start (array) | limit (int) | order (string) | | |----------------------------|---------------|-| | ["1970-01-01T00:00:00", "", ""] | 10 | "by_cashout_time" | Consulta los primeros 10 comentarios, ordenados por hora de cobro | | ["", ""] | 10 | "by_permlink" | Consulta los primeros 10 comentarios, ordenados por permlink | | ["steemit","firstpost", "", ""] | 10 | "by_root" | Consulta los siguientes 10 comentarios empezando en @steemit/firstpost, ordenados por raíz | | ["steemit","firstpost", "", ""] | 10 | "by_parent" | Consulta los siguientes 10 comentarios empezando en @steemit/firstpost, ordenados por padre |

Véase también: Paginated API Methods

Parameters ​

PARAMETERS
json
{
  "start": null,
  "limit": 0,
  "order": "by_name"
}

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_comments",
    "params": {
      "start": [
        "1970-01-01T00:00:00",
        "",
        ""
      ],
      "limit": 10,
      "order": "by_cashout_time"
    },
    "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_comments",
    "params": {
      "start": [
        "",
        ""
      ],
      "limit": 10,
      "order": "by_permlink"
    },
    "id": 1
  }'

Example 3 ​

BASH
bash
curl -s https://api.steemit.com \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "jsonrpc": "2.0",
    "method": "database_api.list_comments",
    "params": {
      "start": [
        "steemit",
        "firstpost",
        "",
        ""
      ],
      "limit": 10,
      "order": "by_root"
    },
    "id": 1
  }'

Example 4 ​

BASH
bash
curl -s https://api.steemit.com \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "jsonrpc": "2.0",
    "method": "database_api.list_comments",
    "params": {
      "start": [
        "steemit",
        "firstpost",
        "",
        ""
      ],
      "limit": 10,
      "order": "by_parent"
    },
    "id": 1
  }'

Response ​

RESPONSE
json
{
  "comments": [
    {
      "id": 66710716,
      "author": "libert",
      "permlink": "libert-re-runicar-re-libert-libert-re-runicar-re-libert-libert-re-runicar-ykwyxgj6-20181128t063355338z",
      "category": "steem",
      "parent_author": "runicar",
      "parent_permlink": "re-libert-libert-re-runicar-re-libert-libert-re-runicar-ykwyxgj6-20181128t063100538z",
      "title": "",
      "body": "13\n\nPosted using [Partiko Android](https://steemit.com/@partiko-android)",
      "json_metadata": "{\"app\":\"partiko\"}",
      "last_update": "2018-11-28T06:33:57",
      "created": "2018-11-28T06:33:57",
      "active": "2018-11-28T06:34:30",
      "last_payout": "1970-01-01T00:00:00",
      "depth": 5,
      "children": 1,
      "net_rshares": 0,
      "abs_rshares": 0,
      "vote_rshares": 0,
      "children_abs_rshares": 0,
      "cashout_time": "2018-12-05T06:33:57",
      "max_cashout_time": "1969-12-31T23:59:59",
      "total_vote_weight": 0,
      "reward_weight": 10000,
      "total_payout_value": {
        "amount": "0",
        "precision": 3,
        "nai": "@@000000013"
      },
      "curator_payout_value": {
        "amount": "0",
        "precision": 3,
        "nai": "@@000000013"
      },
      "author_rewards": 0,
      "net_votes": 0,
      "root_author": "runicar",
      "root_permlink": "ykwyxgj6",
      "max_accepted_payout": {
        "amount": "1000000000",
        "precision": 3,
        "nai": "@@000000013"
      },
      "percent_steem_dollars": 10000,
      "allow_replies": true,
      "allow_votes": true,
      "allow_curation_rewards": true,
      "beneficiaries": []
    }
  ]
}