Skip to content

Commit cc2f6dc

Browse files
committed
feat: Add http_client parameter to constructor of Classes that inherit from TrackerClient
1 parent ca56433 commit cc2f6dc

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

TrackerGG/client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def __init__(self, api_key: str, http_client: Optional[HTTPClientLibrary] = None
5050

5151
self.loop = asyncio.get_event_loop()
5252
self.api_key = api_key
53-
self.http_client = get_http_client(self.loop, self.api_key)
53+
self.http_client = get_http_client(self.loop, self.api_key, http_client)
5454

5555

5656
class CSGOClient(TrackerClient):
@@ -61,8 +61,8 @@ class CSGOClient(TrackerClient):
6161
:param api_key: :class:`str` Tracker API Key.
6262
"""
6363

64-
def __init__(self, api_key: str) -> None:
65-
super().__init__(api_key)
64+
def __init__(self, api_key: str, http_client: Optional[HTTPClientLibrary] = None) -> None:
65+
super().__init__(api_key, http_client)
6666

6767
async def get_profile(self, identifier: str) -> CSGOProfile:
6868
"""
@@ -173,8 +173,8 @@ async def search_profile(self, query: str) -> Union[None, List[CSGOQueryData]]:
173173

174174

175175
class ApexClient(TrackerClient):
176-
def __init__(self, api_key: str) -> None:
177-
super().__init__(api_key)
176+
def __init__(self, api_key: str, http_client: Optional[HTTPClientLibrary] = None) -> None:
177+
super().__init__(api_key, http_client)
178178

179179
async def get_profile(self, identifier: str, platform: Platform) -> ApexProfile:
180180
"""

0 commit comments

Comments
 (0)