public function searchAdvanced($params, $pageInfo = false)
    {
        $API_URL = $this->getApi('search.list');

        if (empty($params) || (!isset($params['q']) && !isset($params['channelId']) && !isset($params['videoCategoryId']))) {
            throw new \InvalidArgumentException('at least the Search query or Channel ID or videoCategoryId must be supplied');
        }

        $apiData = $this->api_get($API_URL, $params);
        if ($pageInfo) {
            return [
                'results' => $this->decodeList($apiData),
                'info' => $this->page_info,
            ];
        } else {
            return $this->decodeList($apiData);
        }
    }
public function searchAdvanced($params, $pageInfo = false)
    {
        $API_URL = $this->getApi('search.list');

        if (empty($params) || (!isset($params['q']) && !isset($params['channelId']) && !isset($params['videoCategoryId']))) {
            throw new \InvalidArgumentException('at least the Search query or Channel ID or videoCategoryId must be supplied');
        }

        $apiData = $this->api_get($API_URL, $params);
        if ($pageInfo) {
            return [
                'results' => $this->decodeList($apiData),
                'info' => $this->page_info,
            ];
        } else {
            return $this->decodeList($apiData);
        }
    }
public function searchAdvanced ( $ params , $ pageInfo = false ) { $ API_URL = $ this -> getApi ( 'search.list' ) ; if ( empty ( $ params ) || ( ! isset ( $ params [ 'q' ] ) && ! isset ( $ params [ 'channelId' ] ) && ! isset ( $ params [ 'videoCategoryId' ] ) ) ) { throw new \ InvalidArgumentException ( 'at least the Search query or Channel ID or videoCategoryId must be supplied' ) ; } $ apiData = $ this -> api_get ( $ API_URL , $ params ) ; if ( $ pageInfo ) { return [ 'results' => $ this -> decodeList ( $ apiData ) , 'info' => $ this -> page_info , ] ; } else { return $ this -> decodeList ( $ apiData ) ; } }
Generic Search interface, use any parameters specified in
the API reference

@param $params
@param $pageInfo
@return array
@throws \Exception
Generic Search interface use any parameters specified in the API reference