我正在尝试在Google工作表上导入ImportJson函数,以获取其最新BTC价格的公共信息。
但是,我无法使其正常运行。
以下是他们的公共Json格式Http请求URL: https://bitbns.com/order/getTickerWithVolume/
以下是我正在尝试的ImportJSON函数:
=importJSON("https://bitbns.com/order/getTickerWithVolume","/BTC","0.last_traded_price")
请注意:我已经在Google表格中安装了IMPORTJSON脚本,并且能够从其他Public API地址提取数据。
答案 0 :(得分:0)
Widget AttachmentWidget(List<Attachment> attachmentmodel)
{
int listsize=attachmentmodel.length;
return Container(
height: 200,
child: ListView.builder(itemCount: listsize,
itemBuilder: (context,index)
{
return listsize>=5 ? Text('morethan 5 attachments') : Text('less than 5 attachments');
}),
);
}
的URL中检索"attachment": [
{
"id": 42,
"news_feed_id": 283,
"path": "imagepath",
"ext": "png",
"created_at": "2020-03-19 10:22:26",
"updated_at": null,
"deleted_at": null
},
{
"id": 43,
"news_feed_id": 283,
"path": "imagepathf",
"ext": "png",
"created_at": "2020-03-19 10:22:27",
"updated_at": null,
"deleted_at": null
},
{
"id": 44,
"news_feed_id": 283,
"path": "imagepath40a4",
"ext": "png",
"created_at": "2020-03-19 10:22:27",
"updated_at": null,
"deleted_at": null
},
{
"id": 45,
"news_feed_id": 283,
"path": "image path",
"ext": "png",
"created_at": "2020-03-19 10:22:27",
"updated_at": null,
"deleted_at": null
}
],
对象中class Attachment {
int id;
int newsFeedId;
String path;
dynamic ext;
DateTime createdAt;
dynamic updatedAt;
dynamic deletedAt;
Attachment({
this.id,
this.newsFeedId,
this.path,
this.ext,
this.createdAt,
this.updatedAt,
this.deletedAt,
});
factory Attachment.fromJson(Map<String, dynamic> json) => Attachment(
id: json["id"],
newsFeedId: json["news_feed_id"],
path: json["path"],
ext: json["ext"],
createdAt: DateTime.parse(json["created_at"]),
updatedAt: json["updated_at"],
deletedAt: json["deleted_at"],
);
Map<String, dynamic> toJson() => {
"id": id,
"news_feed_id": newsFeedId,
"path": path,
"ext": ext,
"created_at": createdAt.toIso8601String(),
"updated_at": updatedAt,
"deleted_at": deletedAt,
};
}
的值。我可以像上面那样理解。如果我的理解是正确的,那么这个答案呢?请认为这只是几个可能的答案之一。
SipHeader sipHeader = SipHeader();
sipHeader.hName = "Subject";
sipHeader.hValue = "34020000001320000001:0,34020000002000000001:0";
SipHeaderVector sipHeaderVector = SipHeaderVector();
sipHeaderVector.push_back(sipHeader);
SipTxOption sipTxOption = SipTxOption();
sipTxOption.headers = sipHeaderVector;
prm.txOption = sipTxOption;
last_traded_price
放在单元格“ A1”中。BTC
被用作路径。https://bitbns.com/order/getTickerWithVolume/
的对象中检索=importJSON(A1,"/BTC/last_traded_price", "noInherit,noTruncate,noHeaders")
的最新值。当我看到https://bitbns.com/order/getTickerWithVolume
的对象时,发现数组的第一个索引是最新值。这样,下面的示例公式如何?
/BTC/last_traded_price
p
放在单元格“ A1”中。