Skip to content

Latest commit

 

History

History
70 lines (49 loc) · 1.87 KB

README.md

File metadata and controls

70 lines (49 loc) · 1.87 KB

Weather App

Simple Weather app created with HTML, CSS, and JavaScript using the APIs for fetching weather and geolocation information - Take a look

Practice

Used Languages

  • HTML
  • CSS
  • Vanilla JS - ES6
  • Awesomeness - Strictly for the love of coding :-)

How I made the API call

fetchWeather: function (city) {
    fetch(
      "https://api.openweathermap.org/data/2.5/weather?q=" +
        city +
        "&units=metric&appid=" +
        this.apiKey
    )
      .then((response) => {
        if (!response.ok) {
          alert("No weather found.");
          throw new Error("No weather found.");
        }
        return response.json();
      })
      .then((data) => this.displayWeather(data));
  },

Used APIs

  • Open Weather API
  • Unsplash API

Steps to Use:

  • Download Code or Clone the repository
git clone https://github.com/KaranChandekar/weather-app.git
  • Go to the directory
  • Run the index.html file
  • Just Type the city name you want to know the weather of, and then click on the search button.
  • After that it will automatically display Weather, Humidity, Wind Speed of the enered city.

Screenshot

weatherapp

Demo

Weather.App.mp4

Contribution

Contributions are highly welcome. Feel free to fork, clone, make pull requests, report issues etc.

Acknowledgments

  • Anyone who is reading this... You're awesome!

That being said

To the Front... to the Back... End to End... cut no slack. Making ends meet. lol