Merge branch 'main' into 95-send-spots-to-xota

# Conflicts:
#	webassets/apidocs/openapi.yml
This commit is contained in:
Ian Renton
2026-06-21 11:12:48 +01:00
11 changed files with 52 additions and 21 deletions

View File

@@ -19,13 +19,15 @@ class GMA(HTTPSpotProvider):
REF_INFO_URL_ROOT = "https://www.cqgma.org/api/ref/?"
def __init__(self, provider_config):
# Ensure there is an API key in our config, and set up the query URL using it
# Ensure there is an API key in our config, and set up the query URL using it. If no key is provided,
# disable this spot provider.
self.api_key = provider_config.get("api-key", "")
if self.api_key != "":
super().__init__(provider_config, self.SPOTS_URL + "?key=" + self.api_key, self.POLL_INTERVAL_SEC)
else:
if self.api_key == "":
provider_config["enabled"] = False
logging.warning("GMA spot provider configured but no api key was provided, this API will not be queried.")
super().__init__(provider_config, self.SPOTS_URL + "?key=" + self.api_key, self.POLL_INTERVAL_SEC)
def _http_response_to_spots(self, http_response):
new_spots = []
# Iterate through source data