Viewing a response to: @felixxx/could-not-find-method-getblockrange
You were using method:call which is pre-appbase style of calling stuff (should be deprecated in 2018 or so), In link that you have provided: https://developers.hive.io/apidefinitions/#block_api.get_block_range Examples are working one, take a look this: ``` curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block_range", "params":{"starting_block_num": 1, "count": 3}, "id":42}' https://gtg.openhive.network ```
author | gtg |
---|---|
permlink | qzskw5 |
category | hive-dev |
json_metadata | {"links":["https://developers.hive.io/apidefinitions/#block_api.get_block_range"],"app":"hiveblog/0.1"} |
created | 2021-09-21 16:09:42 |
last_update | 2021-09-21 16:09:42 |
depth | 1 |
children | 5 |
last_payout | 2021-09-28 16:09:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 420 |
author_reputation | 461,812,694,713,691 |
root_title | "Could not find method get_block_range" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 106,459,239 |
net_rshares | 0 |
Believe it or not: I spent the whole morning looking at that example, trying to figure out how I could make that work for me. Thanks for nothing.
author | felixxx |
---|---|
permlink | re-gtg-qzsl8a |
category | hive-dev |
json_metadata | {"tags":["hive-dev"],"app":"peakd/2021.09.1"} |
created | 2021-09-21 16:17:00 |
last_update | 2021-09-21 16:17:00 |
depth | 2 |
children | 4 |
last_payout | 2021-09-28 16:17:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 146 |
author_reputation | 217,880,366,374,124 |
root_title | "Could not find method get_block_range" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 106,459,373 |
net_rshares | 0 |
For future reference - jsonrpc is basically a POST request with JSON body, so anytime you want to port those examples from `curl` to `fetch`, `axios`, or whatever request library you're using, just copy the body from example: I.e change this: ``` curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block_range", "params":{"starting_block_num": 1, "count": 3}, "id":42}' https://api.openhive.network ``` Into this: ``` <html> <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> <script> axios.post('https://api.openhive.network', {"jsonrpc":"2.0", "method":"block_api.get_block_range", "params":{"starting_block_num": 1, "count": 3}, "id":42}).then((result) => console.log(result.data)) </script> </html> ``` You can also use `hive-js` or `dhive` (although I'm not sure they support get_block_range request out-of-the-box).
author | engrave |
---|---|
permlink | re-felixxx-qzt13y |
category | hive-dev |
json_metadata | {"tags":["hive-dev"],"app":"peakd/2021.09.1"} |
created | 2021-09-21 22:00:00 |
last_update | 2021-09-21 22:00:00 |
depth | 3 |
children | 3 |
last_payout | 2021-09-28 22:00:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 863 |
author_reputation | 318,719,797,600,724 |
root_title | "Could not find method get_block_range" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 106,465,402 |
net_rshares | 0 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
anddumbcunts | 0 | 0 | -0.1% |
hive-js and dhive do not support get_block_range, otherwise, I would not be in this mess. I am not trying to build my own library, but I kinda have to. ...everything's working for now. Thanks!
author | felixxx |
---|---|
permlink | re-engrave-qztnnp |
category | hive-dev |
json_metadata | {"tags":["hive-dev"],"app":"peakd/2021.09.1"} |
created | 2021-09-22 06:07:00 |
last_update | 2021-09-22 06:07:00 |
depth | 4 |
children | 2 |
last_payout | 2021-09-29 06:07:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 193 |
author_reputation | 217,880,366,374,124 |
root_title | "Could not find method get_block_range" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 106,472,934 |
net_rshares | 0 |