# <img src="https://raw.githubusercontent.com/glacials/splits-io/dec549110968c5a02df87cddff49a43549cceb92/public/logo.png" alt="Splits.io" height="42" width="42" align="top"/> splits-io-api
[](https://github.com/LiveSplit/splits-io-api/actions)
[](https://crates.io/crates/splits-io-api)
[](https://docs.rs/splits-io-api/)
[](https://deps.rs/repo/github/LiveSplit/splits-io-api)
Bindings to the Splits.io API for Rust. Both native platforms and the web are
supported.
## Example Usage
```rust
// Create a Splits.io API client.
let client = Client::new();
// Search for a runner.
let runners = runner::search(&client, "cryze").await.unwrap();
let runner = runners.first().unwrap();
let runner_name = &*runner.name;
assert_eq!(runner_name, "cryze92");
// Get the PBs for the runner.
let runner_pbs = runner::get_pbs(&client, runner_name).await.unwrap();
let first_pb = &*runner_pbs.first().unwrap();
// Get the game for the PB.
let pb_game = first_pb.game.as_ref().unwrap();
let pb_game_shortname = pb_game.shortname.as_ref().unwrap();
assert_eq!(pb_game_shortname.as_ref(), "tww");
// Get the categories for the game.
let game_categories = game::get_categories(&client, pb_game_shortname).await.unwrap();
// Get the runs for the Any% category.