Skip to content

Add get_title_info_by_xuid to titlehub provider - #201

Merged
tr4nt0r merged 2 commits into
tr4nt0r:mainfrom
scardus:titlehub_title_info_by_xuid
Sep 18, 2026
Merged

tr4nt0r merged 2 commits into
tr4nt0r:mainfrom
scardus:titlehub_title_info_by_xuid

Conversation

@scardus

@scardus scardus commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

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_info now takes the xuid as an argument instead of always using the signed-in user's. get_title_info and get_title_info_by_pfn now 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.

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.
@github-actions github-actions Bot added the 🧪 testing Pull request that adds tests label Sep 11, 2026
@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.39%. Comparing base (b3d3239) to head (20e94b7).
⚠️ Report is 15 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@scardus

scardus commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

The codecov miss is the pfn(...) line in get_title_info_by_pfn. That method has no test, my diff just rewrapped the line so it got counted. Want me to add one?

@scardus

scardus commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Added the test for get_title_info_by_pfn.

@tr4nt0r

tr4nt0r commented Sep 18, 2026

Copy link
Copy Markdown
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?

@tr4nt0r tr4nt0r added 🚀 feature New feature or request and removed 🧪 testing Pull request that adds tests labels Sep 18, 2026

@tr4nt0r tr4nt0r left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏼

@tr4nt0r
tr4nt0r merged commit ed1cf54 into tr4nt0r:main Sep 18, 2026
7 of 8 checks passed
@scardus

scardus commented Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

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?

Just putting one together now...

@scardus
scardus deleted the titlehub_title_info_by_xuid branch September 19, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚀 feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants