The YouTube Data API provides information about users, including profiles, playlists, subscriptions, and more.
The library provides a helper method to retrieve the playlists associated with a given user. To retrieve the playlists for the user 'liz':
Example 451. Retrieving the playlists of a user
<?php
$yt = new Zend_Gdata_YouTube();
$playlistListFeed = $yt->getPlaylistListFeed('liz');
foreach ($playlistListFeed as $playlistEntry) {
echo $playlistEntry->title->text . "\n";
echo $playlistEntry->description->text . "\n";
echo $playlistEntry->getPlaylistVideoFeedUrl() . "\n\n\n";
}
The library provides a helper method to retrieve the videos associated with a given playlist. To retrieve the playlists for a specific playlist entry:
Example 452. Retrieving a specific playlist
<?php
$feedUrl = $playlistEntry->getPlaylistVideoFeedUrl();
$playlistVideoFeed = $yt->getPlaylistVideoFeed($feedUrl);




