Skip to content

Library Querying#41

Open
Exterminate5573 wants to merge 3 commits into
xodus-gaming:mainfrom
Exterminate5573:feat/library
Open

Library Querying#41
Exterminate5573 wants to merge 3 commits into
xodus-gaming:mainfrom
Exterminate5573:feat/library

Conversation

@Exterminate5573

Copy link
Copy Markdown

Adds a library command, currently only outputs raw json

Comment thread xodus/src/api/xbox/services.rs Outdated
return;
};

let token = user::get_token("scope=service::user.auth.xboxlive.com::MBI_SSL&api-version=2.0".to_string()).unwrap();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The new token may need to be obtained here. Those tokens are pretty short-lived.

You can band-aid a full exchange_user_token here as well. Or if you want to, look into doing proper utils towards caching tokens and refreshing them only as needed

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I dont think its worth band-aiding it all together, working on a proper caching system would make more sense


let user_token: Token = match user_token {
ExchangeUserTokenOutcome::Fault(_) => {
eprintln!("Failed to get exchange MS token");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For those eprintln, I think we should migrate to log::error instead

@imLinguin

Copy link
Copy Markdown
Member

I also hit

thread 'main' (130024) panicked at xodus/src/api/xbox/services.rs:116:57:
called `Result::unwrap()` on an `Err` value: Error("missing field `averageRating`", line: 1, column: 71440)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants