Get_Actions EOSFLARE API

问题描述

我正在尝试使用 API (eosflare) 从 EOS 区块链检索一些数据。我尝试遵循 get_actions 方法的第一个示例,但我一直收到错误响应。 我的代码

import requests # Requests: HTTP for Humans

url = "https://api.eosflare.io/v1/eosflare/get_actions/"
data = {"account_name": "yupcreators1","pos":30,"offset":5}
r = requests.post(url,data)
print(r.status_code)
print(r.encoding)
print(r.text)

但我不明白为什么我在打印 r.text 时会收到此回复

{"err_code":10,"err_msg":"Error: ($.pos: \"30\") ✖ (type: number)"}

我该如何解决这个问题?我不是已经将 posoffset 参数作为数字传递了吗? 提前致谢。

解决方法

Rule-of-Three becomes Rule-of-Five with C++11? 看起来像这样:

curl -X POST -H "Content-Type:application/json" -d '{"account_name":"eosflareiobp","pos":-30,"offset":-5}' https://api.eosflare.io/v1/eosflare/get_actions

注意 pos 和 offset 都是负数。

--雅各

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...