Zend Framework
1.12
|
Public Member Functions | |
__construct ($client=null, $applicationId= 'MyCompany-MyApp-1.0', $clientId=null, $developerKey=null) | |
Create Zend_Gdata_YouTube object. | |
setHttpClient ($client, $applicationId= 'MyCompany-MyApp-1.0', $clientId=null, $developerKey=null) | |
Set the Zend_Http_Client object used for communication. | |
getVideoFeed ($location=null) | |
Retrieves a feed of videos. | |
getVideoEntry ($videoId=null, $location=null, $fullEntry=false) | |
Retrieves a specific video entry. | |
getFullVideoEntry ($videoId) | |
Retrieves a video entry from the user's upload feed. | |
getRelatedVideoFeed ($videoId=null, $location=null) | |
Retrieves a feed of videos related to the specified video ID. | |
getVideoResponseFeed ($videoId=null, $location=null) | |
Retrieves a feed of video responses related to the specified video ID. | |
getVideoCommentFeed ($videoId=null, $location=null) | |
Retrieves a feed of comments related to the specified video ID. | |
getTopRatedVideoFeed ($location=null) | |
Retrieves a feed of comments related to the specified video ID. | |
getMostViewedVideoFeed ($location=null) | |
Retrieves a feed of the most viewed videos. | |
getRecentlyFeaturedVideoFeed ($location=null) | |
Retrieves a feed of recently featured videos. | |
getWatchOnMobileVideoFeed ($location=null) | |
Retrieves a feed of videos recently featured for mobile devices. | |
getPlaylistListFeed ($user=null, $location=null) | |
Retrieves a feed which lists a user's playlist. | |
getPlaylistVideoFeed ($location) | |
Retrieves a feed of videos in a particular playlist. | |
getSubscriptionFeed ($user=null, $location=null) | |
Retrieves a feed of a user's subscriptions. | |
getContactFeed ($user=null, $location=null) | |
Retrieves a feed of a user's contacts. | |
getUserUploads ($user=null, $location=null) | |
Retrieves a user's uploads. | |
getUserFavorites ($user=null, $location=null) | |
Retrieves a user's favorites. | |
getUserProfile ($user=null, $location=null) | |
Retrieves a user's profile as an entry. | |
getFormUploadToken ($videoEntry, $url='https://gdata.youtube.com/action/GetUploadToken') | |
Retrieves a YouTube token. | |
getActivityForUser ($username) | |
Retrieves the activity feed for users. | |
getFriendActivityForCurrentUser () | |
Retrieve the activity of the currently authenticated users friend. | |
getInboxFeedForCurrentUser () | |
Retrieve a feed of messages in the currently authenticated user's inbox. | |
sendVideoMessage ($body, $videoEntry=null, $videoId=null, $recipientUserName) | |
Send a video message. | |
replyToCommentEntry ($commentEntry, $commentText) | |
Post a comment in reply to an existing comment. | |
![]() | |
__construct ($client=null, $applicationId= 'MyCompany-MyApp-1.0') | |
Create Gdata_Media object. | |
![]() | |
__construct ($client=null, $applicationId= 'MyCompany-MyApp-1.0') | |
Create Gdata object. | |
getFeed ($location, $className='Zend_Gdata_Feed') | |
Retrieve feed as string or object. | |
getEntry ($location, $className='Zend_Gdata_Entry') | |
Retrieve entry as string or object. | |
performHttpRequest ($method, $url, $headers=array(), $body=null, $contentType=null, $remainingRedirects=null) | |
Performs a HTTP request using the specified method. | |
isAuthenticated () | |
Determines whether service object is authenticated. | |
![]() | |
__construct ($client=null, $applicationId= 'MyCompany-MyApp-1.0') | |
Create Gdata object. | |
registerPackage ($name) | |
Adds a Zend Framework package to the $_registeredPackages array. | |
getFeed ($uri, $className='Zend_Gdata_App_Feed') | |
Retrieve feed as string or object. | |
getEntry ($uri, $className='Zend_Gdata_App_Entry') | |
Retrieve entry as string or object. | |
getHttpClient () | |
Get the Zend_Http_Client object used for communication. | |
setHttpClient ($client, $applicationId= 'MyCompany-MyApp-1.0') | |
Set the Zend_Http_Client object used for communication. | |
setMajorProtocolVersion ($value) | |
Set the major protocol version that should be used. | |
getMajorProtocolVersion () | |
Get the major protocol version that is in use. | |
setMinorProtocolVersion ($value) | |
Set the minor protocol version that should be used. | |
getMinorProtocolVersion () | |
Get the minor protocol version that is in use. | |
prepareRequest ($method, $url=null, $headers=array(), $data=null, $contentTypeOverride=null) | |
Provides pre-processing for HTTP requests to APP services. | |
performHttpRequest ($method, $url, $headers=null, $body=null, $contentType=null, $remainingRedirects=null) | |
Performs a HTTP request using the specified method. | |
importUrl ($url, $className='Zend_Gdata_App_Feed', $extraHeaders=array()) | |
Imports the specified URL (non-statically). | |
get ($uri, $extraHeaders=array()) | |
GET a URI using client object. | |
post ($data, $uri=null, $remainingRedirects=null, $contentType=null, $extraHeaders=null) | |
POST data with client object. | |
put ($data, $uri=null, $remainingRedirects=null, $contentType=null, $extraHeaders=null) | |
PUT data with client object. | |
delete ($data, $remainingRedirects=null) | |
DELETE entry with client object. | |
insertEntry ($data, $uri, $className='Zend_Gdata_App_Entry', $extraHeaders=array()) | |
Inserts an entry to a given URI and returns the response as a fully formed Entry. | |
updateEntry ($data, $uri=null, $className=null, $extraHeaders=array()) | |
Update an entry. | |
__call ($method, $args) | |
Provides a magic factory method to instantiate new objects with shorter syntax than would otherwise be required by the Zend Framework naming conventions. | |
retrieveAllEntriesForFeed ($feed) | |
Retrieve all entries for a feed, iterating through pages as necessary. | |
enableRequestDebugLogging ($logfile) | |
This method enables logging of requests by changing the Zend_Http_Client_Adapter used for performing the requests. | |
getNextFeed ($feed, $className=null) | |
Retrieve next set of results based on a given feed. | |
getPreviousFeed ($feed, $className=null) | |
Retrieve previous set of results based on a given feed. | |
generateIfMatchHeaderData ($data, $allowWeek) | |
Returns the data for an If-Match header based on the current Etag property. | |
usingObjectMapping () | |
Determine whether service object is using XML to object mapping. | |
useObjectMapping ($value) | |
Enable/disable the use of XML to object mapping. | |
Static Public Member Functions | |
static | parseFormUploadTokenResponse ($response) |
Helper function for parsing a YouTube token response. | |
Public Attributes | |
const | AUTH_SERVICE_NAME = 'youtube' |
const | CLIENTLOGIN_URL = 'https://www.google.com/youtube/accounts/ClientLogin' |
const | STANDARD_TOP_RATED_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/top_rated' |
const | STANDARD_MOST_VIEWED_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/most_viewed' |
const | STANDARD_RECENTLY_FEATURED_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/recently_featured' |
const | STANDARD_WATCH_ON_MOBILE_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/watch_on_mobile' |
const | STANDARD_TOP_RATED_URI_V2 |
const | STANDARD_MOST_VIEWED_URI_V2 |
const | STANDARD_RECENTLY_FEATURED_URI_V2 |
const | STANDARD_WATCH_ON_MOBILE_URI_V2 |
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 |
const | IN_REPLY_TO_SCHEME |
const | INBOX_FEED_URI |
const | ACTIVITY_FEED_MAX_USERS = 20 |
const | FAVORITES_URI_SUFFIX = 'favorites' |
const | UPLOADS_URI_SUFFIX = 'uploads' |
const | RESPONSES_URI_SUFFIX = 'responses' |
const | RELATED_URI_SUFFIX = 'related' |
const | INBOX_URI_SUFFIX = 'inbox' |
Static Public Attributes | |
static | $namespaces |
![]() | |
static | $namespaces |
![]() | |
static | $namespaces |
Additional Inherited Members | |
![]() | |
$_defaultPostUri = null | |
$_registeredPackages | |
$_httpClient | |
![]() | |
static | $_staticHttpClient = null |
__construct | ( | $client = null , |
|
$applicationId = 'MyCompany-MyApp-1.0' , |
|||
$clientId = null , |
|||
$developerKey = null |
|||
) |
Create Zend_Gdata_YouTube object.
Zend_Http_Client | $client | (optional) The HTTP client to use when when communicating with the Google servers. |
string | $applicationId | The identity of the app in the form of Company-AppName-Version |
string | $clientId | The clientId issued by the YouTube dashboard |
string | $developerKey | The developerKey issued by the YouTube dashboard |
getActivityForUser | ( | $username | ) |
Retrieves the activity feed for users.
mixed | $usernames | A string identifying the usernames for which to retrieve activity for. This can also be a Zend_Gdata_Query object from which a URL can be determined. |
Zend_Gdata_App_VersionException | if using version less than 2. |
getContactFeed | ( | $user = null , |
|
$location = null |
|||
) |
Retrieves a feed of a user's contacts.
string | $user | (optional) The username of interest |
mixed | $location | (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined |
getFormUploadToken | ( | $videoEntry, | |
$url = 'https://gdata.youtube.com/action/GetUploadToken' |
|||
) |
Retrieves a YouTube token.
Zend_Gdata_YouTube_VideoEntry | $videoEntry | The video entry |
string | $url | The location as a string URL |
Zend_Gdata_App_Exception |
getFriendActivityForCurrentUser | ( | ) |
Retrieve the activity of the currently authenticated users friend.
Zend_Gdata_App_Exception | if not logged in. |
getFullVideoEntry | ( | $videoId | ) |
Retrieves a video entry from the user's upload feed.
mixed | $videoID | The ID of the video to retrieve. |
Zend_Gdata_App_HttpException |
getInboxFeedForCurrentUser | ( | ) |
Retrieve a feed of messages in the currently authenticated user's inbox.
Zend_Gdata_App_Exception | if not logged in. |
getMostViewedVideoFeed | ( | $location = null | ) |
Retrieves a feed of the most viewed videos.
mixed | $location | (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined |
getPlaylistListFeed | ( | $user = null , |
|
$location = null |
|||
) |
Retrieves a feed which lists a user's playlist.
string | $user | (optional) The username of interest |
mixed | $location | (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined |
getPlaylistVideoFeed | ( | $location | ) |
Retrieves a feed of videos in a particular playlist.
mixed | $location | (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined |
getRecentlyFeaturedVideoFeed | ( | $location = null | ) |
Retrieves a feed of recently featured videos.
mixed | $location | (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined |
getRelatedVideoFeed | ( | $videoId = null , |
|
$location = null |
|||
) |
Retrieves a feed of videos related to the specified video ID.
string | $videoId | The videoId of interest |
mixed | $location | (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined |
getSubscriptionFeed | ( | $user = null , |
|
$location = null |
|||
) |
Retrieves a feed of a user's subscriptions.
string | $user | (optional) The username of interest |
mixed | $location | (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined |
getTopRatedVideoFeed | ( | $location = null | ) |
Retrieves a feed of comments related to the specified video ID.
mixed | $location | (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined |
getUserFavorites | ( | $user = null , |
|
$location = null |
|||
) |
Retrieves a user's favorites.
string | $user | (optional) The username of interest |
mixed | $location | (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined |
getUserProfile | ( | $user = null , |
|
$location = null |
|||
) |
Retrieves a user's profile as an entry.
string | $user | (optional) The username of interest |
mixed | $location | (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined |
getUserUploads | ( | $user = null , |
|
$location = null |
|||
) |
Retrieves a user's uploads.
string | $user | (optional) The username of interest |
mixed | $location | (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined |
getVideoCommentFeed | ( | $videoId = null , |
|
$location = null |
|||
) |
Retrieves a feed of comments related to the specified video ID.
string | $videoId | The videoId of interest |
mixed | $location | (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined |
getVideoEntry | ( | $videoId = null , |
|
$location = null , |
|||
$fullEntry = false |
|||
) |
Retrieves a specific video entry.
mixed | $videoId | The ID of the video to retrieve. |
mixed | $location | (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined. |
boolean | $fullEntry | (optional) Retrieve the full metadata for the entry. Only possible if entry belongs to currently authenticated user. An exception will be thrown otherwise. |
Zend_Gdata_App_HttpException |
getVideoFeed | ( | $location = null | ) |
Retrieves a feed of videos.
mixed | $location | (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined |
getVideoResponseFeed | ( | $videoId = null , |
|
$location = null |
|||
) |
Retrieves a feed of video responses related to the specified video ID.
string | $videoId | The videoId of interest |
mixed | $location | (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined |
getWatchOnMobileVideoFeed | ( | $location = null | ) |
Retrieves a feed of videos recently featured for mobile devices.
These videos will have RTSP links in the $entry->mediaGroup->content
mixed | $location | (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined |
|
static |
Helper function for parsing a YouTube token response.
string | $response | The service response |
Zend_Gdata_App_Exception |
replyToCommentEntry | ( | $commentEntry, | |
$commentText | |||
) |
Post a comment in reply to an existing comment.
Zend_Gdata_YouTube_CommentEntry | $commentEntry | The comment entry to reply to |
string | $commentText | The text of the comment to post |
sendVideoMessage | ( | $body, | |
$videoEntry = null , |
|||
$videoId = null , |
|||
$recipientUserName | |||
) |
Send a video message.
Note: Either a Zend_Gdata_YouTube_VideoEntry or a valid video ID must be provided.
string | $body | The body of the message |
Zend_Gdata_YouTube_VideoEntry | (optional) The video entry to send | |
string | $videoId | The id of the video to send |
string | $recipientUserName | The username of the recipient |
Zend_Gdata_App_InvalidArgumentException | if no valid Zend_Gdata_YouTube_VideoEntry or videoId were provided |
setHttpClient | ( | $client, | |
$applicationId = 'MyCompany-MyApp-1.0' , |
|||
$clientId = null , |
|||
$developerKey = null |
|||
) |
Set the Zend_Http_Client object used for communication.
Zend_Http_Client | $client | The client to use for communication |
Zend_Gdata_App_HttpException |
|
static |
const ACTIVITY_FEED_MAX_USERS = 20 |
const ACTIVITY_FEED_URI = 'https://gdata.youtube.com/feeds/api/events' |
const AUTH_SERVICE_NAME = 'youtube' |
const CLIENTLOGIN_URL = 'https://www.google.com/youtube/accounts/ClientLogin' |
const FAVORITES_URI_SUFFIX = 'favorites' |
const FRIEND_ACTIVITY_FEED_URI |
const IN_REPLY_TO_SCHEME |
const INBOX_FEED_URI |
const INBOX_URI_SUFFIX = 'inbox' |
const PLAYLIST_REL = 'http://gdata.youtube.com/schemas/2007#playlist' |
const RELATED_URI_SUFFIX = 'related' |
const RESPONSES_URI_SUFFIX = 'responses' |
const STANDARD_MOST_VIEWED_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/most_viewed' |
const STANDARD_MOST_VIEWED_URI_V2 |
const STANDARD_RECENTLY_FEATURED_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/recently_featured' |
const STANDARD_RECENTLY_FEATURED_URI_V2 |
const STANDARD_TOP_RATED_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/top_rated' |
const STANDARD_TOP_RATED_URI_V2 |
const STANDARD_WATCH_ON_MOBILE_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/watch_on_mobile' |
const STANDARD_WATCH_ON_MOBILE_URI_V2 |
const UPLOADS_URI_SUFFIX = 'uploads' |
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 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_UPLOADS_REL = 'http://gdata.youtube.com/schemas/2007#user.uploads' |
const USER_URI = 'https://gdata.youtube.com/feeds/api/users' |
const VIDEO_COMPLAINTS_REL = 'http://gdata.youtube.com/schemas/2007#video.complaints' |
const VIDEO_RATINGS_REL = 'http://gdata.youtube.com/schemas/2007#video.ratings' |
const VIDEO_RESPONSES_REL = 'http://gdata.youtube.com/schemas/2007#video.responses' |
const VIDEO_URI = 'https://gdata.youtube.com/feeds/api/videos' |