coronavirus-tracker-cli
coronavirus-tracker-cli copied to clipboard
APIs for both sources have issues
Hello,
I've tried to use the APIs for both sources, but each have their issues:
Source 1:
- the statistics for China only display the statistics for the province Hubei, so it's stuck on 67.8k for more than a week (only an API issue, in the table, it's correct)
Source 2:
- the reported countries are in the wrong order (China with 81.4k is above USA with 104k and Italy with 86.5k) - both an API and a table issue
- the "top=X" parameter is ignored - it reports all of the ~200 countries (only an API issue)
The URL I use for fetching data is "https://corona-stats.online?format=json&top=10&source=X", where X is 1 or 2.
Since the first API doesn't report recovered cased, I tried to use the second API. But in the second API, it's not possible to get the data from the previous day. The first API had it and it was quite useful...
Now China is on the last place in the order, when I query the data with:
curl 'https://corona-stats.online?minimal=true&source=2'
Looks like the issue with the source=2
data is related to upstream data coming from here https://corona.lmao.ninja/countries
Then the reqest URL should be changed to: https://corona.lmao.ninja/countries?sort=cases
EDIT: This part of the Issue seem to be fixed.
@michalprochazka02
1.top
param is not supported with json
param.
2. recovered cases were removed by JHU. So the source API removed it too.