node-red-node-darksky
Advanced tools
Comparing version 0.1.12 to 0.1.13
@@ -67,6 +67,6 @@ /** | ||
if (node.year && node.month && node.day && node.hours && node.minutes) { | ||
url = ("https://api.darksky.net/forecast/" + node.apikey + "/" + node.lat + "," + node.lon + "," + node.year + "-" + node.month + "-" + node.day + "T" + node.hours + ":" + node.minutes + ":00?units=" + node.units); | ||
url = ("https://api.darksky.net/forecast/" + node.apikey + "/" + node.lat + "," + node.lon + "," + node.year + "-" + node.month + "-" + node.day + "T" + node.hours + ":" + node.minutes + ":00?units=" + node.units + "&lang=" + node.lang); | ||
when = 0; | ||
} else if (node.lat && node.lon && node.apikey) { | ||
url = ("https://api.darksky.net/forecast/" + node.apikey + "/" + node.lat + "," + node.lon + "?units=" + node.units); | ||
url = ("https://api.darksky.net/forecast/" + node.apikey + "/" + node.lat + "," + node.lon + "?units=" + node.units + "&lang=" + node.lang); | ||
when = 1; | ||
@@ -128,3 +128,4 @@ } | ||
RED.nodes.createNode(this, n); | ||
this.units = n.units || "us"; | ||
this.lang = n.lang || "en"; | ||
this.units = n.units || "us"; | ||
var node = this; | ||
@@ -131,0 +132,0 @@ this.repeat = 900000; |
@@ -17,2 +17,3 @@ { | ||
"key": "Key", | ||
"lang": "Language", | ||
"units": "Units" | ||
@@ -44,2 +45,37 @@ }, | ||
}, | ||
"lang": { | ||
"ar": "Arabic", | ||
"az": "Azerbaijani", | ||
"be": "Belarusian", | ||
"bs": "Bosnian", | ||
"ca": "Catalan", | ||
"cs": "Czech", | ||
"de": "German", | ||
"el": "Greek", | ||
"en": "English (default)", | ||
"es": "Spanish", | ||
"et": "Estonian", | ||
"fr": "French", | ||
"hr": "Croatian", | ||
"hu": "Hungarian", | ||
"id": "Indonesian", | ||
"it": "Italian", | ||
"is": "Icelandic", | ||
"kw": "Cornish", | ||
"nb": "Norwegian Bokmål", | ||
"nl": "Dutch", | ||
"pl": "Polish", | ||
"pt": "Portuguese", | ||
"ru": "Russian", | ||
"sk": "Slovak", | ||
"sl": "Slovenian", | ||
"sr": "Serbian", | ||
"sv": "Swedish", | ||
"tet": "Tetum", | ||
"tr": "Turkish", | ||
"uk": "Ukrainian", | ||
"x-pig-latin": "Igpay Atinlay", | ||
"zh": "simplified Chinese", | ||
"zh-tw": "traditional Chinese" | ||
}, | ||
"units": { | ||
@@ -46,0 +82,0 @@ "us": "us - imperial us units", |
{ | ||
"name" : "node-red-node-darksky", | ||
"version" : "0.1.12", | ||
"version" : "0.1.13", | ||
"description" : "A Node-RED node that gets the weather forecast from the DarkSky API", | ||
@@ -5,0 +5,0 @@ "dependencies" : { |
Sorry, the diff of this file is not supported yet
49884
317