Skip to content

PureClarity/weather

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

102 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather.js

GitHub license

About

Internal PureClarity Weather.js fork. Fetches data from OpenWeatherMap.

Install

Reference the master branch for this repo in the package.json.

npm install PureClarity/weather --save

Usage

Access the current weather conditions for any city. By default it will use the closest match as returned by Open Weather Map.

Weather.getCurrentCityCountry("York", 'GB', function(current) {
  console.log(
    ["currently:",current.temperature(),"and",current.conditions()].join(" ")
  );
});

Weather.getForecast("York", function(forecast) {
  console.log("Forecast High in Kelvin: " + forecast.high());
  console.log("Forecast High in Fahrenheit" + Weather.kelvinToFahrenheit(forecast.high()));
  console.log("Forecast High in Celsius" + Weather.kelvinToCelsius(forecast.high()));
});

About

Weather wrapper for OpenWeatherMapAPI

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%