You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+73-15Lines changed: 73 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,37 +12,95 @@
12
12
13
13
## Endpoints
14
14
15
-
All requests must be made to the base url: ``https://coronavirus-tracker-api.herokuapp.com`` (e.g: https://coronavirus-tracker-api.herokuapp.com/all). You can try them out in your browser to further inspect responses.
15
+
All requests must be made to the base url: ``https://coronavirus-tracker-api.herokuapp.com/v2/`` (e.g: https://coronavirus-tracker-api.herokuapp.com/v2/locations). You can try them out in your browser to further inspect responses.
16
16
17
-
Getting confirmed cases, deaths, and recoveries:
17
+
### Getting latest amount of total confirmed cases, deaths, and recoveries.
Additionally, you can also filter by country ([alpha-2 country_code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
39
73
```http
40
-
GET /deaths
74
+
GET /v2/locations?country_code=US
41
75
```
42
76
43
-
Getting just recoveries:
77
+
### Getting a specific location (includes timeline).
44
78
```http
45
-
GET /recovered
79
+
GET /v2/locations/:id
80
+
```
81
+
```json
82
+
{
83
+
"location": {
84
+
"id": 39,
85
+
"country": "Norway",
86
+
"country_code": "NO",
87
+
"province": "",
88
+
"coordinates": { },
89
+
"latest": { },
90
+
"timelines": {
91
+
"confirmed": {
92
+
"latest": 1463,
93
+
"timeline": {
94
+
"2020-03-16T00:00:00Z": 1333,
95
+
"2020-03-17T00:00:00Z": 1463
96
+
}
97
+
},
98
+
"deaths": { },
99
+
"recovered": { }
100
+
}
101
+
}
102
+
}
103
+
}
46
104
```
47
105
48
106
## Data
@@ -112,5 +170,5 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
112
170
113
171
## License
114
172
115
-
The data is available to the public strictly for educational and academic research purposes. Please link to this repo somewhere in your project if you can (not required) :).
173
+
The data is available to the public strictly for educational and academic research purposes. Please link to this repo somewhere in your project :).
0 commit comments