WeatherLib
WeatherLib copied to clipboard
Fix NumberFormatException and refactor YahooWeatherProvider
Hi, basically each commit describes what has been done. I only want to describe "Unify parsing of current weather and forecast" a bit:
Parsing of current and forecast weather was done in similar ways, with a lot of redundant code in both methods. I created a single method to parse it and choose afterwards if current or forecast weather is needed. This has some nice side effects:
- Units are now also parsed for the current weather
- Location data is now available in forecast
- Added latitude and longitude to location since data was available but not parsed yet
Hi, thx for your support, Weatherlib needs a code riview and refactoring to improve it. I will check your pull request and add it into the main branch.
I added a new commit which implements the recent API changes from Yahoo.