Service class for interacting with the YouTube Data API.

As the Google data API protocol is based upon the Atom Publishing Protocol (APP), Gdata functionality extends the appropriate Zend_Gdata_App classes

link http://code.google.com/apis/youtube/
category Zend
package Zend_Gdata
subpackage YouTube
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_Gdata_Media

 Methods

Provides a magic factory method to instantiate new objects with shorter syntax than would otherwise be required by the Zend Framework naming conventions. For instance, to construct a new Zend_Gdata_Calendar_Extension_Color, a developer simply needs to do $gCal->newColor(). For this magic constructor, packages are searched in the same order as which they appear in the $_registeredPackages array

__call(string $method, array $args) 
Inherited

Parameters

$method

string

The method name being called

$args

array

The arguments passed to the call

Exceptions

\Zend_Gdata_App_Exception

Create Zend_Gdata_YouTube object

__construct(\Zend_Http_Client $client = null, string $applicationId = 'MyCompany-MyApp-1.0', string $clientId = null, string $developerKey = null
inherited_from \Zend_Gdata_Media::__construct()

Parameters

$client

\Zend_Http_Client

(optional) The HTTP client to use when when communicating with the Google servers.

$applicationId

string

The identity of the app in the form of Company-AppName-Version

$clientId

string

The clientId issued by the YouTube dashboard

$developerKey

string

The developerKey issued by the YouTube dashboard

Create Gdata object

__construct(\Zend_Http_Client $client = null, string $applicationId = 'MyCompany-MyApp-1.0'
Inherited

Parameters

$client

\Zend_Http_Client

$applicationId

string

DELETE entry with client object

delete(mixed $data, $remainingRedirects = null) : void
Inherited

Parameters

$data

mixed

The Zend_Gdata_App_Entry or URL to delete

$remainingRedirects

Exceptions

\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_App_InvalidArgumentException

This method enables logging of requests by changing the Zend_Http_Client_Adapter used for performing the requests.

enableRequestDebugLogging(string $logfile) 
Inherited

NOTE: This will not work if you have customized the adapter already to use a proxy server or other interface.

Parameters

$logfile

string

The logfile to use when logging the requests

Returns the data for an If-Match header based on the current Etag property. If Etags are not supported by the server or cannot be extracted from the data, then null will be returned.

generateIfMatchHeaderData($data, $allowWeek) : string | null
Inherited

Parameters

$data

$allowWeek

Returns

stringnull$data

GET a URI using client object.

get(string $uri, array $extraHeaders = array()) : \Zend_Http_Response
Inherited

Parameters

$uri

string

GET URI

$extraHeaders

array

Extra headers to add to the request, as an array of string-based key/value pairs.

Exceptions

\Zend_Gdata_App_HttpException

Returns

\Zend_Http_Response

Retrieves the activity feed for users

getActivityForUser($username) : \Zend_Gdata_YouTube_ActivityFeed

Parameters

$username

Exceptions

\Zend_Gdata_App_VersionException if using version less than 2.

Returns

\Zend_Gdata_YouTube_ActivityFeed

Retrieves a feed of a user's contacts

getContactFeed(string $user = null, mixed $location = null) : \Zend_Gdata_YouTube_ContactFeed

Parameters

$user

string

(optional) The username of interest

$location

mixed

(optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined

Returns

\Zend_Gdata_YouTube_ContactFeedThe feed of contacts

Retrieve entry as string or object

getEntry(string $uri, string $className = 'Zend_Gdata_App_Entry') : string | \Zend_Gdata_App_Entry
Inherited

Parameters

$uri

string

$className

string

The class which is used as the return type

Returns

string\Zend_Gdata_App_EntryReturns string only if the object mapping has been disabled explicitly by passing false to the useObjectMapping() function.

Retrieve feed as string or object

getFeed(string $uri, string $className = 'Zend_Gdata_App_Feed') : string | \Zend_Gdata_App_Feed
Inherited

Parameters

$uri

string

The uri from which to retrieve the feed

$className

string

The class which is used as the return type

Returns

string\Zend_Gdata_App_FeedReturns string only if the object mapping has been disabled explicitly by passing false to the useObjectMapping() function.

Retrieves a YouTube token

getFormUploadToken(\Zend_Gdata_YouTube_VideoEntry $videoEntry, string $url = 'https://gdata.youtube.com/action/GetUploadToken') : array

Parameters

$videoEntry

\Zend_Gdata_YouTube_VideoEntry

The video entry

$url

string

The location as a string URL

Exceptions

\Zend_Gdata_App_Exception

Returns

arrayAn array containing a token and URL

Retrieve the activity of the currently authenticated users friend.

getFriendActivityForCurrentUser() : \Zend_Gdata_YouTube_ActivityFeed

Exceptions

\Zend_Gdata_App_Exception if not logged in.

Returns

\Zend_Gdata_YouTube_ActivityFeed

Retrieves a video entry from the user's upload feed.

getFullVideoEntry($videoId) : \Zend_Gdata_YouTube_VideoEntry | null

Parameters

$videoId

Exceptions

\Zend_Gdata_App_HttpException

Returns

\Zend_Gdata_YouTube_VideoEntrynullThe video entry to be retrieved, or null if it was not found or the user requesting it did not have the appropriate permissions.

Get the HTTP override state

getGzipEnabled() : boolean
InheritedStatic

Returns

boolean

Get the Zend_Http_Client object used for communication

getHttpClient() : \Zend_Http_Client
Inherited

Returns

\Zend_Http_Client

Get the HTTP override state

getHttpMethodOverride() : boolean
InheritedStatic

Returns

boolean

Retrieve a feed of messages in the currently authenticated user's inbox.

getInboxFeedForCurrentUser() : \Zend_Gdata_YouTube_InboxFeed | null

Exceptions

\Zend_Gdata_App_Exception if not logged in.

Returns

\Zend_Gdata_YouTube_InboxFeednull

Get the major protocol version that is in use.

getMajorProtocolVersion() : integer
Inherited
see

Returns

integerThe major protocol version in use.

Get the maximum number of redirects to follow during HTTP operations

getMaxRedirects() : integer
InheritedStatic

Returns

integerMaximum number of redirects to follow

Get the minor protocol version that is in use.

getMinorProtocolVersion() : \(int | \NULL)
Inherited
see

Returns

\(int\NULL)The major protocol version in use, or NULL if no minor version is specified.

Retrieves a feed of the most viewed videos.

getMostViewedVideoFeed(mixed $location = null) : \Zend_Gdata_YouTube_VideoFeed

Parameters

$location

mixed

(optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined

Returns

\Zend_Gdata_YouTube_VideoFeedThe feed of videos found at the specified URL.

Retrieve next set of results based on a given feed.

getNextFeed(\Zend_Gdata_App_Feed $feed, string $className = null) : \Zend_Gdata_App_Feed | null
Inherited

Parameters

$feed

\Zend_Gdata_App_Feed

The feed from which to retreive the next set of results.

$className

string

(optional) The class of feed to be returned. If null, the next feed (if found) will be the same class as the feed that was given as the first argument.

Returns

\Zend_Gdata_App_FeednullReturns a Zend_Gdata_App_Feed or null if no next set of results exists.

Retrieves a feed which lists a user's playlist

getPlaylistListFeed(string $user = null, mixed $location = null) : \Zend_Gdata_YouTube_PlaylistListFeed

Parameters

$user

string

(optional) The username of interest

$location

mixed

(optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined

Returns

\Zend_Gdata_YouTube_PlaylistListFeedThe feed of playlists

Retrieves a feed of videos in a particular playlist

getPlaylistVideoFeed(mixed $location) : \Zend_Gdata_YouTube_PlaylistVideoFeed

Parameters

$location

mixed

(optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined

Returns

\Zend_Gdata_YouTube_PlaylistVideoFeedThe feed of videos found at the specified URL.

Retrieve previous set of results based on a given feed.

getPreviousFeed(\Zend_Gdata_App_Feed $feed, string $className = null) : \Zend_Gdata_App_Feed | null
Inherited

Parameters

$feed

\Zend_Gdata_App_Feed

The feed from which to retreive the previous set of results.

$className

string

(optional) The class of feed to be returned. If null, the previous feed (if found) will be the same class as the feed that was given as the first argument.

Returns

\Zend_Gdata_App_FeednullReturns a Zend_Gdata_App_Feed or null if no previous set of results exists.

Retrieves a feed of recently featured videos.

getRecentlyFeaturedVideoFeed(mixed $location = null) : \Zend_Gdata_YouTube_VideoFeed

Parameters

$location

mixed

(optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined

Returns

\Zend_Gdata_YouTube_VideoFeedThe feed of videos found at the specified URL.

Retrieves a feed of videos related to the specified video ID.

getRelatedVideoFeed(string $videoId = null, mixed $location = null) : \Zend_Gdata_YouTube_VideoFeed

Parameters

$videoId

string

The videoId of interest

$location

mixed

(optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined

Returns

\Zend_Gdata_YouTube_VideoFeedThe feed of videos found at the specified URL.

Gets the HTTP client object. If none is set, a new Zend_Http_Client will be used.

getStaticHttpClient() : \Zend_Http_Client
InheritedStatic

Returns

\Zend_Http_Client

Retrieves a feed of a user's subscriptions

getSubscriptionFeed(string $user = null, mixed $location = null) : \Zend_Gdata_YouTube_SubscriptionListFeed

Parameters

$user

string

(optional) The username of interest

$location

mixed

(optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined

Returns

\Zend_Gdata_YouTube_SubscriptionListFeedThe feed of subscriptions

Retrieves a feed of comments related to the specified video ID.

getTopRatedVideoFeed(mixed $location = null) : \Zend_Gdata_YouTube_CommentFeed

Parameters

$location

mixed

(optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined

Returns

\Zend_Gdata_YouTube_CommentFeedThe feed of videos found at the specified URL.

Retrieves a user's favorites

getUserFavorites(string $user = null, mixed $location = null) : \Zend_Gdata_YouTube_VideoFeed

Parameters

$user

string

(optional) The username of interest

$location

mixed

(optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined

Returns

\Zend_Gdata_YouTube_VideoFeedThe videos favorited by the user

Retrieves a user's profile as an entry

getUserProfile(string $user = null, mixed $location = null) : \Zend_Gdata_YouTube_UserProfileEntry

Parameters

$user

string

(optional) The username of interest

$location

mixed

(optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined

Returns

\Zend_Gdata_YouTube_UserProfileEntryThe user profile entry

Retrieves a user's uploads

getUserUploads(string $user = null, mixed $location = null) : \Zend_Gdata_YouTube_VideoFeed

Parameters

$user

string

(optional) The username of interest

$location

mixed

(optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined

Returns

\Zend_Gdata_YouTube_VideoFeedThe videos uploaded by the user

Get whether to use verbose exception messages

getVerboseExceptionMessages() : boolean
InheritedStatic

In the case of HTTP errors, use the body of the HTTP response in the exception message.

Returns

boolean

Retrieves a feed of comments related to the specified video ID.

getVideoCommentFeed(string $videoId = null, mixed $location = null) : \Zend_Gdata_YouTube_CommentFeed

Parameters

$videoId

string

The videoId of interest

$location

mixed

(optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined

Returns

\Zend_Gdata_YouTube_CommentFeedThe feed of videos found at the specified URL.

Retrieves a specific video entry.

getVideoEntry(mixed $videoId = null, mixed $location = null, boolean $fullEntry = false) : \Zend_Gdata_YouTube_VideoEntry

Parameters

$videoId

mixed

The ID of the video to retrieve.

$location

mixed

(optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined.

$fullEntry

boolean

(optional) Retrieve the full metadata for the entry. Only possible if entry belongs to currently authenticated user. An exception will be thrown otherwise.

Exceptions

\Zend_Gdata_App_HttpException

Returns

\Zend_Gdata_YouTube_VideoEntryThe video entry found at the specified URL.

Retrieves a feed of videos.

getVideoFeed(mixed $location = null) : \Zend_Gdata_YouTube_VideoFeed

Parameters

$location

mixed

(optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined

Returns

\Zend_Gdata_YouTube_VideoFeedThe feed of videos found at the specified URL.

Retrieves a feed of video responses related to the specified video ID.

getVideoResponseFeed(string $videoId = null, mixed $location = null) : \Zend_Gdata_YouTube_VideoFeed

Parameters

$videoId

string

The videoId of interest

$location

mixed

(optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined

Returns

\Zend_Gdata_YouTube_VideoFeedThe feed of videos found at the specified URL.

Retrieves a feed of videos recently featured for mobile devices.

getWatchOnMobileVideoFeed(mixed $location = null) : \Zend_Gdata_YouTube_VideoFeed

These videos will have RTSP links in the $entry->mediaGroup->content

Parameters

$location

mixed

(optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined

Returns

\Zend_Gdata_YouTube_VideoFeedThe feed of videos found at the specified URL.

Imports a feed located at $uri.

import(string $uri, \Zend_Http_Client $client = null, string $className = 'Zend_Gdata_App_Feed', boolean $useObjectMapping = true) : string | \Zend_Gdata_App_Feed
InheritedStatic

Parameters

$uri

string

$client

\Zend_Http_Client

The client used for communication

$className

string

The class which is used as the return type

$useObjectMapping

boolean

Enable/disable the use of XML to object mapping.

Exceptions

\Zend_Gdata_App_Exception

Returns

string\Zend_Gdata_App_FeedReturns string only if the fourth parameter ($useObjectMapping) is set to false.

Imports a feed from a file located at $filename.

importFile(string $filename, string $className = 'Zend_Gdata_App_Feed', string $useIncludePath = false) : \Zend_Gdata_App_Feed
InheritedStatic

Parameters

$filename

string

$className

string

The class which is used as the return type

$useIncludePath

string

Whether the include_path should be searched

Exceptions

\Zend_Gdata_App_Exception

Returns

\Zend_Gdata_App_Feed

Imports a feed represented by $string.

importString(string $string, string $className = 'Zend_Gdata_App_Feed', $majorProtocolVersion = null, $minorProtocolVersion = null) : \Zend_Gdata_App_Feed
InheritedStatic

Parameters

$string

string

$className

string

The class which is used as the return type

$majorProtocolVersion

$minorProtocolVersion

Exceptions

\Zend_Gdata_App_Exception

Returns

\Zend_Gdata_App_Feed

Imports the specified URL (non-statically).

importUrl(string $url, string $className = 'Zend_Gdata_App_Feed', array $extraHeaders = array()) : string | \Zend_Gdata_App_Feed
Inherited

Parameters

$url

string

The URL to import

$className

string

The class which is used as the return type

$extraHeaders

array

Extra headers to add to the request, as an array of string-based key/value pairs.

Exceptions

\Zend_Gdata_App_Exception

Returns

string\Zend_Gdata_App_FeedReturns string only if the object mapping has been disabled explicitly by passing false to the useObjectMapping() function.

Inserts an entry to a given URI and returns the response as a fully formed Entry.

insertEntry(mixed $data, string $uri, string $className = 'Zend_Gdata_App_Entry', array $extraHeaders = array()) : \Zend_Gdata_App_Entry
Inherited

Parameters

$data

mixed

The Zend_Gdata_App_Entry or XML to post

$uri

string

POST URI

$className

string

The class of entry to be returned.

$extraHeaders

array

Extra headers to add to the request, as an array of string-based key/value pairs.

Returns

\Zend_Gdata_App_EntryThe entry returned by the service after insertion.

Determines whether service object is authenticated.

isAuthenticated() : boolean
Inherited

Returns

booleanTrue if service object is authenticated, false otherwise.

Helper function for parsing a YouTube token response

parseFormUploadTokenResponse(string $response) : array
Static

Parameters

$response

string

The service response

Exceptions

\Zend_Gdata_App_Exception

Returns

arrayAn array containing the token and URL

Performs a HTTP request using the specified method

performHttpRequest(string $method, string $url, array $headers = null, string $body = null, string $contentType = null, integer $remainingRedirects = null) : \Zend_Http_Response
Inherited

Parameters

$method

string

The HTTP method for the request - 'GET', 'POST', 'PUT', 'DELETE'

$url

string

The URL to which this request is being performed

$headers

array

An associative array of HTTP headers for this request

$body

string

The body of the HTTP request

$contentType

string

The value for the content type of the request body

$remainingRedirects

integer

Number of redirects to follow if request s results in one

Returns

\Zend_Http_ResponseThe response object

POST data with client object

post(mixed $data, string $uri = null, $remainingRedirects = null, string $contentType = null, array $extraHeaders = null) : \Zend_Http_Response
Inherited

Parameters

$data

mixed

The Zend_Gdata_App_Entry or XML to post

$uri

string

POST URI

$remainingRedirects

$contentType

string

Content-type of the data

$extraHeaders

array

Extra headers to add to the request, as an array of string-based key/value pairs.

Exceptions

\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_App_InvalidArgumentException

Returns

\Zend_Http_Response

Provides pre-processing for HTTP requests to APP services.

prepareRequest(string $method, string $url = null, array $headers = array(), mixed $data = null, string $contentTypeOverride = null) : array
Inherited
  1. Checks the $data element and, if it's an entry, extracts the XML, multipart data, edit link (PUT,DELETE), etc.
  2. If $data is a string, sets the default content-type header as 'application/atom+xml' if it's not already been set.
  3. Adds a x-http-method override header and changes the HTTP method to 'POST' if necessary as per getHttpMethodOverride()

Parameters

$method

string

The HTTP method for the request - 'GET', 'POST', 'PUT', 'DELETE'

$url

string

The URL to which this request is being performed, or null if found in $data

$headers

array

An associative array of HTTP headers for this request

$data

mixed

The Zend_Gdata_App_Entry or XML for the body of the request

$contentTypeOverride

string

The override value for the content type of the request body

Returns

arrayAn associative array containing the determined 'method', 'url', 'data', 'headers', 'contentType'

PUT data with client object

put(mixed $data, string $uri = null, $remainingRedirects = null, string $contentType = null, array $extraHeaders = null) : \Zend_Http_Response
Inherited

Parameters

$data

mixed

The Zend_Gdata_App_Entry or XML to post

$uri

string

PUT URI

$remainingRedirects

$contentType

string

Content-type of the data

$extraHeaders

array

Extra headers to add to the request, as an array of string-based key/value pairs.

Exceptions

\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_App_InvalidArgumentException

Returns

\Zend_Http_Response

Adds a Zend Framework package to the $_registeredPackages array.

registerPackage(string $name) : void
Inherited

This array is searched when using the magic __call method below to instantiante new objects.

Parameters

$name

string

The name of the package (eg Zend_Gdata_App)

Post a comment in reply to an existing comment

replyToCommentEntry(\Zend_Gdata_YouTube_CommentEntry $commentEntry, string $commentText) : \Zend_Gdata_YouTube_CommentEntry

Parameters

$commentEntry

\Zend_Gdata_YouTube_CommentEntry

The comment entry to reply to

$commentText

string

The text of the comment to post

Returns

\Zend_Gdata_YouTube_CommentEntrythe posted comment

Retrieve all entries for a feed, iterating through pages as necessary.

retrieveAllEntriesForFeed(object $feed) : mixed
Inherited

Be aware that calling this function on a large dataset will take a significant amount of time to complete. In some cases this may cause execution to timeout without proper precautions in place.

Parameters

$feed

object

The feed to iterate through.

Returns

mixedA new feed of the same type as the one originally passed in, containing all relevent entries.

Send a video message.

sendVideoMessage(string $body, $videoEntry = null, string $videoId = null, string $recipientUserName) : \Zend_Gdata_YouTube_InboxEntry | null

Note: Either a Zend_Gdata_YouTube_VideoEntry or a valid video ID must be provided.

Parameters

$body

string

The body of the message

$videoEntry

$videoId

string

The id of the video to send

$recipientUserName

string

The username of the recipient

Exceptions

\Zend_Gdata_App_InvalidArgumentException if no valid Zend_Gdata_YouTube_VideoEntry or videoId were provided

Returns

\Zend_Gdata_YouTube_InboxEntrynullThe Zend_Gdata_YouTube_Inbox_Entry representing the sent message.

Toggle requesting gzip encoded responses

setGzipEnabled(boolean $enabled = false) : void
InheritedStatic

Parameters

$enabled

boolean

Whether or not to enable gzipped responses

Set the Zend_Http_Client object used for communication

setHttpClient(\Zend_Http_Client $client, $applicationId = 'MyCompany-MyApp-1.0', $clientId = null, $developerKey = null) : \Zend_Gdata_App

Parameters

$client

\Zend_Http_Client

The client to use for communication

$applicationId

$clientId

$developerKey

Exceptions

\Zend_Gdata_App_HttpException

Returns

\Zend_Gdata_AppProvides a fluent interface

Set the Zend_Http_Client object used for communication

setHttpClient(\Zend_Http_Client $client, $applicationId = 'MyCompany-MyApp-1.0') : \Zend_Gdata_App
Inherited

Parameters

$client

\Zend_Http_Client

The client to use for communication

$applicationId

Exceptions

\Zend_Gdata_App_HttpException

Returns

\Zend_Gdata_AppProvides a fluent interface

Toggle using POST instead of PUT and DELETE HTTP methods

setHttpMethodOverride(boolean $override = true) : void
InheritedStatic

Some feed implementations do not accept PUT and DELETE HTTP methods, or they can't be used because of proxies or other measures. This allows turning on using POST where PUT and DELETE would normally be used; in addition, an X-Method-Override header will be sent with a value of PUT or DELETE as appropriate.

Parameters

$override

boolean

Whether to override PUT and DELETE with POST.

Set the major protocol version that should be used. Values < 1 will cause a Zend_Gdata_App_InvalidArgumentException to be thrown.

setMajorProtocolVersion(integer $value) 
Inherited
see

Parameters

$value

integer

The major protocol version to use.

Exceptions

\Zend_Gdata_App_InvalidArgumentException

Set the maximum number of redirects to follow during HTTP operations

setMaxRedirects(integer $maxRedirects) : void
InheritedStatic

Parameters

$maxRedirects

integer

Maximum number of redirects to follow

Set the minor protocol version that should be used. If set to NULL, no minor protocol version will be sent to the server. Values < 0 will cause a Zend_Gdata_App_InvalidArgumentException to be thrown.

setMinorProtocolVersion(\(int|\NULL) $value) 
Inherited
see

Parameters

$value

\(int\NULL)

The minor protocol version to use.

Exceptions

\Zend_Gdata_App_InvalidArgumentException

Set the static HTTP client instance

setStaticHttpClient(\Zend_Http_Client $httpClient) : void
InheritedStatic

Sets the static HTTP client object to use for retrieving the feed.

Parameters

$httpClient

\Zend_Http_Client

Set whether to use verbose exception messages

setVerboseExceptionMessages(boolean $verbose) 
InheritedStatic

In the case of HTTP errors, use the body of the HTTP response in the exception message.

Parameters

$verbose

boolean

Whether to use verbose exception messages

Update an entry

updateEntry(mixed $data, $uri = null, $className = null, array $extraHeaders = array()) : \Zend_Gdata_App_Entry
Inherited

Parameters

$data

mixed

Zend_Gdata_App_Entry or XML (w/ID and link rel='edit')

$uri

$className

$extraHeaders

array

Extra headers to add to the request, as an array of string-based key/value pairs.

Exceptions

\Zend_Gdata_App_Exception

Returns

\Zend_Gdata_App_EntryThe entry returned from the server

Enable/disable the use of XML to object mapping.

useObjectMapping(boolean $value) : void
Inherited

Parameters

$value

boolean

Pass in true to use the XML to object mapping. Pass in false or null to disable it.

Determine whether service object is using XML to object mapping.

usingObjectMapping() : boolean
Inherited

Returns

booleanTrue if service object is using XML to object mapping, false otherwise.

 Properties

 

Namespaces used for Zend_Gdata_YouTube

$namespaces : array

Default

array(array('yt', 'http://gdata.youtube.com/schemas/2007', 1, 0), array('georss', 'http://www.georss.org/georss', 1, 0), array('gml', 'http://www.opengis.net/gml', 1, 0), array('media', 'http://search.yahoo.com/mrss/', 1, 0))
Static
inherited_from \Zend_Gdata_Media::namespaces
 

Namespaces used for Gdata data

$namespaces : array

Default

array(array('gd', 'http://schemas.google.com/g/2005', 1, 0), array('openSearch', 'http://a9.com/-/spec/opensearchrss/1.0/', 1, 0), array('openSearch', 'http://a9.com/-/spec/opensearch/1.1/', 2, 0), array('rss', 'http://blogs.law.harvard.edu/tech/rss', 1, 0))
Static
 

Default URI to which to POST.

$_defaultPostUri : string

Default

null
 

Enable gzipped responses?

$_gzipEnabled : boolean

Default

false
Static
 

Client object used to communicate

$_httpClient : \Zend_Http_Client

Default

 

Override HTTP PUT and DELETE request methods?

$_httpMethodOverride : boolean

Default

false
Static
 

Indicates the major protocol version that should be used.

$_majorProtocolVersion 

Default

At present, recognized values are either 1 or 2. However, any integer value >= 1 is considered valid.

Under most circumtances, this will be automatically set by Zend_Gdata_App subclasses.

see
see
 

Maximum number of redirects to follow during HTTP operations

$_maxRedirects : integer

Default

5
Static
 

Indicates the minor protocol version that should be used. Can be set to either an integer >= 0, or NULL if no minor version should be sent to the server.

$_minorProtocolVersion 

Default

At present, this field is not used by any Google services, but may be used in the future.

Under most circumtances, this will be automatically set by Zend_Gdata_App subclasses.

see
see
 

Packages to search for classes when using magic __call method, in order.

$_registeredPackages : array

Default

array('Zend_Gdata_App_Extension', 'Zend_Gdata_App')
 

Client object used to communicate in static context

$_staticHttpClient : \Zend_Http_Client

Default

null
Static
 

Whether we want to use XML to object mapping when fetching data.

$_useObjectMapping : boolean

Default

true
 

Use verbose exception messages. In the case of HTTP errors, use the body of the HTTP response in the exception message.

$_verboseExceptionMessages : boolean

Default

true
Static

 Constants

 

The maximum number of users for which activity can be requested for, as enforced by the API.

ACTIVITY_FEED_MAX_USERS = 20 : integer
 

ACTIVITY_FEED_URI

ACTIVITY_FEED_URI = 'https://gdata.youtube.com/feeds/api/events' 
 

AUTH_SERVICE_NAME

AUTH_SERVICE_NAME = 'youtube' 
 

Service name for use with Google's authentication mechanisms

AUTH_SERVICE_NAME = 'xapi' : string
 

CLIENTLOGIN_URL

CLIENTLOGIN_URL = 'https://www.google.com/youtube/accounts/ClientLogin' 
 

Default major protocol version.

DEFAULT_MAJOR_PROTOCOL_VERSION = 1 
see
 

Default minor protocol version.

DEFAULT_MINOR_PROTOCOL_VERSION = null 
see
 

The suffix for a feed of favorites.

FAVORITES_URI_SUFFIX = 'favorites' : string
 

FRIEND_ACTIVITY_FEED_URI

FRIEND_ACTIVITY_FEED_URI = 'https://gdata.youtube.com/feeds/api/users/default/friendsactivity' 
 

The URI of the inbox feed for the currently authenticated user.

INBOX_FEED_URI = 'https://gdata.youtube.com/feeds/api/users/default/inbox' : string
 

The suffix for a feed of messages (inbox entries).

INBOX_URI_SUFFIX = 'inbox' : string
 

The URI of the in-reply-to schema for comments in reply to other comments.

IN_REPLY_TO_SCHEME = 'http://gdata.youtube.com/schemas/2007#in-reply-to' : string
 

PLAYLIST_REL

PLAYLIST_REL = 'http://gdata.youtube.com/schemas/2007#playlist' 
   

The suffix for a feed of video responses.

RESPONSES_URI_SUFFIX = 'responses' : string
 

STANDARD_MOST_VIEWED_URI

STANDARD_MOST_VIEWED_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/most_viewed' 
 

STANDARD_MOST_VIEWED_URI_V2

STANDARD_MOST_VIEWED_URI_V2 = 'https://gdata.youtube.com/feeds/api/standardfeeds/most_viewed' 
     

STANDARD_TOP_RATED_URI

STANDARD_TOP_RATED_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/top_rated' 
 

STANDARD_TOP_RATED_URI_V2

STANDARD_TOP_RATED_URI_V2 = 'https://gdata.youtube.com/feeds/api/standardfeeds/top_rated' 
 

STANDARD_WATCH_ON_MOBILE_URI

STANDARD_WATCH_ON_MOBILE_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/watch_on_mobile' 
 

STANDARD_WATCH_ON_MOBILE_URI_V2

STANDARD_WATCH_ON_MOBILE_URI_V2 = 'https://gdata.youtube.com/feeds/api/standardfeeds/watch_on_mobile' 
 

The suffix for the user's upload feed.

UPLOADS_URI_SUFFIX = 'uploads' : string
 

USER_CONTACTS_REL

USER_CONTACTS_REL = 'http://gdata.youtube.com/schemas/2007#user.contacts' 
 

USER_FAVORITES_REL

USER_FAVORITES_REL = 'http://gdata.youtube.com/schemas/2007#user.favorites' 
 

USER_PLAYLISTS_REL

USER_PLAYLISTS_REL = 'http://gdata.youtube.com/schemas/2007#user.playlists' 
 

USER_SUBSCRIPTIONS_REL

USER_SUBSCRIPTIONS_REL = 'http://gdata.youtube.com/schemas/2007#user.subscriptions' 
 

USER_UPLOADS_REL

USER_UPLOADS_REL = 'http://gdata.youtube.com/schemas/2007#user.uploads' 
 

USER_URI

USER_URI = 'https://gdata.youtube.com/feeds/api/users' 
 

VIDEO_COMPLAINTS_REL

VIDEO_COMPLAINTS_REL = 'http://gdata.youtube.com/schemas/2007#video.complaints' 
 

VIDEO_RATINGS_REL

VIDEO_RATINGS_REL = 'http://gdata.youtube.com/schemas/2007#video.ratings' 
 

VIDEO_RESPONSES_REL

VIDEO_RESPONSES_REL = 'http://gdata.youtube.com/schemas/2007#video.responses' 
 

VIDEO_URI

VIDEO_URI = 'https://gdata.youtube.com/feeds/api/videos'