Closed PRRH closed 2 years ago
Hi! Maybe not the best API design, but you have to provide the "id" as seen in /v2/locations?country_code=IT
, for IT, this is 154, so the correct endpoint to hit would be/v2/locations/154
(without timelines: /v2/locations/154?timelines=false
).
Hope this helped.
https://coronavirus-tracker-api.herokuapp.com/#/v2/get_locations_v2_locations_get Thw .json file produced with try it out thenExecute from this websie produces th afore mentioned etror
Works fine for me
https://covid-tracker-us.herokuapp.com/#/v2/get_locations_v2_locations_get produces the same error
No it does not. Could you provide a screenshot?
It is not an error the figure produced for deaths is Zero. from channel islands onwards.
{ "id": 265, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Channel Islands", "last_updated": "2022-08-24T09:02:51.575789Z", "coordinates": { "latitude": "49.3723", "longitude": "-2.3644" }, "latest": { "confirmed": 0, "deaths": 0, "recovered": 0 } }, { "id": 266, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Falkland Islands (Malvinas)", "last_updated": "2022-08-24T09:02:51.603109Z", "coordinates": { "latitude": "-51.7963", "longitude": "-59.5236" }, "latest": { "confirmed": 1881, "deaths": 0, "recovered": 0 } }, { "id": 267, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Gibraltar", "last_updated": "2022-08-24T09:02:51.616330Z", "coordinates": { "latitude": "36.1408", "longitude": "-5.3536" }, "latest": { "confirmed": 20049, "deaths": 0, "recovered": 0 } }, { "id": 268, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Guernsey", "last_updated": "2022-08-24T09:02:51.633121Z", "coordinates": { "latitude": "49.448196", "longitude": "-2.58949" }, "latest": { "confirmed": 30519, "deaths": 0, "recovered": 0 } }, { "id": 269, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Isle of Man", "last_updated": "2022-08-24T09:02:51.644295Z", "coordinates": { "latitude": "54.2361", "longitude": "-4.5481" }, "latest": { "confirmed": 37794, "deaths": 0, "recovered": 0 } }, { "id": 270, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Jersey", "last_updated": "2022-08-24T09:02:51.661530Z", "coordinates": { "latitude": "49.2138", "longitude": "-2.1358" }, "latest": { "confirmed": 58733, "deaths": 0, "recovered": 0 } }, { "id": 271, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Montserrat", "last_updated": "2022-08-24T09:02:51.679854Z", "coordinates": { "latitude": "16.742498", "longitude": "-62.187366" }, "latest": { "confirmed": 1106, "deaths": 0, "recovered": 0 } }, { "id": 272, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Saint Helena, Ascension and Tristan da Cunha", "last_updated": "2022-08-24T09:02:51.692343Z", "coordinates": { "latitude": "-7.9467", "longitude": "-14.3559" }, "latest": { "confirmed": 4, "deaths": 0, "recovered": 0 } }, { "id": 273, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "Turks and Caicos Islands", "last_updated": "2022-08-24T09:02:51.706528Z", "coordinates": { "latitude": "21.694", "longitude": "-71.7979" }, "latest": { "confirmed": 6359, "deaths": 0, "recovered": 0 } }, { "id": 274, "country": "United Kingdom", "country_code": "GB", "country_population": 66488991, "province": "", "last_updated": "2022-08-24T09:02:51.726024Z", "coordinates": { "latitude": "55.3781", "longitude": "-3.436" }, "latest": { "confirmed": 23460787, "deaths": 0, "recovered": 0 } }, { "id": 275, "country": "Uruguay", "country_code": "UY", "country_population": 3449299, "province": "", "last_updated": "2022-08-24T09:02:51.749658Z", "coordinates": { "latitude": "-32.5228", "longitude": "-55.7658" }, "latest": { "confirmed": 977305, "deaths": 0, "recovered": 0 } }, { "id": 276, "country": "Uzbekistan", "country_code": "UZ", "country_population": 32955400, "province": "", "last_updated": "2022-08-24T09:02:51.776817Z", "coordinates": { "latitude": "41.377491", "longitude": "64.585262" }, "latest": { "confirmed": 243691, "deaths": 0, "recovered": 0 } }, { "id": 277, "country": "Vanuatu", "country_code": "VU", "country_population": 292680, "province": "", "last_updated": "2022-08-24T09:02:51.804276Z", "coordinates": { "latitude": "-15.3767", "longitude": "166.9592" }, "latest": { "confirmed": 11770, "deaths": 0, "recovered": 0 } }, { "id": 278, "country": "Venezuela", "country_code": "VE", "country_population": 28870195, "province": "", "last_updated": "2022-08-24T09:02:51.831714Z", "coordinates": { "latitude": "6.4238", "longitude": "-66.5897" }, "latest": { "confirmed": 541708, "deaths": 0, "recovered": 0 } }, { "id": 279, "country": "Vietnam", "country_code": "VN", "country_population": 95540395, "province": "", "last_updated": "2022-08-24T09:02:51.856009Z", "coordinates": { "latitude": "14.058324", "longitude": "108.277199" }, "latest": { "confirmed": 11389268, "deaths": 0, "recovered": 0 } }, { "id": 280, "country": "West Bank and Gaza", "country_code": "PS", "country_population": 4569087, "province": "", "last_updated": "2022-08-24T09:02:51.879145Z", "coordinates": { "latitude": "31.9522", "longitude": "35.2332" }, "latest": { "confirmed": 698384, "deaths": 0, "recovered": 0 } }, { "id": 281, "country": "Winter Olympics 2022", "country_code": "XX", "country_population": null, "province": "", "last_updated": "2022-08-24T09:02:51.902646Z", "coordinates": { "latitude": "39.9042", "longitude": "116.4074" }, "latest": { "confirmed": 535, "deaths": 0, "recovered": 0 } }, { "id": 282, "country": "Yemen", "country_code": "YE", "country_population": 28498687, "province": "", "last_updated": "2022-08-24T09:02:51.918727Z", "coordinates": { "latitude": "15.552727", "longitude": "48.516388" }, "latest": { "confirmed": 11917, "deaths": 0, "recovered": 0 } }, { "id": 283, "country": "Zambia", "country_code": "ZM", "country_population": 17351822, "province": "", "last_updated": "2022-08-24T09:02:51.932772Z", "coordinates": { "latitude": "-13.133897", "longitude": "27.849332" }, "latest": { "confirmed": 332527, "deaths": 0, "recovered": 0 } }, { "id": 284, "country": "Zimbabwe", "country_code": "ZW", "country_population": 14439018, "province": "", "last_updated": "2022-08-24T09:02:51.948633Z", "coordinates": { "latitude": "-19.015438", "longitude": "29.154857" }, "latest": { "confirmed": 256628, "deaths": 0, "recovered": 0 } } ] }
By the way thanks for your help I have been usiing these web sites every day since March 2020 to download the coronavirus data for all countries. IT HAS BEEN VERY MUCH APPRECIEATED. It has been a lockdown project.
I understand what you mean now, I'll look into this. Could be an issue with the data provider.
And thanks for your kind words!
The clue might be that Guernsey and Jersey were added some months ago and the Channel Island figures have been zero ever since. Its odd that the zero data starts here. Just a thought
This should be fixed now by the PR. Channel Islands still show 0 because, well, JHU haven't provided any data for it (maybe noone died?). Anyways, now, at least the locations coming after should not be affected @PRRH .
Thanks very much for all your help. Guernsey + Jersey are the Channel Islands . Once again THANKS.
Describe the bug A clear and concise description of what the bug is. Please include timestamps and HTTP status codes. If possible include the httpie or
curl
request and response. Please include the verbose flag.-v
To Reproduce
httpie/curl
request to reproduce the behavior:v2/locations/IT
gives a 422./v2/locations?country_code=IT
Expected behavior A clear and concise description of what you expected to happen.
Screenshots or Requests If applicable, add screenshots or
httpie/curl
requests to help explain your problem.Additional context Add any other context about the problem here. Does the other instance at https://covid-tracker-us.herokuapp.com/ produce the same result?