Socket
Socket
Sign inDemoInstall

meteo-portugal

Package Overview
Dependencies
68
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    meteo-portugal

Calls on several weather forecast APIs to get a consensus view of the forecast


Version published
Weekly downloads
1
Maintainers
1
Install size
10.1 MB
Created
Weekly downloads
 

Readme

Source

Weather forecast in Portugal

Retrieves weather forecasts from multiple (plus 1 specific for Portugal)

npm version Build Status codecov

Install

$ npm install meteo-portugal

Usage

You neet get a darksky API key from darksky.net for this data source

const {DarkSky, MeteoIST} = require('meteo-portugal');

const ist = new MeteoIST();
const ds = new DarkSky('key-from-darksky');

ds.forecastWeek(-9.2156, 38.4201) // (longitude, latitutde)
  .then(response => console.log(response))
  .catch(error => console.log(error));

ist.forecastWeek(-9.2156, 38.4201) // (longitude, latitutde)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Test

$ OPENWEATHER_KEY='key-from-openweather' DARKSKY_KEY='key-from-darksky' npm test

Or see the full response by

$ OPENWEATHER_KEY='key-from-openweather' DARKSKY_KEY='key-from-darksky' npm visual-test

FAQs

Last updated on 09 Jun 2020

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