Note that there are some explanatory texts on larger screens.

plurals
  1. POGet complete playlist listing for a YouTube User via API
    primarykey
    data
    text
    <p>So, here's my code for getting a youtube user's public playlists:</p> <pre><code>function getyoutubeplaylists($userName) { $yt = connectyoutube(); $yt-&gt;setMajorProtocolVersion(2); $playlistListFeed = $yt-&gt;getPlaylistListFeed($userName); foreach ($playlistListFeed as $playlistListEntry) { $playlist['title'] = $playlistListEntry-&gt;title-&gt;text; $playlist['id'] = $playlistListEntry-&gt;getPlaylistID(); $playlists[] = $playlist; $playlistVideoFeed = $yt-&gt;getPlaylistVideoFeed($playlistListEntry-&gt;getPlaylistVideoFeedUrl()); foreach ($playlistVideoFeed as $videoEntry) { $playlist_assignment['youtube_id'] = substr($videoEntry-&gt;getVideoWatchPageUrl(),31,11); $playlist_assignment['id'] = $playlist['id']; $playlist_assignments[] = $playlist_assignment; } } $everything['playlists'] = $playlists; $everything['playlist_assignments'] = $playlist_assignments; return $everything; } </code></pre> <p>Problem is, this only gets the first page or results. Any ideas on how to use the Zend Gdata to retrieve the next page of results?</p> <p>The raw gdata XML shows the URLs needed:</p> <pre><code>&lt;link rel="self" type="application/atom+xml" href="http://gdata.youtube.com/feeds/api/users/pennstate/playlists?start-index=1&amp;amp;max-results=25"/&gt; &lt;link rel="next" type="application/atom+xml" href="http://gdata.youtube.com/feeds/api/users/pennstate/playlists?start-index=26&amp;amp;max-results=25"/&gt; </code></pre> <p>However, getPlaylistListFeed doesn't seem to have any parameters to specify "start-index" or "max-results".</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload