Internal PureClarity Weather.js fork. Fetches data from OpenWeatherMap.
Reference the master branch for this repo in the package.json.
npm install PureClarity/weather --save
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()));
});