Skip to content

Commit 936df66

Browse files
committed
Minor fixes applied
1 parent 8bd9cb5 commit 936df66

File tree

1 file changed

+34
-28
lines changed

1 file changed

+34
-28
lines changed

README.md

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ __jhu__ data-source will be used as a default source if you don't specify a *sou
3434
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:
3535
*[https://coronavirus-tracker-api.herokuapp.com/v2/locations](https://coronavirus-tracker-api.herokuapp.com/v2/locations)*
3636

37-
You can try to open the URL in your browser to further inspect the response. Or you can make this curl call on your terminal to see the prettified response:
37+
You can open the URL in your browser to further inspect the response. Or you can make this curl call in your terminal to see the prettified response:
3838

3939
```
4040
curl https://coronavirus-tracker-api.herokuapp.com/v2/locations | json_pp
@@ -45,7 +45,7 @@ curl https://coronavirus-tracker-api.herokuapp.com/v2/locations | json_pp
4545

4646
### Sources Endpoint
4747

48-
Getting the available data-sources
48+
Getting the data-sources that are currently available to Coronavirus Tracker API to retrieve the data of the pandemic.
4949

5050
```http
5151
GET /v2/sources
@@ -63,7 +63,7 @@ __Sample response__
6363

6464
### Latest Endpoint
6565

66-
Getting latest amount of total confirmed cases, deaths, and recoveries.
66+
Getting latest amount of total confirmed cases, deaths, and recovered.
6767

6868
```http
6969
GET /v2/latest
@@ -88,7 +88,7 @@ __Query String Parameters__
8888

8989
### Locations Endpoint
9090

91-
Getting latest amount of total confirmed cases, deaths, and recoveries per location.
91+
Getting latest amount of confirmed cases, deaths, and recovered per location.
9292

9393
#### The Location Object
9494
```http
@@ -182,37 +182,41 @@ __Sample response__
182182
```
183183

184184
__Query String Parameters__
185-
| __Query string parameter__ | __Description__ | __Type__ |
186-
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
187-
| source | The data-source where data will be retrieved from. __Value__ can be: __jhu/csbs__. __Default__ is __jhu__ | String |
188-
| country_code | The ISO ([alpha-2 country_code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)) to the Country/Province for which you're calling the Endpoint | String |
189-
| timelines | To set the visibility of timelines (*daily tracking*).__Value__ can be: __0/1__. __Default__ is __0__ | Integer |
185+
| __Query string parameter__ | __Description__ | __Type__ |
186+
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
187+
| source | The data-source where data will be retrieved from. |
188+
| __Value__ can be: *jhu/csbs*. __Default__ is *jhu* | String |
189+
| country_code | The ISO ([alpha-2 country_code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)) to the Country/Province for which you're calling the Endpoint | String |
190+
| timelines | To set the visibility of timelines (*daily tracking*). |
191+
| __Value__ can be: *0/1*. __Default__ is *0* (timelines are not visible) | Integer |
190192

191193

192194
__Response definitions__
193-
| __Response Item__ | __Description__ | __Type__ |
194-
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -------- |
195-
| {latest} | The total amount of confirmed cases, deaths and recoveries for all the locations | Object |
196-
| {latest}/confirmed | The up-to-date total number of confirmed cases for all the locations within the data-source | Integer |
197-
| {latest}/deaths | The up-to-date total amount of deaths for all the locations within the data-source | Integer |
198-
| {latest}/recovered | The up-to-date total amount of recovered for all the locations within the data-source | Integer |
199-
| {locations} | The collection of locations contained within the data-source | Object |
200-
| {location} | Information that identifies a location | Object |
201-
| {latest} | The amount of confirmed cases, deaths and recovered related to the specific location | Object |
202-
| {locations}/{location}/{latest}/confirmed | The up-to-date number of confirmed cases related to the specific location | Integer |
203-
| {locations}/{location}/{latest}/deaths | The up-to-date number of deaths related to the specific location | Integer |
204-
| {locations}/{location}/{latest}/deaths | The up-to-date number of recovered related to the specific location | Integer |
205-
| {locations}/{location}/id | The location id. This id number is assigned to the location by the data-source. | Integer |
206-
| {locations}/{location}/country | The Country name | String |
207-
| {locations}/{location}/country_code | The ISO ([alpha-2 country_code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)) Country code for the location. | String |
208-
| {locations}/{location}/province | The province where the location belongs to. (Used only for __csbs data-source__ of US locations. __Empty__ with __jhu data-source__. | String |
209-
| {locations}/{location}/{coordinates}/latitude | The location latitude | Float |
210-
| {locations}/{location}/{coordinates}/longitude | The location longitude | Float |
195+
| __Response Item__ | __Description__ | __Type__ |
196+
| ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -------- |
197+
| {latest} | The total amount of confirmed cases, deaths and recovered for all the locations | Object |
198+
| {latest}/confirmed | The up-to-date total number of confirmed cases for all the locations within the data-source | Integer |
199+
| {latest}/deaths | The up-to-date total amount of deaths for all the locations within the data-source | Integer |
200+
| {latest}/recovered | The up-to-date total amount of recovered for all the locations within the data-source | Integer |
201+
| {locations} | The collection of locations contained within the data-source | Object |
202+
| {location} | Information that identifies a location | Object |
203+
| {latest} | The amount of confirmed cases, deaths and recovered related to the specific location | Object |
204+
| {locations}/{location}/{latest}/confirmed | The up-to-date number of confirmed cases related to the specific location | Integer |
205+
| {locations}/{location}/{latest}/deaths | The up-to-date number of deaths related to the specific location | Integer |
206+
| {locations}/{location}/{latest}/deaths | The up-to-date number of recovered related to the specific location | Integer |
207+
| {locations}/{location}/id | The location id. This unique id is assigned to the location by the data-source. | Integer |
208+
| {locations}/{location}/country | The Country name | String |
209+
| {locations}/{location}/country_code | The [ISO alpha-2 country_code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Country code for the location. | String |
210+
| {locations}/{location}/province | The province where the location belongs to. (Used for US locations coming from __csbs data-source__. |
211+
| __Empty__ when *jhu data-source* is used | String |
212+
| {locations}/{location}/{coordinates}/latitude | The location latitude | Float |
213+
| {locations}/{location}/{coordinates}/longitude | The location longitude | Float |
211214

212215

213216
### Example Requests with parameters
214217

215218
__Parameter: country_code__
219+
216220
Getting data for the Country specified by the *country_code parameter*, in this case Italy - IT
217221

218222
```http
@@ -249,6 +253,7 @@ __Sample Response__
249253
```
250254

251255
__Parameter: source__
256+
252257
Getting the data from the data-source specified by the *source parameter*, in this case [csbs](https://www.csbs.org/information-covid-19-coronavirus)
253258

254259

@@ -306,12 +311,13 @@ __Sample Response__
306311
```
307312

308313
__Parameter: timelines__
314+
309315
Getting the data for all the locations including the daily tracking of confirmed cases, deaths and recovered per location.
310316

311317
```http
312318
GET /v2/locations?timelines=1
313319
```
314-
Explore the response by opening the URL in your browser [https://coronavirus-tracker-api.herokuapp.com/v2/locations?timelines=1](https://coronavirus-tracker-api.herokuapp.com/v2/locations?timelines=1) or make the following curl call on your terminal:
320+
Explore the response by opening the URL in your browser [https://coronavirus-tracker-api.herokuapp.com/v2/locations?timelines=1](https://coronavirus-tracker-api.herokuapp.com/v2/locations?timelines=1) or make the following curl call in your terminal:
315321

316322
```
317323
curl https://coronavirus-tracker-api.herokuapp.com/v2/locations?timelines=1 | json_pp

0 commit comments

Comments
 (0)