Skip to content

Commit

Permalink
Merge pull request #8 from dev-ruby/dev
Browse files Browse the repository at this point in the history
Use `get_http_client`'s lib parameter
dev-ruby authored Oct 23, 2023
2 parents ca56433 + cc2f6dc commit 188e76d
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
@@ -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:
"""

0 comments on commit 188e76d

Please sign in to comment.