Madcoda\Youtube\Youtube::getPlaylistItemsByPlaylistIdAdvanced PHP Method

getPlaylistItemsByPlaylistIdAdvanced() public method

public getPlaylistItemsByPlaylistIdAdvanced ( $params, boolean | false $pageInfo = false ) : array
$params
$pageInfo boolean | false
return array
    public function getPlaylistItemsByPlaylistIdAdvanced($params, $pageInfo = false)
    {
        $API_URL = $this->getApi('playlistItems.list');
        if (empty($params) || !isset($params['playlistId'])) {
            throw new \InvalidArgumentException('at least the playlist id must be supplied');
        }
        $apiData = $this->api_get($API_URL, $params);
        if ($pageInfo) {
            return array('results' => $this->decodeList($apiData), 'info' => $this->page_info);
        } else {
            return $this->decodeList($apiData);
        }
    }