Skip to content

Fazzani/Xtream.Client

Repository files navigation

Xtream Client

Codacy Badge Build Status

Xtream .net standard client for Xtream Api

Installation

 dotnet add package Xtream.Client

Examples

Example 1: Xtream Client using an url

 using(var xtreamClient = new XtreamClient(new XtUrlConnectionFactory(url)))
 {
   //Get Panel Info
   var panelInfo = await xtreamClient.GetPanelAsync(url, CancellationToken.None);
   
   // Get Server and user info
   var allInfos = await xtreamClient.GetUserAndServerInfoAsync(url, CancellationToken.None);
   
   // Get live streams
   var livestreams = await xtreamClient.GetLiveStreamsAsync(url, CancellationToken.None);
   
   // Get Vod
   var vods = await xtreamClient.GetVodStreamsAsync(url, CancellationToken.None);
 }

Example 2: Xtream Client using a basic authentication

 using(var xtreamClient = new XtreamClient(new XtBasicConnectionFactory(server, username, password)))
 {
   //Get Panel Info
   var panelInfo = await xtreamClient.GetPanelAsync(url, CancellationToken.None);
   
   // Get Server and user info
   var allInfos = await xtreamClient.GetUserAndServerInfoAsync(url, CancellationToken.None);
   
   // Get live streams
   var livestreams = await xtreamClient.GetLiveStreamsAsync(url, CancellationToken.None);
   
   // Get Vod
   var vods = await xtreamClient.GetVodStreamsAsync(url, CancellationToken.None);
 }