GET

Get your site list

sitesList - Returns list of all sites that the authorized user can access.

Description

mixed sitesList ( bool $encode );
This method is type of GET and will not receive any POST parameters.

Parameters

@param (bool) $encode
Encode response into JSON

Examples

Get JSON response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    print_r($api->sitesList());
?>

Get PHP response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    print_r($api->sitesList(true));
?>

Get your channel list

channelsList - Returns the channel list.

Description

mixed channelsList ( bool $encode );
This method is type of GET and will not receive any POST parameters.

Parameters

@param (bool) $encode
Encode response into JSON

Examples

Get JSON response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    print_r($api->channelsList());
?>

Get PHP response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    print_r($api->channelsList(true));
?>

Get your player list

playersList - Returns a list of all players that belongs to requested site id.

Description

mixed playersList ( int $id , bool $encode );
This method is type of GET and will not receive any POST parameters.

Parameters

@param (int) $id - Site id (required)
@param (bool) $encode - Encode response into JSON

Examples

Get JSON response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $site_id = 1080;
    print_r($api->playersList($site_id));
?>

Get PHP response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $site_id = 1080;
    print_r($api->playersList($site_id, true));
?>

Get site data

site - Return site data by site id.

Description

mixed site ( int $id , bool $encode );
This method is type of GET and will not receive any POST parameters.

Parameters

@param (int) $id - Site id (required)
@param (bool) $encode - Encode response into JSON

Examples

Get JSON response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $site_id = 1080;
    print_r($api->site($site_id));
?>

Get PHP response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $site_id = 1080;
    print_r($api->site($site_id, true));
?>

Get video data

video - Return video data by video id.

Description

mixed video ( int $id , bool $encode );
This method is type of GET and will not receive any POST parameters.

Parameters

@param (int) $id - Video id (required)
@param (bool) $encode - Encode response into JSON

Examples

Get JSON response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $video_id = 1080;
    print_r($api->video($video_id));
?>

Get PHP response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $video_id = 1080;
    print_r($api->video($video_id, true));
?>

Get user data

userinfo - Return info about an authenticated user.

Description

mixed userinfo ( bool $encode );
This method is type of GET and will not receive any POST parameters.

Parameters

@param (bool) $encode - Encode response into JSON

Examples

Get JSON response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    print_r($api->userinfo());
?>

Get PHP response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    print_r($api->userinfo(true));
?>

Get playlist data

playlist - Return playlist data by playlist id.

Description

mixed playlist ( int $id , bool $encode );
This method is type of GET and will not receive any POST parameters.

Parameters

@param (int) $id - Playlist id (required)
@param (bool) $encode - Encode response into JSON

Examples

Get JSON response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $playlist_id = 1;
    print_r($api->playlist($playlist_id));
?>

Get PHP response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $playlist_id = 1080;
    print_r($api->playlist($playlist_id, true));
?>

Get a playlist dataset

playlists - Return a dataset of Playlist objects for a selected site id. Pagination object will be included as an additional sub-object to the response.

Description

mixed playlists ( int $id , bool $encode );
This method is type of GET and will not receive any POST parameters.

Result will return an object containing two arrays:

Playlists (Array) - Playlists dataset for a selected site (paginated).
Pagination (Array) - Pagination data info.

Parameters

@param (int) $id - Site id (required)
@param (bool) $encode - Encode response into JSON

Examples

Get JSON response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $site_id = 1080;
    print_r($api->playlists($site_id));
?>

Note the pagination part of the response, it can help you to walk through the entire data response. Example:

{"page":1,"current":3,"count":3,"prevPage":1,"nextPage":1,"pageCount":1,"order":"Playlist.id DESC","limit":10,"options":[],"paramType":"named","left":1,"right":1}

Get PHP response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $site_id = 1080;
    print_r($api->playlists($site_id, true));
?>

Get video data

videos - Returns a paginated dataset of video objects for a selected site id. Pagination object will be included as an additional sub-object to the response.

Description

mixed videos ( int $id , bool $encode );
This method is type of GET and will not receive any POST parameters.

Result will return an object containing two arrays:

Videos (Array) - Videos dataset for a selected site (paginated). Pagination (Array) - Pagination data info.

Parameters

@param (int) $id - Site id (required)
@param (bool) $encode - Encode response into JSON

Examples

Get JSON response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $site_id = 1080;
    print_r($api->videos($site_id));
?>

Note the pagination part of the response, it can help a developer to walk through response data. Example:

{"page":1,"current":5,"count":21,"prevPage":1,"nextPage":2,"pageCount":5,"order":"Video.id DESC","limit":5,"options":[],"paramType":"named","left":1,"right":5}

Get PHP response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $site_id = 1080;
    print_r($api->videos($site_id, true));
?>