初学者指南:API JSON – 尝试理解URL输出

huangapple go评论76阅读模式
英文:

Beginner to API Json - Attempting to understand URL output

问题

我正在使用 FME 从以下网址获取输出:https://coronavirus.data.gov.uk/developers-guide

我只是一个初学者,这是我第一次想要编写这个。要从中生成一个带有相关列的输出 URL,有人可以解释一下我需要获取什么样的请求 URL 吗?我使用 GET 作为 HTTP 方法。

我从中获取数据的一个示例 URL 是 - https://soa.smext.faa.gov/asws/api/airport/status/SFO

但是当我尝试使用下面的链接进行测试时,并没有获得任何输出 https://api.coronavirus.data.gov.uk/v1/data?filters=areaType=nation;areaName=england&structure=%7B%22name%22:%22areaName%22%7D

英文:

I am using FME to get output from the following: https://coronavirus.data.gov.uk/developers-guide

I am just a beginner and is first time I want to write this up. To generate an Output URL from this with the relevant columns, can anyone explain what I need to get the request URL. I am using GET as the HTTP method

An example of a url i get some data out of is - https://soa.smext.faa.gov/asws/api/airport/status/SFO

But when i try with the links below which i tested does not get any output https://api.coronavirus.data.gov.uk/v1/data?filters=areaType=nation;areaName=england&structure=%7B%22name%22:%22areaName%22%7D

答案1

得分: 1

https://api.coronavirus.data.gov.uk//v1/data?filters=areaType=nation;areaName=england&structure={"date":"date","areaName":"areaName","areaCode":"areaCode","newCasesByPublishDate":"2020-07-07","cumCasesByPublishDate":"2020-08-08","newDeathsByDeathDate":"2020-02-06","cumDeathsByDeathDate":"2020-06-09"}

英文:

https://api.coronavirus.data.gov.uk//v1/data?filters=areaType=nation;areaName=england&structure={"date":"date","areaName":"areaName","areaCode":"areaCode","newCasesByPublishDate":"2020-07-07","cumCasesByPublishDate":"2020-08-08","newDeathsByDeathDate":"2020-02-06","cumDeathsByDeathDate":"2020-06-09"}

答案2

得分: 1

这是一个更好的链接,供您尝试。

https://api.coronavirus.data.gov.uk/v1/data?filters=areaType=nation;areaName=england&structure={%22date%22:%22date%22,%22areaName%22:%22areaName%22,%22areaCode%22:%22areaCode%22,%22newCasesByPublishDate%22:%22newCasesByPublishDate%22,%22cumCasesByPublishDate%22:%22cumCasesByPublishDate%22,%22newDeaths28DaysByDeathDate%22:%22newDeaths28DaysByDeathDate%22}

我花了一些时间来理解它。

英文:

This is a better link for you to try out.

https://api.coronavirus.data.gov.uk/v1/data?filters=areaType=nation;areaName=england&structure={%22date%22:%22date%22,%22areaName%22:%22areaName%22,%22areaCode%22:%22areaCode%22,%22newCasesByPublishDate%22:%22newCasesByPublishDate%22,%22cumCasesByPublishDate%22:%22cumCasesByPublishDate%22,%22newDeaths28DaysByDeathDate%22:%22newDeaths28DaysByDeathDate%22}

Took me a while to suss it out.

huangapple
  • 本文由 发表于 2020年8月23日 05:27:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/63541266.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定