halo_api 0.3.0

Unofficial Halo Infinite REST API client for Rust (CSR, service record, match history, and more).
Documentation
//! Shows the Xbox account used by Halo API authentication.

mod common;

use xbox::RelyingParty;

#[tokio::main]
async fn main() -> Result<(), common::ExampleError> {
    let xbox = common::xbox_client()?;
    let ticket = xbox.xsts_ticket(RelyingParty::XBOX).await?;
    println!(
        "logged in as {} (xuid {})",
        ticket.gamertag().unwrap_or("<unknown>"),
        ticket
            .xuid()
            .map(|xuid| xuid.to_string())
            .unwrap_or_default()
    );
    Ok(())
}