DELETE

Delete videos

deleteVideos - Delete single or multiple video items. Deleted videos which belong to any of your playlists will be removed from all playlist items automatically.

Description

mixed deleteVideos ( array $_post , bool $encode );
This method is type of POST.

Parameters

@param (array) $_post - Array of post data (required)
@param (int) partner_id - Site id (required)
@param (string) ids - CSV of video ids (required)
@param (bool) $encode - Encode response into JSON

Examples

Get JSON response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $post = array('partner_id'=>1, 'ids'=>'1,2,3,4');
    print_r($api->deleteVideos($post));
?>

Result

{"success":true,"status":"success","message":"The Video has been saved.","redirect":"\/videos\/index\/"}

Get PHP response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $post = array('partner_id'=>1, 'ids'=>'1,2,3,4');
    print_r($api->deleteVideos($post, true));
?>

Result

stdClass Object ( [success] => 1 [status] => success [message] => The Video has been saved. [redirect] => /videos/index/ )

Delete Playlists

deletePlaylists - Delete single or multiple playlists. Videos that belongs to playlists will remain in system and will not be deleted. To delete videos see the deleteVideos method above.

Description

mixed deletePlaylists ( array $_post , bool $encode );
This method is type of POST.

Parameters

@param (array) $_post - Array of post data (required)
@param (int) partner_id - Site id (required)
@param (string) ids - CSV of playlist ids (required)
@param (bool) $encode - Encode response into JSON

Examples

Get JSON response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $post = array('partner_id'=>1, 'ids'=>'1,2,3,4');
    print_r($api->deletePlaylists($post));
?>

Result

{"success":true,"status":"success","message":"Playlist has been deleted.","redirect":"\/playlists\/index\/"}

Get PHP response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $post = array('partner_id'=>1, 'ids'=>'1,2,3,4');
    print_r($api->deletePlaylists($post, true));
?>  

Result

stdClass Object ( [success] => 1 [status] => success [message] => Playlist has been deleted. [redirect] => /playlists/index/ )

Remove ALL videos from a playlist

clearPlaylist - Remove all videos from playlist but do not remove the playlist entity. Videos will not be deleted from the system but only removed from the corresponding playlist. To delete videos from the system see the deleteVideos method above.

Description

mixed clearPlaylist ( array $_post , bool $encode );
This method is type of POST.

Parameters

@param (array) $_post - Array of post data (required)
@param (int) partner_id - Site id (required)
@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();
    $post = array('partner_id'=>1, 'id'=>1);
    print_r($api->clearPlaylist($post));
?>

Result

{"success":true,"status":"success","message":"All items are removed."}

Get PHP response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $post = array('partner_id'=>1, 'id'=>1);
    print_r($api->clearPlaylist($post, true));
?>  

Result

stdClass Object ( [success] => 1 [status] => success [message] => All items are removed. )

Remove a single video from a playlist

removeVideoPlaylist - Remove a single video from a playlist. Video will not be deleted from the system but only removed from the corresponding playlist. To delete videos from the system see the deleteVideos method.

Description

mixed removeVideoPlaylist ( array $_post , bool $encode );
This method is type of POST.

Parameters

@param (array) $_post - Array of post data (required)
@param (int) video_id - Video id (required)
@param (int) partner_id - Site id (required)
@param (int) id - PlaylistVideo id - This is not the Playlist id but the index of the video in the playlist(required)
@param (bool) $encode - Encode response into JSON

Examples

Get JSON response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $post = array('video_id'=>1, 'id'=>1, 'partner_id'=>1080);
    print_r($api->removeVideoPlaylist($post));
?>

Result

{"success":true,"status":"success","message":"Video has been removed."}

Get PHP response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $post = array('video_id'=>1, 'id'=>1, 'partner_id'=>1080);
    print_r($api->removeVideoPlaylist($post, true));
?>

Result

stdClass Object ( [success] => 1 [status] => success [message] => Video has been removed. )