kick_rust/
lib.rs

1//! Kick.com WebSocket library for Rust
2//!
3//! This library provides a simple way to connect to Kick.com chat rooms
4//! and receive real-time messages via WebSocket connections.
5//!
6//! # Example
7//!
8//! ```rust,ignore
9//! use kick_rust::KickClient;
10//!
11//! #[tokio::main]
12//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
13//!     let client = KickClient::new();
14//!
15//!     client.on_message(|msg| {
16//!         println!("{}: {}", msg.username, msg.content);
17//!     });
18//!
19//!     client.connect("channel_name").await?;
20//!
21//!     // Keep the program running
22//!     loop {
23//!         tokio::time::sleep(tokio::time::Duration::from_secs(1)).await;
24//!     }
25//! }
26//! ```
27
28pub mod fetch;
29pub mod message_parser;
30// pub mod robust_websocket; // Commented out - file doesn't exist
31pub mod types;
32pub mod websocket_manager;
33
34// Re-export commonly used types
35pub use websocket_manager::WebSocketManager as KickClient;
36pub use types::*;
37pub use message_parser::{MessageParser, parse_custom_message, extract_field};
38pub use fetch::client::{KickApiClient, KickApiClientBuilder};
39
40// Re-export fetch module types
41pub use fetch::types::{FetchResult, FetchError, ClientConfig, StrategyConfig};