diff --git a/projects/gandi/src/gandi/client.py b/projects/gandi/src/gandi/client.py index 9de8052..cedbefd 100644 --- a/projects/gandi/src/gandi/client.py +++ b/projects/gandi/src/gandi/client.py @@ -20,7 +20,7 @@ class GandiAPI(object): """ - def __init__(self, key=None, use_cache=True): + def __init__(self, key: str, use_cache: bool =True): self._base = "https://dns.api.gandi.net/api/v5" self._key = key self._use_cache = use_cache @@ -30,7 +30,7 @@ class GandiAPI(object): def _do_request(self, method, path, headers=None, **kwargs): headers = headers or {} - headers["X-Api-Key"] = self._key + headers["Authorization"] = "Bearer " + self._key resp = method(self._base + path, headers=headers, **kwargs) if resp.status_code > 299: print(resp.text)