splits-io-api
Bindings to the Splits.io API for Rust. Both native platforms and the web are supported.
Example Usage
// Create a Splits.io API client.
let client = new;
// Search for a runner.
let runners = search.await.unwrap;
let runner = runners.first.unwrap;
let runner_name = &*runner.name;
assert_eq!;
// Get the PBs for the runner.
let runner_pbs = get_pbs.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!;
// Get the categories for the game.
let game_categories = get_categories.await.unwrap;
// Get the runs for the Any% category.
let any_percent = game_categories.iter.find.unwrap;
let any_percent_runs = get_runs.await.unwrap;
assert!;
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.