Add get_title_info_by_xuid to titlehub provider - #201
Merged
Merged
Conversation
Add `get_title_info_by_xuid`, which looks up a friend's title info by their xuid. The private `_get_title_info` helper now takes the xuid, and the existing methods pass the signed-in user's, so they behave as before.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #201 +/- ##
==========================================
+ Coverage 88.35% 88.39% +0.04%
==========================================
Files 54 54
Lines 2876 2878 +2
==========================================
+ Hits 2541 2544 +3
+ Misses 335 334 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
The codecov miss is the |
Contributor
Author
|
Added the test for |
Owner
|
Thanks for your PR and also thanks for adding the test. Will try to have a look this weekend. Do you also have a core PR ready? |
Contributor
Author
Just putting one together now... |
21 tasks
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.
I'm looking to build a Home Assistant dashboard that shows the status of my family's Xbox's that are in my account. A future patch to the Xbox integration needs a function to show each friend's own achievements, gamerscore and progress for the game they are playing.
This PR adds
get_title_info_by_xuid, which looks up a friend's title info by their xuid._get_title_infonow takes the xuid as an argument instead of always using the signed-in user's.get_title_infoandget_title_info_by_pfnnow pass the signed-in user's xuid to that helper. Their arguments and results are the same as before, so existing callers see no difference.Tested against the live API with a friend's xuid. It returns HTTP 200 with the friend's own figures.