Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-red-node-openweathermap

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-node-openweathermap - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

1

locales/en-US/weather.json

@@ -9,2 +9,3 @@ {

"option_5dayforecast": "5 day forecast for",
"option_onecall": "combined current weather/forecast for",
"option_city": "City, Country",

@@ -11,0 +12,0 @@ "option_coordinates": "Coordinates",

2

package.json
{
"name": "node-red-node-openweathermap",
"version": "0.2.2",
"version": "0.3.0",
"description": "A Node-RED node that gets the weather report from openweathermap",

@@ -5,0 +5,0 @@ "dependencies": {

@@ -58,3 +58,3 @@ /**

}
} else {
} else if (node.wtype === "current") {
if (node.lat && node.lon) {

@@ -65,2 +65,6 @@ url = "http://api.openweathermap.org/data/2.5/weather?lang=" + node.language + "&lat=" + node.lat + "&lon=" + node.lon + "&APPID=" + node.credentials.apikey;

}
} else if (node.wtype === "onecall") {
if (node.lat && node.lon) {
url = "https://api.openweathermap.org/data/2.5/onecall?lang=" + node.language + "&lat=" + node.lat + "&lon=" + node.lon + "&units=metric&APPID=" + node.credentials.apikey;
}
}

@@ -133,2 +137,12 @@

callback();
} else if(jsun.hasOwnProperty("current") && jsun.hasOwnProperty("hourly") && jsun.hasOwnProperty("daily")) {
msg.payload.current = jsun.current;
msg.payload.hourly = jsun.hourly;
msg.payload.daily = jsun.daily;
if(jsun.hasOwnProperty('minutely')) {
msg.payload.minutely = jsun.minutely;
}
msg.location.lat = jsun.lat;
msg.location.lon = jsun.lon;
callback();
} else {

@@ -135,0 +149,0 @@ if (jsun.message === "Error: Not found city") {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc