Build a weather app that uses the OpenWeatherMap API to fetch the current weather data for a given location.
The app should display the temperature, weather description, and an appropriate icon for the weather condition.
API: https://api.openweathermap.org/data/2.5/weather?q=${query}&appid=${API_KEY}
Generate API_KEY on openweathermap:
- Go to the OpenWeatherMap website at https://openweathermap.org/
- Click on the "Sign Up" button in the top right corner of the page to create a new account.
- Once you have created an account, log in and navigate to the "API keys" page.
- Generate a new API key by clicking on the "Generate" button.
NOTE:
- Use class name
search
for search input. - Use class name
weather
for block displaying weather data of a city.
Output: