Update jsdocs

This commit is contained in:
veeck 2021-09-02 20:35:43 +02:00
parent a273266e5e
commit 9ee11654a6
2 changed files with 8 additions and 7 deletions

View File

@ -232,16 +232,16 @@ WeatherProvider.register("ukmetoffice", {
return windCardinals.hasOwnProperty(windDirection) ? windCardinals[windDirection] : null; return windCardinals.hasOwnProperty(windDirection) ? windCardinals[windDirection] : null;
}, },
/* /**
* Generates an url with api parameters based on the config. * Generates an url with api parameters based on the config.
* *
* return String - URL params. * @param {string} forecastType daily or 3hourly forecast
* @returns {string} url
*/ */
getParams(forecastType) { getParams(forecastType) {
let params = "?"; let params = "?";
params += "res=" + forecastType; params += "res=" + forecastType;
params += "&key=" + this.config.apiKey; params += "&key=" + this.config.apiKey;
return params; return params;
} }
}); });

View File

@ -13,11 +13,12 @@
*/ */
class WeatherObject { class WeatherObject {
/** /**
* Constructor for a WeatherObject
* *
* @param units * @param {string} units what units to use, "imperial" or "metric"
* @param tempUnits * @param {string} tempUnits what tempunits to use
* @param windUnits * @param {string} windUnits what windunits to use
* @param useKmh * @param {boolean} useKmh use kmh if true, mps if false
*/ */
constructor(units, tempUnits, windUnits, useKmh) { constructor(units, tempUnits, windUnits, useKmh) {
this.units = units; this.units = units;