메소드 |
설명 |
|
__construct ( array $params = [] ) |
Constructor
$youtube = new Youtube(array('key' => 'KEY HERE')) |
|
_parse_url_path ( string $url ) : string |
Parse the input url string and return just the path part |
|
_parse_url_query ( string $url ) : array |
Parse the input url string and return an array of query params |
|
api_get ( $url, $params ) : mixed |
Using CURL to issue a GET request |
|
decodeList ( string &$apiData ) : array |
Decode the response from youtube, extract the list of resource objects |
|
decodeSingle ( string &$apiData ) : StdClass |
Decode the response from youtube, extract the single resource object. |
|
getActivitiesByChannelId ( $channelId ) : array |
|
|
getApi ( $name ) : mixed |
|
|
getChannelById ( $id, $optionalParams = false ) : StdClass |
|
|
getChannelByName ( $username, $optionalParams = false ) : StdClass |
|
|
getChannelFromURL ( string $youtube_url ) : object |
Get the channel object by supplying the URL of the channel page |
|
getPlaylistById ( $id ) : StdClass |
|
|
getPlaylistItemsByPlaylistId ( $playlistId, $maxResults = 50 ) : array |
|
|
getPlaylistItemsByPlaylistIdAdvanced ( $params, boolean | false $pageInfo = false ) : array |
|
|
getPlaylistsByChannelId ( $channelId, array $optionalParams = [] ) : array |
|
|
getVideoInfo ( $vId ) : StdClass |
|
|
getVideosInfo ( $vIds ) : StdClass |
|
|
paginateResults ( $params, $token = null ) : array |
Generic Search Paginator, use any parameters specified in
the API reference and pass through nextPageToken as $token if set. |
|
parseVIdFromURL ( string $youtube_url ) : string |
Parse a youtube URL to get the youtube Vid. |
|
search ( $q, integer $maxResults = 10 ) : array |
Simple search interface, this search all stuffs
and order by relevance |
|
searchAdvanced ( $params, $pageInfo = false ) : array |
Generic Search interface, use any parameters specified in
the API reference |
|
searchChannelLiveStream ( $q, $channelId, $maxResults = 10, $order = null ) |
|
|
searchChannelVideos ( string $q, string $channelId, integer $maxResults = 10, string $order = null ) : object |
Search only videos in the channel |
|
searchVideos ( string $q, integer $maxResults = 10, string $order = null ) : StdClass |
Search only videos |
|
setAPIs ( array $APIs ) |
Override the API urls, so you can set them from a config |
|
setApiKey ( $apiKey ) |
Update the API key, useful if you want to switch
multiple keys to avoid quota problem |
|
setReferer ( $referer ) |
|
|