Gameel-Allam / Weather-App

A React Weather App that utilizes the OpenWeatherMap API to return current and 7 day forecasted weather for a given location retrieved it`s coordinates using GeoDB Cities Api.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Weather App

A simple weather app built on top of openweathermap & GeoDB Cities Apis

Getting started

  • Sign up over openweathermap and get an API key.

  • Sign and subscribe up over openweathermap to get an API key.

  • Fork the project and clone it locally.

  • Install dependencies using npm:

    npm install
  • Inside the components file at api.js src\components\api.js write the keys you get from openweathermap & GeoDB:

    export const GEODB_OPTIONS = {
    method: 'GET',
    headers: {
    	'X-RapidAPI-Key': 'The API key you obtained from geodb-cities',
    	'X-RapidAPI-Host': 'wft-geo-db.p.rapidapi.com'
      }
    };
    export const GEODB_CITIES = 'https://wft-geo-db.p.rapidapi.com/v1/geo/adminDivisions';
    
    export const OPEN_WEATHER_KEY = `The API key you obtained from openweathermap`;
    export const OPEN_WEATHER_URL = `https://api.openweathermap.org/data/2.5`;
    
  • Start the project :

    npm start

APIs

About

A React Weather App that utilizes the OpenWeatherMap API to return current and 7 day forecasted weather for a given location retrieved it`s coordinates using GeoDB Cities Api.


Languages

Language:JavaScript 58.3%Language:CSS 29.4%Language:HTML 12.4%