diff --git a/README.md b/README.md index 2c1b3304..840efc72 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ -## Coronavirus Tracker API +

+ Coronavirus Tracker API +

+ Provides up-to-date data about Coronavirus outbreak. Includes numbers about confirmed cases, deaths and recovered. Support multiple data-sources. @@ -18,6 +21,10 @@ Support multiple data-sources. ![Covid-19 Recovered](https://covid19-badges.herokuapp.com/recovered/latest) ![Covid-19 Deaths](https://covid19-badges.herokuapp.com/deaths/latest) +## Recovered cases showing 0 + +**JHU (our main data provider) [no longer provides data for amount of recoveries](https://github.com/ExpDev07/coronavirus-tracker-api/issues/155), and as a result, the API will be showing 0 for this statistic. Apolegies for any inconvenience. Hopefully we'll be able to find an alternative data-source that offers this.** + ## Available data-sources: Currently 2 different data-sources are available to retrieve the data: @@ -28,7 +35,6 @@ Currently 2 different data-sources are available to retrieve the data: __jhu__ data-source will be used as a default source if you don't specify a *source parameter* in your request. - ## API Reference All endpoints are located at ``coronavirus-tracker-api.herokuapp.com/v2/`` and are accessible via https. For instance: you can get data per location by using this URL: @@ -40,7 +46,6 @@ You can open the URL in your browser to further inspect the response. Or you can curl https://coronavirus-tracker-api.herokuapp.com/v2/locations | json_pp ``` - ## API Endpoints ### Sources Endpoint diff --git a/app/services/location/jhu.py b/app/services/location/jhu.py index c79900e0..0a42c9d9 100644 --- a/app/services/location/jhu.py +++ b/app/services/location/jhu.py @@ -116,7 +116,7 @@ def get_locations(): # Get all of the data categories locations. confirmed = get_category('confirmed')['locations'] deaths = get_category('deaths')['locations'] - recovered = get_category('recovered')['locations'] + # recovered = get_category('recovered')['locations'] # Final locations to return. locations = [] @@ -127,7 +127,7 @@ def get_locations(): timelines = { 'confirmed' : confirmed[index]['history'], 'deaths' : deaths[index]['history'], - 'recovered' : recovered[index]['history'], + # 'recovered' : recovered[index]['history'], } # Grab coordinates. @@ -151,7 +151,7 @@ def get_locations(): { 'confirmed': Timeline({ datetime.strptime(date, '%m/%d/%y').isoformat() + 'Z': amount for date, amount in timelines['confirmed'].items() }), 'deaths' : Timeline({ datetime.strptime(date, '%m/%d/%y').isoformat() + 'Z': amount for date, amount in timelines['deaths'].items() }), - 'recovered': Timeline({ datetime.strptime(date, '%m/%d/%y').isoformat() + 'Z': amount for date, amount in timelines['recovered'].items() }) + 'recovered': Timeline({}) } )) diff --git a/tests/test_routes.py b/tests/test_routes.py index 18138f09..e08eb349 100644 --- a/tests/test_routes.py +++ b/tests/test_routes.py @@ -86,7 +86,7 @@ def test_v2_latest(self, mock_request_get, mock_datetime): 'latest': { 'confirmed': 1940, 'deaths': 1940, - 'recovered': 1940 + 'recovered': 0 } }