Crates.io | r6stats_client |
lib.rs | r6stats_client |
version | 0.2.3 |
source | src |
created_at | 2020-10-26 15:09:16.167291 |
updated_at | 2020-11-03 20:22:23.229464 |
description | Client for the r6stats API. |
homepage | |
repository | https://github.com/Jan561/r6stats_client |
max_upload_size | |
id | 305646 |
size | 87,622 |
This crate provides a client for the r6stats API. It supports the /stats
and the /leaderboard
endpoint.
Add the following to your Cargo.toml
:
[dependencies]
r6stats_client = "0.2"
Basic example:
#[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.