Skip to main content

crispy_xtream/
lib.rs

1//! Async Xtream Codes API client.
2//!
3//! A faithful Rust translation of the [`@iptv/xtream-api`] TypeScript library,
4//! providing a typed, async client for Xtream Codes compatible IPTV servers.
5//!
6//! # Quick Start
7//!
8//! ```no_run
9//! use crispy_xtream::{XtreamClient, XtreamCredentials};
10//!
11//! # async fn example() -> Result<(), crispy_xtream::XtreamError> {
12//! let client = XtreamClient::new(XtreamCredentials::new(
13//!     "http://example.com:8080",
14//!     "username",
15//!     "password",
16//! ))?;
17//!
18//! let profile = client.authenticate().await?;
19//! let channels = client.get_live_streams(None).await?;
20//! let epg = client.get_short_epg(42, Some(10)).await?;
21//! let xmltv_url = client.xmltv_url();
22//! # Ok(())
23//! # }
24//! ```
25//!
26//! [`@iptv/xtream-api`]: https://github.com/ektotv/xtream-api
27
28pub mod client;
29pub mod error;
30pub mod parse;
31pub mod types;
32pub mod url;
33
34// Re-export the public API at crate root for ergonomic imports.
35pub use client::{XtreamClient, XtreamClientConfig, XtreamCredentials};
36pub use error::XtreamError;
37pub use types::{
38    StreamFormat, StreamType, XtreamCategory, XtreamChannel, XtreamEpgListing, XtreamEpisode,
39    XtreamEpisodeInfo, XtreamFullEpg, XtreamFullEpgListing, XtreamMovie, XtreamMovieData,
40    XtreamMovieInfo, XtreamMovieListing, XtreamProfile, XtreamSeason, XtreamServerInfo,
41    XtreamShortEpg, XtreamShow, XtreamShowInfo, XtreamShowListing, XtreamUserProfile,
42};
43
44pub use crispy_iptv_types;