如何将请求 URL 从 Zend_Gdata_Youtube 更改为在 API v3 上实际工作?

How to change the request URL from Zend_Gdata_Youtube to actually work on API v3?

我觉得这听起来很奇怪,但我有一个使用 Zend Framework 的完整 Web 应用程序连接到 Youtube 的前 API。问题是我有一堆代码,很多东西都在处理这段代码,而且 Zend 似乎没有更新它所以我可以使用 API 3.

我发现了错误,这是因为文件 youtube.php 正在使用这个 URLS:

const USER_URI = 'https://gdata.youtube.com/feeds/api/users';
    const VIDEO_URI = 'https://gdata.youtube.com/feeds/api/videos';
    const PLAYLIST_REL = 'http://gdata.youtube.com/schemas/2007#playlist';
    const USER_UPLOADS_REL = 'http://gdata.youtube.com/schemas/2007#user.uploads';
    const USER_PLAYLISTS_REL = 'http://gdata.youtube.com/schemas/2007#user.playlists';
    const USER_SUBSCRIPTIONS_REL = 'http://gdata.youtube.com/schemas/2007#user.subscriptions';
    const USER_CONTACTS_REL = 'http://gdata.youtube.com/schemas/2007#user.contacts';
    const USER_FAVORITES_REL = 'http://gdata.youtube.com/schemas/2007#user.favorites';
    const VIDEO_RESPONSES_REL = 'http://gdata.youtube.com/schemas/2007#video.responses';
    const VIDEO_RATINGS_REL = 'http://gdata.youtube.com/schemas/2007#video.ratings';
    const VIDEO_COMPLAINTS_REL = 'http://gdata.youtube.com/schemas/2007#video.complaints';
    const ACTIVITY_FEED_URI = 'https://gdata.youtube.com/feeds/api/events';
    const FRIEND_ACTIVITY_FEED_URI =
        'https://gdata.youtube.com/feeds/api/users/default/friendsactivity';

我认为这应该更改为新的请求 URL,但我认为这在整个代码中都在发生,我不知道如何更改,以便我可以实际使用新的 API.

我得到的错误是:

PHP Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Expected response code 200, got 410 No longer available' in C:...

请参阅 repo's page 上的自述文件:

This component is unmaintained. If you require API access to the Google api, please consider using https://code.google.com/p/google-api-php-client/