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
+57-38Lines changed: 57 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,18 @@
15
15
16
16
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.
17
17
18
+
### Picking data source
19
+
20
+
We provide multiple data-sources you can pick from, simply add the query paramater ``?source=your_source_of_choice`` to your requests. JHU will be used as a default if you don't provide one.
21
+
22
+
#### Available sources:
23
+
24
+
***jhu** - https://github.com/CSSEGISandData/COVID-19 - Data repository operated by the Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE).
25
+
26
+
***csbs** - https://www.csbs.org/information-covid-19-coronavirus - US County data comes from Conference of State Bank Supervisors
27
+
28
+
***... more to come later**.
29
+
18
30
### Getting latest amount of total confirmed cases, deaths, and recoveries.
19
31
```http
20
32
GET /v2/latest
@@ -41,6 +53,7 @@ GET /v2/locations
41
53
"country": "Thailand",
42
54
"country_code": "TH",
43
55
"province": "",
56
+
"last_updated": "2020-03-21T06:59:11.315422Z",
44
57
"coordinates": {
45
58
"latitude": "15",
46
59
"longitude": "101"
@@ -56,6 +69,7 @@ GET /v2/locations
56
69
"country": "Norway",
57
70
"country_code": "NO",
58
71
"province": "",
72
+
"last_updated": "2020-03-21T06:59:11.315422Z",
59
73
"coordinates": {
60
74
"latitude": "60.472",
61
75
"longitude": "8.4689"
@@ -91,6 +105,7 @@ GET /v2/locations/:id
91
105
"country": "Norway",
92
106
"country_code": "NO",
93
107
"province": "",
108
+
"last_updated": "2020-03-21T06:59:11.315422Z",
94
109
"coordinates": { },
95
110
"latest": { },
96
111
"timelines": {
@@ -118,53 +133,55 @@ GET /v2/locations?timelines=0
118
133
GET /v2/locations?source=csbs
119
134
```
120
135
```json
121
-
{
122
-
"Iowa":[
123
-
{
124
-
"coordinates":{
125
-
"latitude":41.67149574,
126
-
"longitude":-91.58805417
136
+
{
137
+
"locations": [
138
+
{
139
+
"coordinates": {
140
+
"latitude": 40.71455,
141
+
"longitude": -74.00714
142
+
},
143
+
"country": "US",
144
+
"country_code": "US",
145
+
"county": "New York",
146
+
"id": 0,
147
+
"last_updated": "2020-03-21 14:00 EDT",
148
+
"latest": {
149
+
"confirmed": 6211,
150
+
"deaths": 43,
151
+
"recovered": 0
127
152
},
128
-
"county":"Johnson",
129
-
"latest":{
130
-
"confirmed":22,
131
-
"death":0,
132
-
"new":0
133
-
}
153
+
"province": "New York",
154
+
"state": "New York"
134
155
},
135
-
{
136
-
"coordinates":{
137
-
"latitude":41.68541161,
138
-
"longitude":-93.57344237
156
+
{
157
+
"coordinates":{
158
+
"latitude":41.16319759,
159
+
"longitude":-73.7560629
139
160
},
140
-
"county":"Polk",
141
-
"latest":{
142
-
"confirmed":6,
143
-
"death":0,
144
-
"new":0
145
-
}
161
+
"country": "US",
162
+
"country_code": "US",
163
+
"county": "Westchester",
164
+
"id": 1,
165
+
"last_updated": "2020-03-21 14:00 EDT",
166
+
"latest": {
167
+
"confirmed": 1385,
168
+
"deaths": 0,
169
+
"recovered": 0
170
+
},
171
+
"province": "Westchester",
172
+
"state": "New York"
146
173
},
147
174
...
148
-
...
149
-
}
150
-
```
151
-
Additionally, you can also filter by state.
152
-
```http
153
-
GET /v2/locations?source=csbs&state=Iowa
154
-
```
155
-
156
-
## Data
175
+
]
176
+
}
157
177
158
-
The data comes from the [2019 Novel Coronavirus (nCoV) Data Repository, provided
159
-
by JHU CCSE](https://github.com/CSSEGISandData/2019-nCoV). It is
160
-
programmatically retrieved, re-formatted and stored in the cache for one hour.
178
+
## Wrappers
161
179
162
-
US County data comes from CSBS (https://www.csbs.org/information-covid-19-coronavirus)
163
-
It is programmatically retrieved, re-formatted and stored in the cache for one hour.
180
+
These are the available API wrappers created by the community. They are not necessarily maintained by any of this project's authors or contributors.
164
181
165
-
## Wrappers
182
+
### Golang
166
183
167
-
These are the available API wrappers created by the community. They are not neccecarily maintained by any of this project's authors or contributors.
184
+
* [Go-corona by @itsksaurabh](https://github.com/itsksaurabh/go-corona).
168
185
169
186
### C#
170
187
@@ -235,6 +252,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
0 commit comments