Skip to content

Commit cd64e47

Browse files
committed
define latest, location endpoints
1 parent d79965e commit cd64e47

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

app/main.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,22 @@ class Country(pydantic.BaseModel):
4141
)
4242

4343

44+
@APP.get("/latest", response_model=Latest)
45+
def get_latest():
46+
sample_data = {"latest": {"confirmed": 197146, "deaths": 7905, "recovered": 80840}}
47+
return sample_data
48+
49+
50+
@APP.get("/locations")
51+
def get_all_locations(country_code: str = None, timelines: int = None):
52+
return
53+
54+
55+
@APP.get("/locations/{id}")
56+
def get_location_by_id(id: int):
57+
return
58+
59+
4460
if __name__ == "__main__":
4561
uvicorn.run(
4662
"app.main:APP",

0 commit comments

Comments
 (0)