feat(people): add get_profile_by_xuid method#108
Open
misiektoja wants to merge 1 commit intotr4nt0r:mainfrom
Open
feat(people): add get_profile_by_xuid method#108misiektoja wants to merge 1 commit intotr4nt0r:mainfrom
misiektoja wants to merge 1 commit intotr4nt0r:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #108 +/- ##
==========================================
+ Coverage 88.31% 88.35% +0.03%
==========================================
Files 54 54
Lines 2868 2876 +8
==========================================
+ Hits 2533 2541 +8
Misses 335 335 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tr4nt0r
requested changes
Mar 2, 2026
Owner
tr4nt0r
left a comment
There was a problem hiding this comment.
Looks really good, just a little comment
| resp.raise_for_status() | ||
| return PeopleResponse.model_validate_json(resp.text) | ||
|
|
||
| async def get_profile_by_xuid(self, xuid: str, decoration_fields: list[PeopleDecoration] | None = None, **kwargs) -> PeopleResponse: |
Owner
There was a problem hiding this comment.
I just realized that in the profile provider we already have a get_profile_by_xuid, so in terms of Xbox API profile seems to be a different thing. What do you think of get_friend_by_xuid (singular)? That should make clear that it returns only a single friend with the same data as the other get_friends_* methods
Suggested change
| async def get_profile_by_xuid(self, xuid: str, decoration_fields: list[PeopleDecoration] | None = None, **kwargs) -> PeopleResponse: | |
| async def get_friend_by_xuid(self, xuid: str, decoration_fields: list[PeopleDecoration] | None = None, **kwargs) -> PeopleResponse: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
get_profile_by_xuidto PeopleProvider for single-user profile lookups using the/users/me/people/xuids({xuid})endpoint.Returns relationship metadata (isFriend, canBeFriended etc.) from the caller's perspective, useful for profile lookups and relationship checks.