Sort videos in playlist

Sort videos in playlist

sortVideos - Sort videos in a single playlist.

Description

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

Parameters

@param (array) $_post - Array of post data (required)
@param (string) sort - CSV of video ids (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 ,
            'sort'=>'1,2,3,videoId...' ,
            'id'=>137,

     );

    print_r($api->sortVideos($post));
?>

Result

{"success":true,"status":"success","message":"Playlist has been saved."}

Get PHP response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $post = array(

            'partner_id'=>1 ,
            'sort'=>'1,2,3,videoId...' ,
            'id'=>137,

     );

    print_r($api->sortVideos($post,true));
?>

Result

stdClass Object ( [success] => 1 [status] => success [message] => Playlist has been saved. )