Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "meteosapi", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "nodejs wrapper over the Aemet public API", | ||
@@ -32,2 +32,3 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"iconv-lite": "^0.4.15", | ||
"request-promise": "^4.1.1" | ||
@@ -34,0 +35,0 @@ }, |
@@ -10,3 +10,3 @@ const rp = require('request-promise'); | ||
return rp(options) | ||
.then(response => rp(JSON.parse(response).datos) | ||
.then(response => rp({url: JSON.parse(response).datos, encoding: null}) | ||
.then(response => Prediction(response))); | ||
@@ -13,0 +13,0 @@ } |
@@ -9,3 +9,3 @@ const BASE_URL = 'https://opendata.aemet.es/opendata/api/prediccion/especifica/municipio/diaria/'; | ||
Accept: 'application/javascript', | ||
} | ||
}, | ||
} | ||
@@ -12,0 +12,0 @@ } |
@@ -0,2 +1,5 @@ | ||
const iconv = require('iconv-lite'); | ||
function Prediction(data) { | ||
data = iconv.decode(data, "ISO-8859-1"); | ||
var data = JSON.parse(data)[0]; | ||
@@ -3,0 +6,0 @@ var name = data.nombre; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8064
68
2
+ Addediconv-lite@^0.4.15
+ Addediconv-lite@0.4.24(transitive)