Skip to content

Commit

Permalink
feat: Add http_client parameter to constructor of Classes that inhe…
Browse files Browse the repository at this point in the history
…rit from TrackerClient
  • Loading branch information
dev-ruby committed Oct 23, 2023
1 parent ca56433 commit cc2f6dc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions TrackerGG/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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:
"""
Expand Down Expand Up @@ -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:
"""
Expand Down

0 comments on commit cc2f6dc

Please sign in to comment.