From 63804be667f511d4d43c1abe470f95ce72dafe41 Mon Sep 17 00:00:00 2001 From: ExpDev07 Date: Tue, 24 Mar 2020 06:33:08 +0100 Subject: [PATCH 1/4] hotfix --- app/services/location/jhu.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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({}) } )) From 87a54cc47fe7a625e0f3433561595756712ac141 Mon Sep 17 00:00:00 2001 From: ExpDev07 Date: Tue, 24 Mar 2020 06:38:59 +0100 Subject: [PATCH 2/4] fix test --- tests/test_routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } } From 2138c57e0f873b8e8de1e1ced9c8d40a4e16c0f3 Mon Sep 17 00:00:00 2001 From: ExpDev Date: Tue, 24 Mar 2020 06:51:49 +0100 Subject: [PATCH 3/4] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2c1b3304..3f089549 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,9 @@ 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 +31,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 +42,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 From f9cbcd58b729af8e8da3353429ea8824569bd377 Mon Sep 17 00:00:00 2001 From: ExpDev Date: Tue, 24 Mar 2020 06:52:45 +0100 Subject: [PATCH 4/4] Update README.md --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3f089549..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. @@ -19,7 +22,8 @@ Support multiple data-sources. ![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.** + +**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: