Merge branch 'develop' into bryanzzhu-weather

This commit is contained in:
Michael Teeuw
2020-09-18 12:15:44 +02:00
committed by GitHub
33 changed files with 767 additions and 467 deletions

View File

@@ -12,7 +12,7 @@ var WeatherProvider = Class.extend({
// Weather Provider Properties
providerName: null,
// The following properties have accestor methods.
// The following properties have accessor methods.
// Try to not access them directly.
currentWeatherObject: null,
weatherForecastArray: null,
@@ -136,6 +136,9 @@ WeatherProvider.providers = [];
/**
* Static method to register a new weather provider.
*
* @param {string} providerIdentifier The name of the weather provider
* @param {object} providerDetails The details of the weather provider
*/
WeatherProvider.register = function (providerIdentifier, providerDetails) {
WeatherProvider.providers[providerIdentifier.toLowerCase()] = WeatherProvider.extend(providerDetails);
@@ -143,6 +146,10 @@ WeatherProvider.register = function (providerIdentifier, providerDetails) {
/**
* Static method to initialize a new weather provider.
*
* @param {string} providerIdentifier The name of the weather provider
* @param {object} delegate The weather module
* @returns {object} The new weather provider
*/
WeatherProvider.initialize = function (providerIdentifier, delegate) {
providerIdentifier = providerIdentifier.toLowerCase();