steelseries_sonar/lib.rs
1//! # SteelSeries Sonar API
2//!
3//! A Rust library for interacting with the SteelSeries Sonar application API.
4//! This library allows you to control audio volumes, mute channels, and manage
5//! chat mix settings programmatically.
6//!
7//! ## Features
8//!
9//! - Control volume levels for different audio channels
10//! - Mute/unmute specific channels
11//! - Manage chat mix settings
12//! - Support for both classic and streamer modes
13//! - Async/await support with tokio
14//!
15//! ## Quick Start
16//!
17//! ```no_run
18//! use steelseries_sonar::Sonar;
19//!
20//! #[tokio::main]
21//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
22//! // Create a new Sonar client
23//! let sonar = Sonar::new().await?;
24//!
25//! // Set master volume to 50%
26//! sonar.set_volume("master", 0.5, None).await?;
27//!
28//! // Mute the game channel
29//! sonar.mute_channel("game", true, None).await?;
30//!
31//! // Get current volume data
32//! let volume_data = sonar.get_volume_data().await?;
33//! println!("Current volume data: {}", volume_data);
34//!
35//! Ok(())
36//! }
37//! ```
38
39pub mod error;
40pub mod sonar;
41pub mod blocking;
42
43pub use error::{Result, SonarError};
44pub use sonar::{Sonar, CHANNEL_NAMES, STREAMER_SLIDER_NAMES};
45pub use blocking::BlockingSonar;