dwd-api
dwd-api copied to clipboard
How to use `StationOverviewExtendedGetStationIdsParameterInner`
The example in the Python Client does not run as None is a positional argument that StationOverviewExtendedGetStationIdsParameterInner does not take. In the documentation, there is no example of valid kwargs. Can you provide one?
The station_overview_extended_get() request seems to be broken. I've got empty response (no error) with the code
import time
from deutschland import dwd
from pprint import pprint
from deutschland.dwd.api import default_api
from deutschland.dwd.model.station_overview_extended_get_station_ids_parameter_inner import StationOverviewExtendedGetStationIdsParameterInner
configuration = dwd.Configuration(
host = "https://app-prod-ws.warnwetter.de/v30"
)
with dwd.ApiClient(configuration) as api_client:
api_instance = default_api.DefaultApi(api_client)
station_ids = [ StationOverviewExtendedGetStationIdsParameterInner( {"stationIds": "10865"} ) ]
try:
api_response = api_instance.station_overview_extended_get(station_ids = station_ids)
pprint(api_response)
except dwd.ApiException as ex:
print("%s\n" % ex)
Finally I've found a working solution with 5 lines of code:
import urllib.request, json
from pprint import pprint
with urllib.request.urlopen("https://app-prod-ws.warnwetter.de/v30/stationOverviewExtended?stationIds=10865") as url:
data = json.load(url)
pprint(data)