Skip to content

Jan561/r6stats_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

r6stats Client

This crate provides a client for the r6stats API. It supports the /stats and the /leaderboard endpoint.

Usage

Add the following to your Cargo.toml:

[dependencies]
r6stats_client = "0.2"

Basic example:

use r6stats_client::{Client, Platform, Region};

#[tokio::main]
async fn main() {
    // You need an API key to access the endpoints of r6stats.
    //
    // If you don't have one, you can request one from their support.
    let token = "<API KEY HERE>";
    let client = Client::new(token).unwrap();

    let leaderboard = client
        .leaderboard()
        .get(Platform::Pc, Some(Region::Emea))
        .await
        .unwrap();

    println!("{:#?}", leaderboard);
}

More examples can be found in the examples directory.

About

Client for the r6stats api.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages