MAGTAG COVID TRACKER API ADDRESS

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
rmooney
 
Posts: 7
Joined: Mon Apr 24, 2017 5:01 pm

MAGTAG COVID TRACKER API ADDRESS

Post by rmooney »

Any idea why the tracker works with line DATA_SOURCE = "https://api.covidtracking.com/v1/us/current.json"
but not with DATA_SOURCE = "/https://api.covidtracking.com/v1/states/va/current.json"?

User avatar
johnpark
 
Posts: 985
Joined: Wed Mar 25, 2009 2:15 pm

Re: MAGTAG COVID TRACKER API ADDRESS

Post by johnpark »

Is that leading "/" at the beginning of your second example the problem?

User avatar
rmooney
 
Posts: 7
Joined: Mon Apr 24, 2017 5:01 pm

Re: MAGTAG COVID TRACKER API ADDRESS

Post by rmooney »

Sorry, that was a typo in the post.

User avatar
rmooney
 
Posts: 7
Joined: Mon Apr 24, 2017 5:01 pm

Re: MAGTAG COVID TRACKER API ADDRESS

Post by rmooney »

Solved! I didn't realize that even though the website was the same the state json data is slightly different and you do not need the "0" in the code where it fetches the data. The code works fine for state data when that is removed.

User avatar
KzooPackFan
 
Posts: 3
Joined: Fri Oct 23, 2020 11:09 am

Re: MAGTAG COVID TRACKER API ADDRESS

Post by KzooPackFan »

Thanks for the solution! I've been trying to get this to work with the state data and now it does!

User avatar
Powderjockey
 
Posts: 189
Joined: Fri Mar 31, 2017 10:14 pm

Re: MAGTAG COVID TRACKER API ADDRESS

Post by Powderjockey »

Anyone out there that can help with me with the Canadian data? I have this API https://api.opencovid.ca/summary?date=today&loc=canada . The website say they have json data, but there is no json extension used in the URL.

There in Mu is, Some error occured, trying again later - The specified json_path was not found in the results.

Locked
Please be positive and constructive with your questions and comments.

Return to “AdaBox! Show us what you made!”