Skip to content

Commit 7a0d38c

Browse files
authored
Merge pull request #8 from ExpDev07/master
Merge new updates
2 parents fe60577 + f9cbcd5 commit 7a0d38c

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
## Coronavirus Tracker API
1+
<h1 align="center">
2+
Coronavirus Tracker API
3+
</h1>
4+
25
Provides up-to-date data about Coronavirus outbreak. Includes numbers about confirmed cases, deaths and recovered.
36
Support multiple data-sources.
47

@@ -18,6 +21,10 @@ Support multiple data-sources.
1821
![Covid-19 Recovered](https://covid19-badges.herokuapp.com/recovered/latest)
1922
![Covid-19 Deaths](https://covid19-badges.herokuapp.com/deaths/latest)
2023

24+
## Recovered cases showing 0
25+
26+
**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.**
27+
2128
## Available data-sources:
2229

2330
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:
2835

2936
__jhu__ data-source will be used as a default source if you don't specify a *source parameter* in your request.
3037

31-
3238
## API Reference
3339

3440
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
4046
curl https://coronavirus-tracker-api.herokuapp.com/v2/locations | json_pp
4147
```
4248

43-
4449
## API Endpoints
4550

4651
### Sources Endpoint

app/services/location/jhu.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def get_locations():
116116
# Get all of the data categories locations.
117117
confirmed = get_category('confirmed')['locations']
118118
deaths = get_category('deaths')['locations']
119-
recovered = get_category('recovered')['locations']
119+
# recovered = get_category('recovered')['locations']
120120

121121
# Final locations to return.
122122
locations = []
@@ -127,7 +127,7 @@ def get_locations():
127127
timelines = {
128128
'confirmed' : confirmed[index]['history'],
129129
'deaths' : deaths[index]['history'],
130-
'recovered' : recovered[index]['history'],
130+
# 'recovered' : recovered[index]['history'],
131131
}
132132

133133
# Grab coordinates.
@@ -151,7 +151,7 @@ def get_locations():
151151
{
152152
'confirmed': Timeline({ datetime.strptime(date, '%m/%d/%y').isoformat() + 'Z': amount for date, amount in timelines['confirmed'].items() }),
153153
'deaths' : Timeline({ datetime.strptime(date, '%m/%d/%y').isoformat() + 'Z': amount for date, amount in timelines['deaths'].items() }),
154-
'recovered': Timeline({ datetime.strptime(date, '%m/%d/%y').isoformat() + 'Z': amount for date, amount in timelines['recovered'].items() })
154+
'recovered': Timeline({})
155155
}
156156
))
157157

tests/test_routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def test_v2_latest(self, mock_request_get, mock_datetime):
8686
'latest': {
8787
'confirmed': 1940,
8888
'deaths': 1940,
89-
'recovered': 1940
89+
'recovered': 0
9090
}
9191
}
9292

0 commit comments

Comments
 (0)