Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is a complete and utter hack, I had the same exact problem, so I went into the class at Zend/Gdata/YouTube/PlaylistListEntry.php on line 229 I commented out the if else statement. </p> <pre><code> /** * Returns the Id relating to the playlist. * * @throws Zend_Gdata_App_VersionException * @return Zend_Gdata_YouTube_Extension_PlaylistId The id of this playlist. */ public function getPlaylistId() { /*if (($this-&gt;getMajorProtocolVersion() == null) || ($this-&gt;getMajorProtocolVersion() == 1)) { require_once 'Zend/Gdata/App/VersionException.php'; throw new Zend_Gdata_App_VersionException('The yt:playlistId ' . 'element is not supported in versions earlier than 2.'); } else {*/ return $this-&gt;_playlistId; //} } </code></pre> <p>I would LOVE for someone to show us how to fix this the right way, but this made it so </p> <pre><code>function printPlaylistListEntry($playlistListEntry, $showPlaylistContents = false) { $this-&gt;yt-&gt;setMajorProtocolVersion(2); echo '&lt;br&gt;Title: ' . $playlistListEntry-&gt;title-&gt;text . "\n"; echo '&lt;br&gt;Description: ' . $playlistListEntry-&gt;description-&gt;text . "\n"; echo '&lt;br&gt;playlistId: ' . $playlistListEntry-&gt;playlistId-&gt;text . "\n"; </code></pre> <p>... (from the youtube v2 php api).</p> <p>will return the playlistid.</p> <p>Title: <em>therighttitle</em></p> <p>Description: <em>therightdescription</em></p> <p>playlistId: <em>therightplaylistId</em></p> <p>edit: I think this may be a better solution:</p> <pre><code>if ($this-&gt;getMajorProtocolVersion() &lt; 2) { require_once 'Zend/Gdata/App/VersionException.php'; throw new Zend_Gdata_App_VersionException('The yt:playlistId ' . 'element is not supported in versions earlier than 2.'); } else { return $this-&gt;_playlistId; } </code></pre> <p>replace the getPlaylistId() function with this, follows the logic of the preceding getDescription function, and its less hacky. Again completely open to critiques on why this is or is not a good idea from the zend people.</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.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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