Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use StationOverviewExtendedGetStationIdsParameterInner #24

Open
IsaacNez opened this issue Nov 12, 2024 · 1 comment
Open

How to use StationOverviewExtendedGetStationIdsParameterInner #24

IsaacNez opened this issue Nov 12, 2024 · 1 comment

Comments

@IsaacNez
Copy link

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?

@maikgreubel
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants