This website will give weather information about popular cities in the world
https://surajsinghgore.github.io/weatherweb/
Client: HTML,CSS,JAVASCRIPT
APIS: Open Weather API
------HTML-------
<form>
<input type="search" name="search"
id="searhInput" placeholder="🔍 Search your City.." >
</form>
--------JS--------
const searchBarWork=async(e)=>{
const searhInput=document.getElementById('searhInput').value.toLowerCase();
closeSearchBar();
e.preventDefault()
// data fetch
let cityRes=await fetch(`https://api.openweathermap.org/data/2.5/weather?
q=${searhInput}&
appid={APIKEY}&units=metric`)
let resData=await cityRes.json();
// set data
document.getElementById('city').innerText=searhInput;
document.getElementById('temp').innerText=resData.main.temp_min;
document.getElementById('searhInput').value = ''
}
document.getElementById('form').addEventListener('submit',searchBarWork)
GET https://api.openweathermap.org/data/2.5/weather?q=${place}&appid={api_key}&units=metric
Parameter | Type | Description |
---|---|---|
api_key |
string |
Required. Your API key |
place |
string |
Required. Place for weather to search |
Color | Hex |
---|---|
BackgroundColor |
For support, email [email protected]
-
Create Ui using HTML,CSS
-
Using Js integrate api mentioned about
- Wide varieties of places to search weather
- Responsive mode
- Basic Project for beginners
- Simple and clean UI
You can subscribe paid or best weather Api provider
You can make strong your javascript logic by fetching data from third parties apis provides.
You will learn how to manipulate api data with your fronted site
If you have any feedback, please reach out to us at [email protected]
Javascript, HTML, CSS...