Skip to content

Simple Weather app created with HTML, CSS, and JavaScript using the APIs for fetching weather and geolocation information.

License

Notifications You must be signed in to change notification settings

KaranChandekar/weather-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple Weather app created with HTML, CSS, and JavaScript using the APIs for fetching weather and geolocation information.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published