xtream-helper
v1.1.7
Published
This is a simple helper for Xtream Codes IPTV. It allows you to fetch the data from the API and display it in a more readable format.
Downloads
21
Maintainers
Readme
Xtream Helper
Description
This is a simple helper for Xtream Codes IPTV. It allows you to fetch the data from the API and display it in a more readable format.
Usage
import { Xtream, VOD } from "xtream-helper";
const xtream = new Xtream(
url: "http://your-xtream-codes-url.com:port",
{
username: "your-username",
password: "your-password"
}
);
xtream.getVODStreams().then((vods: VOD[]) => {
console.log(vods);
/*
[
{
num: number;
name: string;
stream_type: string;
stream_id: number;
stream_icon: string;
rating: string;
rating_5based: number;
tmdb: number;
trailer: string;
added: string;
is_adult: number;
category_id: string;
category_ids: number[];
container_extension: string;
custom_sid: any;
direct_source: string;
url:string;
},
...
]
*/
});
Functions
xtream.getVODStreams(): Promise<VOD[]>
xtream.getLiveStreams(): Promise<Live[]>
xtream.getCategories(): Promise<Category[]>
xtream.getSeries(): Promise<Series[]>
xtream.getSerieInfo(serie_id: number): Promise<SerieInfo>
xtream.getProfile(): Promise<Profile>
xtream.getServerInfo(): Promise<Profile>
xtream.getUserInfo(): Promise<Profile>