feat(api): add multiple days api
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user