Skip to main content

altstream_api/
lib.rs

1//! # altstream-api
2//!
3//! Rust API wrapper for the alternative streaming platform [AltStream Online](https://altstream.online/)
4//!
5//! ## Disclaimer
6//!
7//! This library is not well tested, and the AltStream API is brand new and may see breaking changes in the future. Use at your own risk.
8//!
9//! ## Example
10//!
11//! ```
12//! # #[tokio::main]
13//! # async fn main() -> Result<(), Box<dyn std::error::Error>> {
14//! let username = "letsgoashe"; // The creator of AltStream!
15//! let channel_info = altstream_api::get_channel_info(username).await?;
16//!
17//! let bio: Option<String> = channel_info.bio;
18//!
19//! let live: bool = channel_info.stream.is_live;
20//!
21//! let game: String = channel_info.stream.game.ok_or("No game")?.name;
22//!
23//! # Ok(())
24//! # }
25//! ```
26
27mod api;
28mod pub_transmission_types;
29mod request;
30mod transmission_types;
31
32pub use api::*;
33pub use pub_transmission_types::*;