Crates.io | splatoon3-rs |
lib.rs | splatoon3-rs |
version | |
source | src |
created_at | 2024-10-06 07:17:18.057173 |
updated_at | 2024-12-04 14:32:25.961053 |
description | スプラトゥーン3のステージ情報を取得するクレートです |
homepage | |
repository | |
max_upload_size | |
id | 1398856 |
Cargo.toml error: | TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
A Rust library for accessing Splatoon 3 stage rotation information.
Add this to your Cargo.toml
[dependencies]
splatoon3-rs = "0.1.2"
tokio = { version = "1.0", features = ["full"] }
use splatoon3_rs::client::SplaClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create a new client
let client = SplaClient::new()?;
// Get current Regular Battle stages
let regular_stages = client.get_now_regular_open_stages().await?;
// Get upcoming Bankara Open stages
let bankara_open_stages = client.get_next_bankara_open_stages().await?;
// Get Bankara Challenge schedule
let bankara_challenge_stages = client.get_bankara_challenge_schedule().await?;
// Get X Battle schedule
let x_battle_stages = client.get_x_schedule().await?;
Ok(())
}
SplaClient
new()
Creates a new instance of the SplaClient.
get_now_regular_open_stages()
Returns the current Regular Battle stages.
get_next_bankara_open_stages()
Returns the upcoming Bankara Open stages.
get_bankara_challenge_schedule()
Returns the Bankara Challenge schedule.
get_x_schedule()
Returns the X Battle schedule.
All methods return Result<Vec<Schedule>, Box<dyn std::error::Error>>
where Schedule
contains:
stages
: Vector of stage information (id and name)start_time
: Schedule start timeend_time
: Schedule end timeThe library uses Rust's standard error handling with Result
types. All API methods will return errors in cases such as:
To run tests:
cargo test
MIT
Contributions are welcome! Please feel free to submit a Pull Request.