[READ-ONLY] Mirror of https://github.com/metruzanca/medaltv. Unofficial API client for https://Medal.tv in Rust
api-client medaltv rust
0

Configure Feed

Select the types of activity you want to include in your feed.

Rust 100.0%
2 1 0

Clone this repository

https://tangled.org/metru.dev/medaltv https://tangled.org/did:plc:7dhjofbrdzse4qidp4y5eesk
git@tangled.org:metru.dev/medaltv git@tangled.org:did:plc:7dhjofbrdzse4qidp4y5eesk

For self-hosted knots, clone URLs may differ based on your setup.



README.md

medaltv#

Unofficial API client for medal.tv in Rust.

Ported from the Python medal-api by Gian Klug.

Usage#

use medaltv::MedalAPI;

fn main() -> Result<(), medaltv::MedalError> {
    // Create a client (auto-authenticates as guest)
    let api = MedalAPI::new()?;

    // Or use a pre-existing token: MedalAPI::with_token(token)?

    // Fetch a user
    let users = api.get_user("Test")?;
    println!("{users:#?}");

    // Fetch a category
    let category = api.get_category("0")?;
    println!("{category:#?}");

    // Fetch recent games for a user
    let games = api.get_recent_games("Test")?;
    println!("{games:#?}");

    Ok(())
}

Add to your Cargo.toml:

[dependencies]
medaltv = { git = "https://github.com/metruzanca/medaltv.git" }