feat(api): add multiple days api

This commit is contained in:
2024-07-29 21:42:44 +03:00
parent 22fab7a15a
commit 7f0e19fb5a
16 changed files with 5411 additions and 64 deletions

View File

@@ -6,13 +6,11 @@ from gismeteo.api import WeatherResponse
class MockData:
@property
def html(self) -> str:
return (Path(__file__).parent / "data/weather.html").read_text()
def get_html(self, key: str) -> str:
return (Path(__file__).parent / f"data/{key}.html").read_text()
@property
def response(self) -> WeatherResponse:
data = json.loads((Path(__file__).parent / "data/weather.json").read_text())
def get_response(self, key: str) -> WeatherResponse:
data = json.loads((Path(__file__).parent / f"data/{key}.json").read_text())
return WeatherResponse(**data)