Video dataset

Get video data

videos - Returns a paginated dataset of video objects for a selected site id. Pagination object will be included as an additional sub-object to the response.

Description

mixed videos ( int $id , bool $encode );
This method is type of GET and will not receive any POST parameters.

Result will return an object containing two arrays:

Videos (Array) - Videos dataset for a selected site (paginated). Pagination (Array) - Pagination data info.

Parameters

@param (int) $id - Site id (required)
@param (bool) $encode - Encode response into JSON

Examples

Get JSON response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $site_id = 1080;
    print_r($api->videos($site_id));
?>

Note the pagination part of the response, it can help a developer to walk through response data. Example:

{"page":1,"current":5,"count":21,"prevPage":1,"nextPage":2,"pageCount":5,"order":"Video.id DESC","limit":5,"options":[],"paramType":"named","left":1,"right":5}

Get PHP response:

<?php 
    require_once('lib/api.php');
    $api = new BridApi();
    $site_id = 1080;
    print_r($api->videos($site_id, true));
?>