Method |
Description |
|
__construct ( $key ) |
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 |
|
decodeMultiple ( string &$apiData ) : StdClass |
Decode the response from youtube, extract the multiple resource object. |
|
decodeSingle ( string &$apiData ) : StdClass |
Decode the response from youtube, extract the single resource object. |
|
getActivitiesByChannelId ( $channelId, $part = ['id', 'snippet', 'contentDetails'], $maxResults = 5 ) : array |
|
|
getApi ( $name ) : mixed |
|
|
getChannelById ( $id, $optionalParams = false, $part = ['id', 'snippet', 'contentDetails', 'statistics', 'invideoPromotion'] ) : StdClass |
|
|
getChannelByName ( $username, $optionalParams = false, $part = ['id', 'snippet', 'contentDetails', 'statistics', 'invideoPromotion'] ) : StdClass |
|
|
getChannelFromURL ( string $youtube_url ) : object |
Get the channel object by supplying the URL of the channel page |
|
getPlaylistById ( $id, $part = ['id', 'snippet', 'status'] ) : StdClass |
|
|
getPlaylistItemsByPlaylistId ( string $playlistId, string $pageToken = '', integer $maxResults = 50, array $part = ['id', 'snippet', 'contentDetails', 'status'] ) : array |
|
|
getPlaylistsByChannelId ( string $channelId, array $optionalParams = [], array $part = ['id', 'snippet', 'status'] ) : array |
|
|
getPopularVideos ( $regionCode, integer $maxResults = 10, $part = ['id', 'snippet', 'contentDetails', 'player', 'statistics', 'status'] ) : array |
Gets popular videos for a specific region (ISO 3166-1 alpha-2) |
|
getRelatedVideos ( string $videoId, $maxResults = 5, $part = ['id', 'snippet'] ) : array |
|
|
getVideoInfo ( $vId, $part = ['id', 'snippet', 'contentDetails', 'player', 'statistics', 'status'] ) : 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, $part = ['id', 'snippet'] ) : 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 |
|
searchChannelVideos ( string $q, string $channelId, integer $maxResults = 10, string $order = null, $part = ['id', 'snippet'], $pageInfo = false ) : object |
Search only videos in the channel |
|
searchVideos ( string $q, integer $maxResults = 10, string $order = null, $part = ['id'] ) : StdClass |
Search only videos |
|