1.0.1 • Published 9 years ago

weatherman.io v1.0.1

Weekly downloads
14
License
MIT
Repository
github
Last release
9 years ago

Install it

 npm install weatherman.io

Require it

var weatherman = require( "weatherman.io" );

Create a weatherman

var alRoker = new weatherman( "your-forecast-io-api-key" );

Create a weatherman with options

var options = {
    units: "uk",
    exclude: ["minutely", "alerts"],
    extend: "hourly"
};

var alRoker = new weatherman( "your-forecast-io-api-key", options );

Detailed information about each of these options is available in the Forecast.io developer docs: https://developer.forecast.io/docs/v2

Do the forecast from a location

var forecastOptions = {
    latitude: 41.8854710,
    longitude: -87.6430260
};

alRoker.doForecast( forecastOptions, function ( err, weatherReport ) {

    if ( err ) {
        // handle any errors
    }
    // do something with the weatherReport

} );

Do the forecast for a specific time (Unix timestamp)

var forecastOptions = {
    latitude: 41.8854710,
    longitude: -87.6430260,
    time: 1395347280
};

alRoker.doForecast( forecastOptions, function ( err, weatherReport ) {

    if ( err ) {
        // handle any errors
    }
    // do something with the weatherReport

} );
1.0.1

9 years ago

1.0.0

9 years ago

0.1.6

9 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago