Weather forecast need the maxNumberOfDays as argument &cnt=**
The minimum is 1 and the maximum is 17.
This commit is contained in:
Chris 2020-05-31 00:15:54 +09:00 committed by GitHub
parent 8a3a4d6fae
commit 457c80fe76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,6 +294,8 @@ Module.register("weatherforecast", {
return; return;
} }
params += "&cnt=" + (((this.config.maxNumberOfDays < 1) || (this.config.maxNumberOfDays > 17)) ? 7 : this.config.maxNumberOfDays);
params += "&units=" + this.config.units; params += "&units=" + this.config.units;
params += "&lang=" + this.config.lang; params += "&lang=" + this.config.lang;
params += "&APPID=" + this.config.appid; params += "&APPID=" + this.config.appid;