marians / openweather

Rudimentary python client for OpenWeatherMap.org
9 stars 4 forks source link

Attempt to support the latest API (Work in Progress) #11

Closed marians closed 2 years ago

marians commented 9 years ago

OpenWeathermap has discontinued the API version 2.1, which is the one supported by the current code in master.

This PR represents the work in progress attempt to support API version 2.5.

Feel free to comment or send your own Pull Requests based on the api-version-2-5 branch.

marians commented 9 years ago

Currently I have trouble reconstructing the method fetching historic data for a given station ID, where start and end are given as dates (get_historic_weather()). The API docs don't mention the old start and end URL parameters any longer.

This URL, which is a translation from the 2.1 version to the current route, only produces error 500 for me. http://api.openweathermap.org/data/2.5/history/station?id=136098&type=hour&start=1431625203&end=1431711603

Hard to tell if this is due to bad request parameters.

jlmcgehee21 commented 8 years ago

Is there an eta on this?

marians commented 8 years ago

No, @jlmcgehee21, there is no timeline for the work on this.

jlmcgehee21 commented 8 years ago

Oh no, I just found this project and was looking forward to using it. I wouldn't mind contributing if it's not terribly far from being done.

marians commented 8 years ago

It looks as if openweathermap.org has discontinued the option to fetch historical station data for arbitrary time intervals. See http://openweathermap.org/history#stations for the current offering.

Conceptually, this means that the client should work different in the future:

So if somebody wants to create a long-term archive of weather data, it has to be done be regularly querying the openweathermap service. Since the fetched copy is, after some time, the only accessible version of the data, this puts some more strain on reliable data storing. I guess that's outside the scope of what should be handled in a client tool like this.

marians commented 2 years ago

Sorry, can't do any work on this due to time constraints and priorities.