UNPKG

weather-info

Version:
54 lines (37 loc) 1.21 kB
# weather-info [![npm package](https://nodei.co/npm/weather-info.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/weather-info/) [![Build status](https://img.shields.io/travis/weather-info/weather-info/master.svg?style=flat-square)](https://travis-ci.org/weather-info/weather-info) ## Super simple to use weather-info is a npm package for providing weather information in the most simplest way possible. ```js 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](#current-weather) - [5 Day Forcast Data](#forcast-weather) --- ## Current Weather Data ```js 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"] ---