Socket
Socket
Sign inDemoInstall

weatherwoman

Package Overview
Dependencies
2
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    weatherwoman

A Node.js module for the Dark Sky API (previously Forecast.io).


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Install size
3.79 MB
Created
Weekly downloads
 

Readme

Source

A Node.js module for the Dark Sky API (previously known as Forecast.io).

Based on Brian Hines's weatherman.io.

Install it

 npm install weatherwoman

Require it

var weatherwoman = require("weatherwoman");

Create a weatherwoman

var carolKirkwood = new weatherwoman("your-dark-sky-api-key");

Create a weatherwoman with options

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

var carolKirkwood = new weatherwoman("your-dark-sky-api-key", options);

Detailed information about each of these options is available in the Dark Sky developer docs: https://darksky.net/dev/docs

Do the forecast from a location

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

carolKirkwood.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
};

carolKirkwood.doForecast(forecastOptions, function (err, weatherReport)
{
    if (err)
    {
        // handle any errors
    }
    // do something with the weatherReport
});

Keywords

FAQs

Last updated on 30 Sep 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc