Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
wunderground-node
Advanced tools
A simple wrapper for the Wundeground API for Node.js
$ npm install wunderground-node --save
var wunderground = require('wunderground-node');
var client = new wunderground('<api_key_here', 'Boston', 'MA');
Full Init
var wunderground = require('wunderground-node');
var client = new wunderground('<api_key_here', 'Boston', 'MA');
//Gets the forecast in Boston for today
client.forecast('forecast', '', function(err, data){
if(err) throw err;
console.log(data);
});
//Gets a summary of the weather in Boston on May 21st, 2011
client.history('history', '20110521', '', function(err,data){
if(err) throw err;
console.log(data);
});
//Gets a summary of the weather in Boston between the dates May 21st - May 28th of this year.
client.planner('planner', '05210528', '', function(err, data){
if(err) throw err;
console.log(data);
});
Half Init
var wunderground = require('wunderground-node');
var client = new wunderground('<api_key_here'>);
var opts = {
city: 'Boston',
state: 'MA'
};
//Gets the forecast in Boston for today
client.forecast('forecast', opts, function(err, data){
if(err) throw err;
console.log(data);
});
//Gets a summary of the weather in Boston on May 21st, 2011
client.history('history', '20110521', opts, function(err,data){
if(err) throw err;
console.log(data);
});
//Gets a summary of the weather in Boston between the dates May 21st - May 28th of this year.
client.planner('planner', '05210528', opts, function(err, data){
if(err) throw err;
console.log(data);
});
No Init
var wunderground = require('wunderground-node');
var client = new wunderground();
var opts = {
key: '<api_key_here>',
city: 'Boston',
state: 'MA'
};
//Gets the forecast in Boston for today
client.forecast('forecast', opts, function(err, data){
if(err) throw err;
console.log(data);
});
//Gets a summary of the weather in Boston on May 21st, 2011
client.history('history', '20110521', opts, function(err,data){
if(err) throw err;
console.log(data);
});
//Gets a summary of the weather in Boston between the dates May 21st - May 28th of this year.
client.planner('planner', '05210528', opts, function(err, data){
if(err) throw err;
console.log(data);
});
When configuring a new wunderground client, you must provide the following:
All params are initially optional and can be overwritten using an opts object.
Gets the conditions for a specific location
Gets the forecast for a specific location
Gets the forecast 10 days in advance for a specific location
Gets the hourly conditions for a specific location
Gets the hourly conditions 10 days in advance for a specific location
Gets the alerts for a specific location
Gets the average low and high temperatures
Gets the moon phases, sunrise and sunset times
Gets information on current hurricanes and tropical storms
Gets the city name, zip/postal code, latitude & longitude coordinates
Gets the summary of the weather on the specificed date. Must be passed into the function in the format: YYYYMMDD
Gets the summary based on the time interval specified. Must be passed into the function in the format: MMDDMMDD
Gets raw tidal information
Gets the URL to the .gif visual and infrared satellite images
Gets tidal information
Gets the locations of nearby weather stations and URLs for images from their web cams
Gets the summary of the weather for yesterday
#Testing
$ mocha
See Issues
This code is licensed under the MIT license. Full license text is available in LICENSE
FAQs
Simplified wrapper for using The Weather Channel's APIs.
The npm package wunderground-node receives a total of 1 weekly downloads. As such, wunderground-node popularity was classified as not popular.
We found that wunderground-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.