+{"openapi":"3.0.2","info":{"title":"Coronavirus Tracker","description":"API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. Project page: https://github.com/ExpDev07/coronavirus-tracker-api.","version":"2.0.1"},"paths":{"/v2/latest":{"get":{"tags":["v2"],"summary":"Get Latest","description":"Getting latest amount of total confirmed cases, deaths, and recoveries.","operationId":"get_latest_v2_latest_get","parameters":[{"required":false,"schema":{"title":"Source","enum":["jhu","csbs"],"type":"string","default":"jhu"},"name":"source","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/locations":{"get":{"tags":["v2"],"summary":"Get Locations","description":"Getting the locations.","operationId":"get_locations_v2_locations_get","parameters":[{"required":false,"schema":{"title":"Source","enum":["jhu","csbs"],"type":"string","default":"jhu"},"name":"source","in":"query"},{"required":false,"schema":{"title":"Country Code","type":"string"},"name":"country_code","in":"query"},{"required":false,"schema":{"title":"Province","type":"string"},"name":"province","in":"query"},{"required":false,"schema":{"title":"County","type":"string"},"name":"county","in":"query"},{"required":false,"schema":{"title":"Timelines","type":"boolean","default":false},"name":"timelines","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/locations/{id}":{"get":{"tags":["v2"],"summary":"Get Location By Id","description":"Getting specific location by id.","operationId":"get_location_by_id_v2_locations__id__get","parameters":[{"required":true,"schema":{"title":"Id","type":"integer"},"name":"id","in":"path"},{"required":false,"schema":{"title":"Source","enum":["jhu","csbs"],"type":"string","default":"jhu"},"name":"source","in":"query"},{"required":false,"schema":{"title":"Timelines","type":"boolean","default":true},"name":"timelines","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/sources":{"get":{"tags":["v2"],"summary":"Sources","description":"Retrieves a list of data-sources that are availble to use.","operationId":"sources_v2_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"Latest":{"title":"Latest","required":["confirmed","deaths","recovered"],"type":"object","properties":{"confirmed":{"title":"Confirmed","type":"integer"},"deaths":{"title":"Deaths","type":"integer"},"recovered":{"title":"Recovered","type":"integer"}}},"LatestResponse":{"title":"LatestResponse","required":["latest"],"type":"object","properties":{"latest":{"$ref":"#/components/schemas/Latest"}}},"Location":{"title":"Location","required":["id","country","country_code","last_updated","coordinates","latest"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"country":{"title":"Country","type":"string"},"country_code":{"title":"Country Code","type":"string"},"county":{"title":"County","type":"string","default":""},"province":{"title":"Province","type":"string","default":""},"last_updated":{"title":"Last Updated","type":"string"},"coordinates":{"title":"Coordinates","type":"object"},"latest":{"$ref":"#/components/schemas/Latest"},"timelines":{"title":"Timelines","allOf":[{"$ref":"#/components/schemas/Timelines"}],"default":{}}}},"LocationResponse":{"title":"LocationResponse","required":["location"],"type":"object","properties":{"location":{"$ref":"#/components/schemas/Location"}}},"LocationsResponse":{"title":"LocationsResponse","required":["latest"],"type":"object","properties":{"latest":{"$ref":"#/components/schemas/Latest"},"locations":{"title":"Locations","type":"array","items":{"$ref":"#/components/schemas/Location"},"default":[]}}},"Timeline":{"title":"Timeline","required":["latest"],"type":"object","properties":{"latest":{"title":"Latest","type":"integer"},"timeline":{"title":"Timeline","type":"object","additionalProperties":{"type":"integer"},"default":{}}}},"Timelines":{"title":"Timelines","required":["confirmed","deaths","recovered"],"type":"object","properties":{"confirmed":{"$ref":"#/components/schemas/Timeline"},"deaths":{"$ref":"#/components/schemas/Timeline"},"recovered":{"$ref":"#/components/schemas/Timeline"}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}
0 commit comments