Creates a new instance of the Xtream service.
Configuration options for the Xtream client
The base URL of the Xtream API
The username to authenticate with
The password to authenticate with
Optional preferred streaming format
Optional custom serializers for transforming API responses
Optional
serializer?: { type: string; serializers: T }Optional custom serializers for transforming API responses
Indicates the type of serializer being used (e.g., 'none', 'standardized', 'jsonapi') Used for diagnostic and informational purposes.
Optional
userCached user profile information to avoid repeated API calls. This is populated on first use when needed and contains information about user permissions, allowed formats, etc.
Generates a stream URL for various content types (live channels, movies, TV show episodes).
This method constructs the appropriate URL based on content type, format, and optional timeshift parameters. It ensures the requested format is allowed for the user.
The stream request parameters
The complete streaming URL or undefined if an invalid type is provided
Gets the profile information of the authenticated user.
This includes subscription details, allowed output formats, and other user-specific settings.
The user profile information, optionally transformed by custom serializer
Gets information about the Xtream server.
This includes details about the server's time, timezone, and version.
Server information, optionally transformed by custom serializer
Gets the list of all available live channel categories.
Categories are used to organize content into groups like Sports, News, Entertainment, etc.
A list of channel categories, optionally transformed by custom serializer
Gets the list of all available movie categories.
Categories are used to organize content into groups like Action, Comedy, Drama, etc.
A list of movie categories, optionally transformed by custom serializer
Gets the list of all available TV show categories.
Categories are used to organize content into groups like Drama, Comedy, Documentary, etc.
A list of TV show categories, optionally transformed by custom serializer
Gets the list of available live channels, with optional filtering and pagination.
This method also automatically generates streaming URLs for each channel and adds them to the channel objects.
Filter and pagination options
Optional category ID to filter channels by
Optional page number for paginated results
Optional number of items per page
A list of channels, optionally transformed by custom serializer
Gets the list of available movies, with optional filtering and pagination.
This method also automatically generates streaming URLs for each movie and adds them to the movie objects.
Filter and pagination options
Optional category ID to filter movies by
Optional page number for paginated results
Optional number of items per page
A list of movies, optionally transformed by custom serializer
Gets detailed information about a specific movie.
This includes metadata like plot, cast, director, release date, etc. Also generates and adds the streaming URL to the movie object.
The movie request options
ID of the movie to retrieve
Detailed movie information, optionally transformed by custom serializer
Gets the list of available TV shows, with optional filtering and pagination.
Filter and pagination options
Optional category ID to filter shows by
Optional page number for paginated results
Optional number of items per page
A list of TV shows, optionally transformed by custom serializer
Gets detailed information about a specific TV show.
This includes metadata about the show and all its episodes organized by season. Also generates and adds streaming URLs for each episode.
The show request options
ID of the show to retrieve
Detailed show information, optionally transformed by custom serializer
Gets short EPG (Electronic Program Guide) information for a specific channel.
Short EPG typically contains programming information for a limited time period.
The EPG request options
ID of the channel to retrieve EPG for
Optional number of EPG entries to return
Short EPG information, optionally transformed by custom serializer
Gets full EPG (Electronic Program Guide) information for a specific channel.
Full EPG contains complete programming information for a longer time period.
The EPG request options
ID of the channel to retrieve EPG for
Full EPG information, optionally transformed by custom serializer
Xtream API client for interacting with Xtream compatible IPTV services.
This class provides methods to query and retrieve various types of content from an Xtream compatible API, including live channels, movies, TV shows, and EPG data. It also supports custom serialization of API responses.