weather-info

1.2.0 • Public • Published

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
 
 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"]
---

Package Sidebar

Install

npm i weather-info

Weekly Downloads

0

Version

1.2.0

License

ISC

Last publish

Collaborators

  • ameyashukla