DEV Community

Vishnu Das Puthukudi
Vishnu Das Puthukudi

Posted on

Enhancing the Weather App with Weekly Forecasts

The Weather App i a straightforward yet useful tool for finding out the current weather in any place. It did have one drawback, though it was limited to the most recent meteorological information, More was exactly what users were calling for a weekly weather prediction to help them better organize their schedules.
"Integrate Weatherbit Forecast API" Issue #20, contained the key to enabling this new feature. By integrating the Weatherbit prediction API and adding a "Get Weekly Forecast" function to provide customers a longer prediction for the future week, this issue aims to improve the Weather App.
The Journey started by Examining the Weather App's GitHub source. To get a complete picture of the project's state, I thoroughly examined the source, the README and the open problems.
I started by editing the HTML to give an ID for the js code about the weekly forecast logic. This made it possible for consumers to utilise the new function with ease. I inserted a Weatherbit API key into the JavaScript code that I had acquired. Making API queries and obtaining forecast data required this. Changing the JavaScript code to retrieve and show the weekly forecast data from the Weatherbit API was the main component of the solution. I put error handling into place to provide users helpful warnings when something goes wrong. This had improved the User Experience and maintained a clear Interface.

This is last PR blog of @hacktoberfest2023 #hacktoberfest, I loved being a part of the fest and thank you for the learning.

Top comments (0)