Skip to content

Commit 621cca4

Browse files
committed
path parameter added for location
1 parent fcd4750 commit 621cca4

File tree

1 file changed

+35
-29
lines changed

1 file changed

+35
-29
lines changed

README.md

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ __Sample response__
5656
}
5757
```
5858

59-
__Parameters__
59+
__ Query String Parameters__
6060
| Query string parameter | Description | Type |
6161
| ---------------------- | -------------------------------------------------------------------------------- | ------ |
6262
| source | The data-source where data will be retrieved from *(jhu/csbs)*. Default is *jhu* | String |
@@ -66,7 +66,39 @@ __Parameters__
6666
Getting latest amount of total confirmed cases, deaths, and recoveries per location.
6767

6868
```http
69-
GET /v2/locations
69+
GET /v2/locations/{locationId}
70+
```
71+
__ Path Parameters__
72+
| Path parameter | Required/Optional | Description | Type |
73+
| -------------- | ----------------- | ------------------------------------------------------------------ |
74+
| locationId | OPTIONAL | The location id for which you want to call the locations Endpoint. | Integer |
75+
76+
```http
77+
GET /v2/locations/:id
78+
```
79+
```json
80+
{
81+
"location": {
82+
"id": 39,
83+
"country": "Norway",
84+
"country_code": "NO",
85+
"province": "",
86+
"last_updated": "2020-03-21T06:59:11.315422Z",
87+
"coordinates": { },
88+
"latest": { },
89+
"timelines": {
90+
"confirmed": {
91+
"latest": 1463,
92+
"timeline": {
93+
"2020-03-16T00:00:00Z": 1333,
94+
"2020-03-17T00:00:00Z": 1463
95+
}
96+
},
97+
"deaths": { },
98+
"recovered": { }
99+
}
100+
}
101+
}
70102
```
71103

72104
__Sample response__
@@ -152,33 +184,7 @@ GET /v2/locations?timelines=1
152184
```
153185

154186
### Getting a specific location (includes timelines by default).
155-
```http
156-
GET /v2/locations/:id
157-
```
158-
```json
159-
{
160-
"location": {
161-
"id": 39,
162-
"country": "Norway",
163-
"country_code": "NO",
164-
"province": "",
165-
"last_updated": "2020-03-21T06:59:11.315422Z",
166-
"coordinates": { },
167-
"latest": { },
168-
"timelines": {
169-
"confirmed": {
170-
"latest": 1463,
171-
"timeline": {
172-
"2020-03-16T00:00:00Z": 1333,
173-
"2020-03-17T00:00:00Z": 1463
174-
}
175-
},
176-
"deaths": { },
177-
"recovered": { }
178-
}
179-
}
180-
}
181-
```
187+
182188

183189
Exclude timelines.
184190
```http

0 commit comments

Comments
 (0)