refactor(api-client): allow custom retry strategy

This commit is contained in:
jo 2023-02-26 13:17:36 +01:00 committed by Kyle Robbertze
parent e992d7147e
commit ad00272168
2 changed files with 28 additions and 12 deletions

View file

@ -1,11 +1,14 @@
from ._client import AbstractApiClient, Response
from ._client import AbstractApiClient, Response, default_retry
class ApiClient(AbstractApiClient):
VERSION = "2.0"
def __init__(self, base_url: str, api_key: str):
super().__init__(base_url=base_url)
super().__init__(
base_url=base_url,
retry=default_retry(),
)
self.session.headers.update({"Authorization": f"Api-Key {api_key}"})
def get_info(self, **kwargs) -> Response: