Add video to playlist

Add videos to a playlist

addVideoPlaylist - Add new video(s) to an existing playlist in Brid.

Description

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

Parameters

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

     );

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

Result

{"playlist_videos":{"3317":"777","3316":"778"},"status":true,"message":"Video(s) added successfully."}

Get PHP response:

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

            'partner_id'=>1 ,
            'ids'=>'1,2,3,videoId...' ,
            'id'=>130,

     );

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

Result

stdClass Object ( [playlist_videos] => stdClass Object ( [3317] => 783 [3316] => 784 ) [status] => 1 [message] => Video(s) added successfully. )