Git Product home page Git Product logo

weatherman's Introduction

WeatherMan - API A backend service API in NodeJS that retrieves today forecast every 3 hours, for a particular city or location

Setup & Run Application prerequisite - Make sure NodeJs is installed in your computer

  1. Clone the application code in your local folder from the git repo link, https://github.com/alnvny/WeatherMan.git.
  2. Open command prompt and select cloned folder location.
  3. Execute "npm install" in command prompt, which will intall all the dependincies
  4. Execute "npm start" to run the application.

API Request The API request is a GET Request and you need to pass the locaction as a parameter in the API link.

Request link: http://localhost:5000/getWeatherForecast/London
(you can pass the location you request instead of London.)

Request Type : GET
Application Path : /getWeatherForecast/
Parameter : location

Request Type Element Description Type Required Notes
GET location location for which you need the weather forecast details String Yes

###API Response The Information responded by the API for a valid location are listed below:

Element Description Type Notes
temperature Top level data Object
    tempC temperature in Celsius String
    tempF temperature in Fahrenheit String
wind Top level data Object
    windspeedKmph wind speed in Kmph String
    windspeedMiles wind speed in Miles String
precipitation forcast of the precipitation String
weatherIcons icon /icons that matches the weather forcast Array of weather icons Object
sunrise sunrise time of the day String
sunset sunset time of the day String

The Information responded by the API for a invalid location are listed below:

Element Description Type Notes
error error message for invalid lovaction Array of error message object

Application Hoisted & Working API The application is also hoisted in Heroku(cloud platform as a service) through github.

The live working application can be accessed in the below link, 
https://weathermanforecast.herokuapp.com/getWeatherForecast/London

Host : https://weathermanforecast.herokuapp.com
Method: /getWeatherForecast/
Parameter: Location
Parameter example: Chennai

Author Details Name : Gnana Allan Whinney GnanaPragasam

weatherman's People

Contributors

alnvny avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.