From 8844ab1afc8699ba6fd0a50a916fa17275e9bcd7 Mon Sep 17 00:00:00 2001 From: Doug Applegate Date: Fri, 12 Apr 2024 15:13:33 -0600 Subject: [PATCH] adding protection for different key combinations --- ncm/ncm/ncm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ncm/ncm/ncm.py b/ncm/ncm/ncm.py index e984e0f..457a9c7 100644 --- a/ncm/ncm/ncm.py +++ b/ncm/ncm/ncm.py @@ -156,6 +156,7 @@ def __init__(self, retry_backoff_factor=2, retry_on=None, base_url=None): + self.v2 = self # for backwards compatibility base_url = base_url or os.environ.get("CP_BASE_URL", "https://www.cradlepointecm.com/api/v2") super().__init__(log_events=log_events, logger=logger, retries=retries, retry_backoff_factor=retry_backoff_factor, retry_on=retry_on, base_url=base_url) if api_keys: @@ -2122,6 +2123,7 @@ def __init__(self, :param base_url: # base url for calls. Configurable for testing. Optional. """ + self.v3 = self # For backwards compatibility base_url = base_url or os.environ.get("CP_BASE_URL_V3", "https://api.cradlepointecm.com/api/v3") super().__init__(log_events, logger, retries, retry_backoff_factor, retry_on, base_url) if api_key: