From cc2f6dc185f8f6eb4753d196c51e6c233de7d093 Mon Sep 17 00:00:00 2001 From: DevRuby Date: Mon, 23 Oct 2023 17:23:02 +0900 Subject: [PATCH] feat: Add `http_client` parameter to constructor of Classes that inherit from TrackerClient --- TrackerGG/client.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/TrackerGG/client.py b/TrackerGG/client.py index d2493b1..5173998 100644 --- a/TrackerGG/client.py +++ b/TrackerGG/client.py @@ -50,7 +50,7 @@ def __init__(self, api_key: str, http_client: Optional[HTTPClientLibrary] = None self.loop = asyncio.get_event_loop() self.api_key = api_key - self.http_client = get_http_client(self.loop, self.api_key) + self.http_client = get_http_client(self.loop, self.api_key, http_client) class CSGOClient(TrackerClient): @@ -61,8 +61,8 @@ class CSGOClient(TrackerClient): :param api_key: :class:`str` Tracker API Key. """ - def __init__(self, api_key: str) -> None: - super().__init__(api_key) + def __init__(self, api_key: str, http_client: Optional[HTTPClientLibrary] = None) -> None: + super().__init__(api_key, http_client) async def get_profile(self, identifier: str) -> CSGOProfile: """ @@ -173,8 +173,8 @@ async def search_profile(self, query: str) -> Union[None, List[CSGOQueryData]]: class ApexClient(TrackerClient): - def __init__(self, api_key: str) -> None: - super().__init__(api_key) + def __init__(self, api_key: str, http_client: Optional[HTTPClientLibrary] = None) -> None: + super().__init__(api_key, http_client) async def get_profile(self, identifier: str, platform: Platform) -> ApexProfile: """