splatoon3-rs

Crates.iosplatoon3-rs
lib.rssplatoon3-rs
version
sourcesrc
created_at2024-10-06 07:17:18.057173
updated_at2024-12-04 14:32:25.961053
descriptionスプラトゥーン3のステージ情報を取得するクレートです
homepage
repository
max_upload_size
id1398856
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`
size0
Shota (TaroYamada1997)

documentation

README

splatoon3-rs

A Rust library for accessing Splatoon 3 stage rotation information.

Features

  • Fetch current and upcoming stage schedules for:
    • Regular Battle
    • Bankara (Anarchy) Open
    • Bankara (Anarchy) Challenge
    • X Battle

Installation

Add this to your Cargo.toml

[dependencies]
splatoon3-rs = "0.1.2"
tokio = { version = "1.0", features = ["full"] }

Usage

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(())
}

API Reference

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 time
  • end_time: Schedule end time

Error Handling

The library uses Rust's standard error handling with Result types. All API methods will return errors in cases such as:

  • Network connection failures
  • Invalid API responses
  • Server errors

Development

To run tests:

cargo test

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Commit count: 0

cargo fmt