summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--windy/point_forecast.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/windy/point_forecast.py b/windy/point_forecast.py
index 2d5cab6..2ebb67f 100644
--- a/windy/point_forecast.py
+++ b/windy/point_forecast.py
@@ -38,19 +38,15 @@ class Level(_StrEnum):
@dataclass
-class Config:
- key: str
- api: str = "https://api.windy.com/api"
-
-
-@dataclass
class Request:
+ key: str
lat: float
lon: float
model: Model
parameters: list = None
levels: list = None
endpoint: str = "/point-forecast/v2"
+ api: str = "https://api.windy.com/api"
def json(self):
body = {
@@ -64,5 +60,5 @@ class Request:
return body
-def point_forecast(request: Request, config: Config):
- return requests.post(config.api + request.endpoint, json=request.json())
+def point_forecast(request: Request):
+ return requests.post(request.api + request.endpoint, json=request.json())