This crate provides a client for the r6stats API. It supports the /stats
and the /leaderboard
endpoint.
Add the following to your Cargo.toml
:
toml
[dependencies]
r6stats_client = "0.1"
Basic example:
```rust
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 = "
let leaderboard = client
.leaderboard()
.get(Platform::Pc, Some(Region::Emea))
.await
.unwrap();
println!("{:#?}", leaderboard);
} ```
ratelimiting
(default): Enables pre-ratelimiting before sending requests to prevent HTTP-429 Errors.
Note: Ratelimits are enforced by the server nevertheless.threadsafe
: Makes Client
threadsafe (Send
+ Sync
)