coronavirus-tracker-cli icon indicating copy to clipboard operation
coronavirus-tracker-cli copied to clipboard

APIs for both sources have issues

Open prochazkaml opened this issue 4 years ago • 4 comments

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...

prochazkaml avatar Mar 28 '20 06:03 prochazkaml

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'

hwiards avatar Mar 28 '20 10:03 hwiards

Looks like the issue with the source=2 data is related to upstream data coming from here https://corona.lmao.ninja/countries

onzyone avatar Mar 29 '20 12:03 onzyone

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.

hwiards avatar Mar 29 '20 16:03 hwiards

@michalprochazka02

1.top param is not supported with json param. 2. recovered cases were removed by JHU. So the source API removed it too.

sagarkarira avatar Apr 01 '20 23:04 sagarkarira