誰かが興味を持っている場合:
Zend Framework の最新バージョン (1.11.10) には、Google のサイト でここに記載されているように、サブスクリプションから最新のビデオを取得するための非常に重要なメソッドが含まれていません。
だから私は単に追加しました:
/**
* Retrieves a feed of a user's subscriptions
*
* @param string $user (optional) The username of interest
* @param mixed $location (optional) The URL to query or a
* Zend_Gdata_Query object from which a URL can be determined
* @return Zend_Gdata_YouTube_VideoFeed The newest video for each subscription
*/
public function getNewSubscriptionVideos($user = null, $location = null)
{
if ($user !== null) {
$uri = self::USER_URI . '/' . $user . '/newsubscriptionvideos';
} else if ($location instanceof Zend_Gdata_Query) {
$uri = $location->getQueryUrl();
} else {
$uri = $location;
}
return parent::getFeed($uri, 'Zend_Gdata_YouTube_VideoFeed');
}
Zend/GData ディレクトリの YouTube.php ドキュメントの 561 行目 ( getSubscriptionFeedメソッドの後)。
getNewSubscriptionVideosメソッドを呼び出してユーザー名または「デフォルト」を渡すと、次を使用してアクセスできる VideoEntities の配列が返されます。
$raw_new_subscription_videos = $_youtube->getNewSubscriptionVideos($username);
foreach ($raw_new_subscription_videos as $video)
{
$title = $video->getVideoTitle();
// etc.
}
これが、過去数時間、私と同じように道に迷っている他の人の助けになることを願っています。
ハウィー