File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -54,25 +54,26 @@ class Location(pydantic.BaseModel):
5454APP = fastapi .FastAPI (
5555 title = "Coronavirus Tracker" ,
5656 description = "API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak." ,
57- version = "3.0 .0" ,
58- prefix = "/v3 " ,
59- docs_url = "/v3 " ,
57+ version = "2.1 .0" ,
58+ prefix = "/v2-1 " ,
59+ docs_url = "/v2-1 " ,
6060 redoc_url = "/docs" ,
6161)
6262
6363
6464@APP .get ("/latest" , response_model = Latest )
6565def get_latest ():
66+ """Getting latest amount of total confirmed cases, deaths, and recoveries."""
6667 sample_data = {"latest" : {"confirmed" : 197146 , "deaths" : 7905 , "recovered" : 80840 }}
6768 return sample_data
6869
6970
70- @APP .get ("/locations" )
71+ @APP .get ("/locations" , response_model = AllLocations )
7172def get_all_locations (country_code : str = None , timelines : int = None ):
7273 return
7374
7475
75- @APP .get ("/locations/{id}" )
76+ @APP .get ("/locations/{id}" , response_model = Location )
7677def get_location_by_id (id : int ):
7778 return
7879
You can’t perform that action at this time.
0 commit comments