Skip to content

Commit

Permalink
🖼️Profile Request
Browse files Browse the repository at this point in the history
  • Loading branch information
Aluerie committed Sep 30, 2024
1 parent da9d459 commit 8d166c3
Show file tree
Hide file tree
Showing 5 changed files with 201 additions and 3 deletions.
11 changes: 10 additions & 1 deletion steam/ext/dota2/models/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ class PartialUser(abc.PartialUser):
__slots__ = ()
_state: GCState

async def profile_card(self) -> ProfileCard:
async def dota2_profile(self):
"""Fetch user's Dota 2 profile card.
Contains basic information about the account. Somewhat mirrors old profile page.
"""
await self._state.ws.send_gc_message(client_messages.ProfileRequest(account_id=self.id))
response = await self._state.ws.gc_wait_for(client_messages.ProfileResponse)
return response # TODO: Modelize (?)

async def dota2_profile_card(self) -> ProfileCard:
"""Fetch user's Dota 2 profile card.
Contains basic information about the account. Somewhat mirrors old profile page.
Expand Down
42 changes: 42 additions & 0 deletions steam/ext/dota2/protobufs/base.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 44 additions & 1 deletion steam/ext/dota2/protobufs/client_messages.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 55 additions & 1 deletion steam/ext/dota2/protobufs/common.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 50 additions & 0 deletions steam/ext/dota2/protobufs/shared_enums.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8d166c3

Please sign in to comment.