diff --git a/exec/load/openweathermap.js b/exec/load/openweathermap.js index e83ac302616eef57d93b77df980785c4a15c0d05..58107a9079bf4ad4a69a02abf05270019d67c7d1 100644 --- a/exec/load/openweathermap.js +++ b/exec/load/openweathermap.js @@ -72,6 +72,7 @@ OpenWeatherMap.prototype.call_api = function (endpoint, params, raw) { if (!this.rate_limit()) return { error: 'Rate limit exceeded' }; var url = 'http://api.openweathermap.org/data/2.5/' + endpoint; + if (params.mode === undefined) params.mode = 'json'; url += Object.keys(params).reduce(function (a, c, i) { return a + (i == 0 ? '?' : '&') + c + '=' + params[c]; }, '');