Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Service class for interacting with the YouTube Data API.
AUTH_SERVICE_NAME = 'youtube'
CLIENTLOGIN_URL = 'https://www.google.com/youtube/accounts/ClientLogin'
STANDARD_TOP_RATED_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/top_rated'
STANDARD_MOST_VIEWED_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/most_viewed'
STANDARD_RECENTLY_FEATURED_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/recently_featured'
STANDARD_WATCH_ON_MOBILE_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/watch_on_mobile'
STANDARD_TOP_RATED_URI_V2 = 'http://gdata.youtube.com/feeds/api/standardfeeds/top_rated'
STANDARD_MOST_VIEWED_URI_V2 = 'http://gdata.youtube.com/feeds/api/standardfeeds/most_viewed'
STANDARD_RECENTLY_FEATURED_URI_V2 = 'http://gdata.youtube.com/feeds/api/standardfeeds/recently_featured'
STANDARD_WATCH_ON_MOBILE_URI_V2 = 'http://gdata.youtube.com/feeds/api/standardfeeds/watch_on_mobile'
USER_URI = 'http://gdata.youtube.com/feeds/api/users'
VIDEO_URI = 'http://gdata.youtube.com/feeds/api/videos'
PLAYLIST_REL = 'http://gdata.youtube.com/schemas/2007#playlist'
USER_UPLOADS_REL = 'http://gdata.youtube.com/schemas/2007#user.uploads'
USER_PLAYLISTS_REL = 'http://gdata.youtube.com/schemas/2007#user.playlists'
USER_SUBSCRIPTIONS_REL = 'http://gdata.youtube.com/schemas/2007#user.subscriptions'
USER_CONTACTS_REL = 'http://gdata.youtube.com/schemas/2007#user.contacts'
USER_FAVORITES_REL = 'http://gdata.youtube.com/schemas/2007#user.favorites'
VIDEO_RESPONSES_REL = 'http://gdata.youtube.com/schemas/2007#video.responses'
VIDEO_RATINGS_REL = 'http://gdata.youtube.com/schemas/2007#video.ratings'
VIDEO_COMPLAINTS_REL = 'http://gdata.youtube.com/schemas/2007#video.complaints'
ACTIVITY_FEED_URI = 'http://gdata.youtube.com/feeds/api/events'
FRIEND_ACTIVITY_FEED_URI = 'http://gdata.youtube.com/feeds/api/users/default/friendsactivity'
string IN_REPLY_TO_SCHEME = 'http://gdata.youtube.com/schemas/2007#in-reply-to'
The URI of the in-reply-to schema for comments in reply to other comments.
string INBOX_FEED_URI = 'http://gdata.youtube.com/feeds/api/users/default/inbox'
The URI of the inbox feed for the currently authenticated user.
integer ACTIVITY_FEED_MAX_USERS = '20'
The maximum number of users for which activity can be requested for, as enforced by the API.
string FAVORITES_URI_SUFFIX = 'favorites'
The suffix for a feed of favorites.
string UPLOADS_URI_SUFFIX = 'uploads'
The suffix for the user's upload feed.
string RESPONSES_URI_SUFFIX = 'responses'
The suffix for a feed of video responses.
string RELATED_URI_SUFFIX = 'related'
The suffix for a feed of related videos.
string INBOX_URI_SUFFIX = 'inbox'
The suffix for a feed of messages (inbox entries).
array $namespaces = 'array'
Namespaces used for Zend_Gdata_YouTube
__construct(
Zend_Http_Client $client
=
null, string $applicationId
=
MyCompany-MyApp-1.0, string $clientId
=
null, string $developerKey
=
null
)
:
Create Zend_Gdata_YouTube object
getActivityForUser(
$username
)
:
Zend_Gdata_YouTube_ActivityFeed
Retrieves the activity feed for users
getContactFeed(
string $user
=
null, mixed $location
=
null
)
:
Zend_Gdata_YouTube_ContactFeed
Retrieves a feed of a user's contacts
getFormUploadToken(
Zend_Gdata_YouTube_VideoEntry $videoEntry, string $url
=
http://gdata.youtube.com/action/GetUploadToken
)
:
array
Retrieves a YouTube token
getFriendActivityForCurrentUser(
)
:
Zend_Gdata_YouTube_ActivityFeed
Retrieve the activity of the currently authenticated users friend.
getFullVideoEntry(
$videoId
)
:
Zend_Gdata_YouTube_VideoEntry|null
Retrieves a video entry from the user's upload feed.
getInboxFeedForCurrentUser(
)
:
Zend_Gdata_YouTube_InboxFeed|null
Retrieve a feed of messages in the currently authenticated user's inbox.
getMostViewedVideoFeed(
mixed $location
=
null
)
:
Zend_Gdata_YouTube_VideoFeed
Retrieves a feed of the most viewed videos.
getPlaylistListFeed(
string $user
=
null, mixed $location
=
null
)
:
Zend_Gdata_YouTube_PlaylistListFeed
Retrieves a feed which lists a user's playlist
getPlaylistVideoFeed(
mixed $location
)
:
Zend_Gdata_YouTube_PlaylistVideoFeed
Retrieves a feed of videos in a particular playlist
getRecentlyFeaturedVideoFeed(
mixed $location
=
null
)
:
Zend_Gdata_YouTube_VideoFeed
Retrieves a feed of recently featured videos.
getRelatedVideoFeed(
string $videoId
=
null, mixed $location
=
null
)
:
Zend_Gdata_YouTube_VideoFeed
Retrieves a feed of videos related to the specified video ID.
getSubscriptionFeed(
string $user
=
null, mixed $location
=
null
)
:
Zend_Gdata_YouTube_SubscriptionListFeed
Retrieves a feed of a user's subscriptions
getTopRatedVideoFeed(
mixed $location
=
null
)
:
Zend_Gdata_YouTube_CommentFeed
Retrieves a feed of comments related to the specified video ID.
getUserFavorites(
string $user
=
null, mixed $location
=
null
)
:
Zend_Gdata_YouTube_VideoFeed
Retrieves a user's favorites
getUserProfile(
string $user
=
null, mixed $location
=
null
)
:
Zend_Gdata_YouTube_UserProfileEntry
Retrieves a user's profile as an entry
getUserUploads(
string $user
=
null, mixed $location
=
null
)
:
Zend_Gdata_YouTube_VideoFeed
Retrieves a user's uploads
getVideoCommentFeed(
string $videoId
=
null, mixed $location
=
null
)
:
Zend_Gdata_YouTube_CommentFeed
Retrieves a feed of comments related to the specified video ID.
getVideoEntry(
mixed $videoId
=
null, mixed $location
=
null, boolean $fullEntry
=
false
)
:
Zend_Gdata_YouTube_VideoEntry
Retrieves a specific video entry.
getVideoFeed(
mixed $location
=
null
)
:
Zend_Gdata_YouTube_VideoFeed
Retrieves a feed of videos.
getVideoResponseFeed(
string $videoId
=
null, mixed $location
=
null
)
:
Zend_Gdata_YouTube_VideoFeed
Retrieves a feed of video responses related to the specified video ID.
getWatchOnMobileVideoFeed(
mixed $location
=
null
)
:
Zend_Gdata_YouTube_VideoFeed
Retrieves a feed of videos recently featured for mobile devices.
These videos will have RTSP links in the $entry->mediaGroup->content
parseFormUploadTokenResponse(
string $response
)
:
array
Helper function for parsing a YouTube token response
replyToCommentEntry(
Zend_Gdata_YouTube_CommentEntry $commentEntry, string $commentText
)
:
Zend_Gdata_YouTube_CommentEntry
Post a comment in reply to an existing comment
sendVideoMessage(
string $body, Zend_Gdata_YouTube_VideoEntry $videoEntry
=
null, string $videoId
=
null, string $recipientUserName
)
:
Zend_Gdata_YouTube_InboxEntry|null
Send a video message.
Note: Either a Zend_Gdata_YouTube_VideoEntry or a valid video ID must be provided.
setHttpClient(
Zend_Http_Client $client, $applicationId
=
MyCompany-MyApp-1.0, $clientId
=
null, $developerKey
=
null
)
:
Zend_Gdata_App
Set the Zend_Http_Client object used for communication