JHershey69 / OpenWeatherOneCall

Open Weather One Call library to gather current, hourly (48), and 7 day weather for your current location
GNU General Public License v3.0
38 stars 11 forks source link

Sunrise, Sunset available from Current forecast #25

Closed blackeneth closed 3 years ago

blackeneth commented 3 years ago

Please provide long SunriseTime, long SunsetTime, char readableSunrise, char readableSunset for the "CURRENT" forecast.

JHershey69 commented 3 years ago

Openweathermap does not have those data items for CURRENT at last update.

blackeneth commented 3 years ago

I see it in the documentation and in the results of queries?

Documentation on "current" oneAPI calls: https://openweathermap.org/api/one-call-api

Example query: https://api.openweathermap.org/data/2.5/onecall?lat=33.49&lon=-111.92&exclude=minutely,hourly,daily,alerts&appid={your api key}&units=imperial&lang=en

Result: {"lat":33.49,"lon":-111.92,"timezone":"America/Phoenix","timezone_offset":-25200,"current":{"dt":1612239916,"sunrise":1612189414,"sunset":1612227539,"temp":64.22,"feels_like":60.57,"pressure":1018,"humidity":34,"dew_point":35.29,"uvi":0,"clouds":75,"visibility":10000,"wind_speed":1.03,"wind_deg":13,"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}]}}

JHershey69 commented 3 years ago

Yes. They are in the next update. As I explained they were not available in the last update. Openweathermap has just updated the data. They will be available.

JHershey69 commented 3 years ago

v3.0.4 has been released it has the requested options. Thank you.