Delete all videos from playlist

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('brid.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('brid.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. )