1.2.0 • Published 8 years ago

weather-info v1.2.0

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

weather-info

npm package

Build status

Super simple to use

weather-info is a npm package for providing weather information in the most simplest way possible.

var weather = require('weather-info');

weather.getCurrentWeatherData(0,['london,uk'],function(err,data){
  if(err) {
    console.log(err);
  } else {
    console.log(data);
  }
})

Table of contents


Current Weather Data

weather.getCurrentWeatherData(type,[parameters],callback);

Code For type is :-
  0 : By City Name
  1 : By City Id
  2 : By City lattitude and longitude
  3 : By zipcode
 
 Sample parameters :-
  if type is 0 ==> [city name,country code]
   Example -> ['london,uk']
  if type is 1 ==> [city id]
   Example -> [22917]
  if type is 2 ==> [lat,long]
   Example -> [23.22,-12.22]
  if type is 3 ==> [zipcode,Country name]
   Example -> ["94040,us"]

please find the city codes here