Skip to main content

Crate crispy_stalker

Crate crispy_stalker 

Source
Expand description

Async Stalker/MAG portal API client.

This crate implements the Stalker middleware portal protocol, a legacy query-string-based API used by MAG set-top-box portals. It handles portal discovery, MAC-based authentication, paginated data fetching, and stream URL resolution.

§Usage

use crispy_stalker::{StalkerClient, StalkerCredentials};

let creds = StalkerCredentials {
    base_url: "http://portal.example.com".into(),
    mac_address: "00:1A:79:AB:CD:EF".into(),
    timezone: None,
};

let mut client = StalkerClient::new(creds, false)?;
client.authenticate().await?;

let genres = client.get_genres().await?;
for genre in &genres {
    let channels = client.get_all_channels(&genre.id, None).await?;
    println!("{}: {} channels", genre.title, channels.len());
}

Re-exports§

pub use backoff::BackoffConfig;
pub use client::StalkerClient;
pub use error::StalkerError;
pub use session::StalkerSession;
pub use types::PaginatedResult;
pub use types::StalkerAccountInfo;
pub use types::StalkerCategory;
pub use types::StalkerChannel;
pub use types::StalkerCredentials;
pub use types::StalkerEpgEntry;
pub use types::StalkerEpisode;
pub use types::StalkerProfile;
pub use types::StalkerSeason;
pub use types::StalkerSeriesDetail;
pub use types::StalkerSeriesItem;
pub use types::StalkerVodItem;
pub use url::resolve_stream_url;

Modules§

backoff
Exponential backoff strategy for HTTP retries.
client
Session-stateful async Stalker portal client.
device
Device identity generation for Stalker portal authentication.
discovery
Portal URL discovery — probes multiple known paths to find the portal.
error
Stalker-specific error types.
session
Stalker session state — token, cookie, and device identity management.
types
Stalker portal domain types.
url
Stream URL resolution from Stalker cmd fields.