Closed aikitori closed 2 weeks ago
Dear @aikitori ,
thanks for reporting this! There was an issue with the request class of DMO which is now fixed.
A possible request should look like this:
http://127.0.0.1:7890/api/values?provider=dwd&network=dmo¶meter=temperature_air_mean_200&resolution=icon&date=2024-05-27&station=01001
See that I am using icon
as resolution (other option would be icon_eu
) as DMO does have a fixed resolution but two different datasets for ICON/ICON-EU.
I'd be happy seeing a PR by you!
Is there a reason, why there a spaces instead if slashes in th urls? And why there are double equal signs? sorry for asking, i'm not very familar sphinx and rst. i have check the docs. https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#hyperlinks
e.g. http localhost:7890/api/dwd/observation/values stations==1048,4411 parameter==kl resolution==daily period==recent
I'm just seeing that those examples are outdated! Would you mind setting up another PR with updated examples?
E.g. stations call
http localhost:7890/api/dwd/observation/stations parameter==kl resolution==daily period==recent
should become
http localhost:7890/api/stations provider==dwd network==observation parameter==kl resolution==daily period==recent
values call
http localhost:7890/api/dwd/observation/values stations==1048,4411 parameter==kl resolution==daily period==recent
should become
http localhost:7890/api/values provider==dwd network==observation station==1048,4411 parameter==kl resolution==daily period==recent
The examples you are seeing are based off of the library httpie (https://github.com/httpie/cli), that allows the user to make some really nice human looking requests. You see those ==
being used for GET request parameters while =
would be used for a POST request sending data.
If you'd be up for the PR it would be good to have a link to httpie in the top.
What do you think?
I can update all the links and add some new ones.
Yeah link to httpie should be good. Otherwiese, i like curl-command, which you can copy into the browser for scanning large result sets
That'd be great! I agree with curl and is already installed on Linux, but I would just leave it as is.
Just added the examples to the docs. Thanks again for the hint!
Describe the bug I try to get dmo data via the restapi, but i don't now which combination of url-parmaters i should use
Are there any examples available, like here: https://wetterdienst.readthedocs.io/en/latest/usage/restapi.html
I can help writing some examples for the documentation, when i know how to do it.
I tryed the urls e.g.:
http://127.0.0.1:7890/api/values?provider=dwd&network=dmo¶meter=temperature_air_mean_200&resolution=hourly&date=2024-05-27
http://127.0.0.1:7890/api/values?provider=dwd&network=dmo¶meter=temperature_air_mean_200&resolution=hourly&date=2024-05-27&stations=4411
http://127.0.0.1:7890/api/values?provider=dwd&network=dmo¶meter=temperature_air_mean_200&date=2024-05-27&resolution=icon-eu&coordinates=52,8&rank=1 result:
To Reproduce Install vio docker-compose:
enter url and hit enter
Expected behavior
Getting dmo/icon data
Desktop (please complete the following information):
Additional context Add any other context about the problem here.