Delete playlists

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/ )