Class Zend_Gdata_YouTube

Description

Service class for interacting with the YouTube Data API.

Located in /Gdata/YouTube.php (line 73)

Zend_Gdata_App
   |
   --Zend_Gdata
      |
      --Zend_Gdata_Media
         |
         --Zend_Gdata_YouTube
Class Constant Summary
 AUTH_SERVICE_NAME = 'youtube'
 CLIENTLOGIN_URL = 'https://www.google.com/youtube/accounts/ClientLogin'
 FAVORITES_URI_SUFFIX = 'favorites'
 PLAYLIST_REL = 'http://gdata.youtube.com/schemas/2007#playlist'
 RELATED_URI_SUFFIX = 'related'
 RESPONSES_URI_SUFFIX = 'responses'
 STANDARD_MOST_VIEWED_URI = 'http://gdata.youtube.com/feeds/standardfeeds/most_viewed'
 STANDARD_MOST_VIEWED_URI_V2 = 'http://gdata.youtube.com/feeds/api/standardfeeds/most_viewed'
 STANDARD_RECENTLY_FEATURED_URI = 'http://gdata.youtube.com/feeds/standardfeeds/recently_featured'
 STANDARD_RECENTLY_FEATURED_URI_V2 = 'http://gdata.youtube.com/feeds/api/standardfeeds/recently_featured'
 STANDARD_TOP_RATED_URI = 'http://gdata.youtube.com/feeds/standardfeeds/top_rated'
 STANDARD_TOP_RATED_URI_V2 = 'http://gdata.youtube.com/feeds/api/standardfeeds/top_rated'
 STANDARD_WATCH_ON_MOBILE_URI = 'http://gdata.youtube.com/feeds/standardfeeds/watch_on_mobile'
 STANDARD_WATCH_ON_MOBILE_URI_V2 = 'http://gdata.youtube.com/feeds/api/standardfeeds/watch_on_mobile'
 UPLOADS_URI_SUFFIX = 'uploads'
 USER_CONTACTS_REL = 'http://gdata.youtube.com/schemas/2007#user.contacts'
 USER_FAVORITES_REL = 'http://gdata.youtube.com/schemas/2007#user.favorites'
 USER_PLAYLISTS_REL = 'http://gdata.youtube.com/schemas/2007#user.playlists'
 USER_SUBSCRIPTIONS_REL = 'http://gdata.youtube.com/schemas/2007#user.subscriptions'
 USER_UPLOADS_REL = 'http://gdata.youtube.com/schemas/2007#user.uploads'
 USER_URI = 'http://gdata.youtube.com/feeds/api/users'
 VIDEO_COMPLAINTS_REL = 'http://gdata.youtube.com/schemas/2007#video.complaints'
 VIDEO_RATINGS_REL = 'http://gdata.youtube.com/schemas/2007#video.ratings'
 VIDEO_RESPONSES_REL = 'http://gdata.youtube.com/schemas/2007#video.responses'
 VIDEO_URI = 'http://gdata.youtube.com/feeds/api/videos'
Variable Summary
 static array $namespaces
Method Summary
 static array parseFormUploadTokenResponse (string $response)
 Zend_Gdata_YouTube_ContactFeed getContactFeed ([string $user = null], [mixed $location = null])
 array getFormUploadToken (Zend_Gdata_YouTube_VideoEntry $videoEntry, [string $url = 'http://gdata.youtube.com/action/GetUploadToken'])
 Zend_Gdata_YouTube_VideoEntry|null getFullVideoEntry ( $videoId, mixed $videoID)
 Zend_Gdata_YouTube_PlaylistListFeed getPlaylistListFeed ([string $user = null], [mixed $location = null])
 Zend_Gdata_YouTube_VideoFeed getRelatedVideoFeed ([string $videoId = null], [mixed $location = null])
 Zend_Gdata_YouTube_SubscriptionListFeed getSubscriptionFeed ([string $user = null], [mixed $location = null])
 Zend_Gdata_YouTube_VideoFeed getUserFavorites ([string $user = null], [mixed $location = null])
 Zend_Gdata_YouTube_UserProfileEntry getUserProfile ([string $user = null], [mixed $location = null])
 Zend_Gdata_YouTube_VideoFeed getUserUploads ([string $user = null], [mixed $location = null])
 Zend_Gdata_YouTube_CommentFeed getVideoCommentFeed ([string $videoId = null], [mixed $location = null])
 Zend_Gdata_YouTube_VideoEntry getVideoEntry ([mixed $videoId = null], [mixed $location = null], [boolean $fullEntry = false])
 Zend_Gdata_YouTube_VideoFeed getVideoFeed ([mixed $location = null])
 Zend_Gdata_YouTube_VideoFeed getVideoResponseFeed ([string $videoId = null], [mixed $location = null])
 Zend_Gdata_App setHttpClient (Zend_Http_Client $client, [ $applicationId = 'MyCompany-MyApp-1.0'], [ $clientId = null], [ $developerKey = null])
 Zend_Gdata_YouTube __construct ([Zend_Http_Client $client = null], [string $applicationId = 'MyCompany-MyApp-1.0'], [string $clientId = null], [string $developerKey = null])
Variables
static array $namespaces = 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))
(line 115)

Namespaces used for Zend_Gdata_YouTube

  • access: public

Redefinition of:
Zend_Gdata_Media::$namespaces
Namespaces used for Zend_Gdata_Photos

Inherited Variables

Inherited from Zend_Gdata

Zend_Gdata::$_defaultPostUri
Zend_Gdata::$_httpClient
Zend_Gdata::$_registeredPackages
Zend_Gdata::$_staticHttpClient

Inherited from Zend_Gdata_App

Zend_Gdata_App::$_gzipEnabled
Zend_Gdata_App::$_httpMethodOverride
Zend_Gdata_App::$_majorProtocolVersion
Zend_Gdata_App::$_maxRedirects
Zend_Gdata_App::$_minorProtocolVersion
Zend_Gdata_App::$_verboseExceptionMessages
Methods
static parseFormUploadTokenResponse (line 573)

Helper function for parsing a YouTube token response

  • return: An array containing the token and URL
  • throws: Zend_Gdata_App_Exception
  • access: public
static array parseFormUploadTokenResponse (string $response)
  • string $response: The service response
getContactFeed (line 492)

Retrieves a feed of a user's contacts

  • return: The feed of contacts
  • access: public
Zend_Gdata_YouTube_ContactFeed getContactFeed ([string $user = null], [mixed $location = null])
  • 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 (line 618)

Retrieves a YouTube token

  • return: An array containing a token and URL
  • throws: Zend_Gdata_App_Exception
  • access: public
array getFormUploadToken (Zend_Gdata_YouTube_VideoEntry $videoEntry, [string $url = 'http://gdata.youtube.com/action/GetUploadToken'])
getFullVideoEntry (line 230)

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

  • return: The video entry to be retrieved, or null if it was not found or the user requesting it did not have the appropriate permissions.
  • throws: Zend_Gdata_App_HttpException
  • access: public
Zend_Gdata_YouTube_VideoEntry|null getFullVideoEntry ( $videoId, mixed $videoID)
  • mixed $videoID: The ID of the video to retrieve.
  • $videoId
getMostViewedVideoFeed (line 340)

Retrieves a feed of the most viewed videos.

  • return: The feed of videos found at the specified URL.
  • access: public
Zend_Gdata_YouTube_VideoFeed getMostViewedVideoFeed ([mixed $location = null])
  • mixed $location: (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined
getPlaylistListFeed (line 434)

Retrieves a feed which lists a user's playlist

  • return: The feed of playlists
  • access: public
Zend_Gdata_YouTube_PlaylistListFeed getPlaylistListFeed ([string $user = null], [mixed $location = null])
  • 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 (line 454)

Retrieves a feed of videos in a particular playlist

  • return: The feed of videos found at the specified URL.
  • access: public
Zend_Gdata_YouTube_PlaylistVideoFeed getPlaylistVideoFeed (mixed $location)
  • mixed $location: (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined
getRecentlyFeaturedVideoFeed (line 371)

Retrieves a feed of recently featured videos.

  • return: The feed of videos found at the specified URL.
  • access: public
Zend_Gdata_YouTube_VideoFeed getRecentlyFeaturedVideoFeed ([mixed $location = null])
  • mixed $location: (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined
getRelatedVideoFeed (line 246)

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

  • return: The feed of videos found at the specified URL.
  • access: public
Zend_Gdata_YouTube_VideoFeed getRelatedVideoFeed ([string $videoId = null], [mixed $location = null])
  • 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 (line 472)

Retrieves a feed of a user's subscriptions

  • return: The feed of subscriptions
  • access: public
Zend_Gdata_YouTube_SubscriptionListFeed getSubscriptionFeed ([string $user = null], [mixed $location = null])
  • 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 (line 308)

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

  • return: The feed of videos found at the specified URL.
  • access: public
Zend_Gdata_YouTube_CommentFeed getTopRatedVideoFeed ([mixed $location = null])
  • mixed $location: (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined
getUserFavorites (line 533)

Retrieves a user's favorites

  • return: The videos favorited by the user
  • access: public
Zend_Gdata_YouTube_VideoFeed getUserFavorites ([string $user = null], [mixed $location = null])
  • 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 (line 554)

Retrieves a user's profile as an entry

  • return: The user profile entry
  • access: public
Zend_Gdata_YouTube_UserProfileEntry getUserProfile ([string $user = null], [mixed $location = null])
  • 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 (line 512)

Retrieves a user's uploads

  • return: The videos uploaded by the user
  • access: public
Zend_Gdata_YouTube_VideoFeed getUserUploads ([string $user = null], [mixed $location = null])
  • 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 (line 288)

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

  • return: The feed of videos found at the specified URL.
  • access: public
Zend_Gdata_YouTube_CommentFeed getVideoCommentFeed ([string $videoId = null], [mixed $location = null])
  • 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 (line 204)

Retrieves a specific video entry.

  • return: The video entry found at the specified URL.
  • throws: Zend_Gdata_App_HttpException
  • access: public
Zend_Gdata_YouTube_VideoEntry getVideoEntry ([mixed $videoId = null], [mixed $location = null], [boolean $fullEntry = false])
  • 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.
getVideoFeed (line 179)

Retrieves a feed of videos.

  • return: The feed of videos found at the specified URL.
  • access: public
Zend_Gdata_YouTube_VideoFeed getVideoFeed ([mixed $location = null])
  • mixed $location: (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined
getVideoResponseFeed (line 267)

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

  • return: The feed of videos found at the specified URL.
  • access: public
Zend_Gdata_YouTube_VideoFeed getVideoResponseFeed ([string $videoId = null], [mixed $location = null])
  • 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 (line 403)

Retrieves a feed of videos recently featured for mobile devices.

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

  • return: The feed of videos found at the specified URL.
  • access: public
Zend_Gdata_YouTube_VideoFeed getWatchOnMobileVideoFeed ([mixed $location = null])
  • mixed $location: (optional) The URL to query or a Zend_Gdata_Query object from which a URL can be determined
setHttpClient (line 150)

Set the Zend_Http_Client object used for communication

  • return: Provides a fluent interface
  • throws: Zend_Gdata_App_HttpException
  • access: public
Zend_Gdata_App setHttpClient (Zend_Http_Client $client, [ $applicationId = 'MyCompany-MyApp-1.0'], [ $clientId = null], [ $developerKey = null])
  • Zend_Http_Client $client: The client to use for communication
  • $applicationId
  • $clientId
  • $developerKey

Redefinition of:
Zend_Gdata_App::setHttpClient()
Set the Zend_Http_Client object used for communication
Constructor __construct (line 131)

Create Zend_Gdata_YouTube object

  • access: public
Zend_Gdata_YouTube __construct ([Zend_Http_Client $client = null], [string $applicationId = 'MyCompany-MyApp-1.0'], [string $clientId = null], [string $developerKey = null])
  • 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

Redefinition of:
Zend_Gdata_Media::__construct()
Create Gdata_Media object

Inherited Methods

Inherited From Zend_Gdata_Media

 Zend_Gdata_Media::__construct()

Inherited From Zend_Gdata

 Zend_Gdata::__construct()
 Zend_Gdata::getEntry()
 Zend_Gdata::getFeed()
 Zend_Gdata::import()
 Zend_Gdata::isAuthenticated()
 Zend_Gdata::performHttpRequest()

Inherited From Zend_Gdata_App

 Zend_Gdata_App::__construct()
 Zend_Gdata_App::delete()
 Zend_Gdata_App::enableRequestDebugLogging()
 Zend_Gdata_App::generateIfMatchHeaderData()
 Zend_Gdata_App::get()
 Zend_Gdata_App::getEntry()
 Zend_Gdata_App::getFeed()
 Zend_Gdata_App::getGzipEnabled()
 Zend_Gdata_App::getHttpClient()
 Zend_Gdata_App::getHttpMethodOverride()
 Zend_Gdata_App::getMajorProtocolVersion()
 Zend_Gdata_App::getMaxRedirects()
 Zend_Gdata_App::getMinorProtocolVersion()
 Zend_Gdata_App::getNextFeed()
 Zend_Gdata_App::getPreviousFeed()
 Zend_Gdata_App::getStaticHttpClient()
 Zend_Gdata_App::getVerboseExceptionMessages()
 Zend_Gdata_App::import()
 Zend_Gdata_App::importFile()
 Zend_Gdata_App::importString()
 Zend_Gdata_App::importUrl()
 Zend_Gdata_App::insertEntry()
 Zend_Gdata_App::performHttpRequest()
 Zend_Gdata_App::post()
 Zend_Gdata_App::prepareRequest()
 Zend_Gdata_App::put()
 Zend_Gdata_App::registerPackage()
 Zend_Gdata_App::retrieveAllEntriesForFeed()
 Zend_Gdata_App::setGzipEnabled()
 Zend_Gdata_App::setHttpClient()
 Zend_Gdata_App::setHttpMethodOverride()
 Zend_Gdata_App::setMajorProtocolVersion()
 Zend_Gdata_App::setMaxRedirects()
 Zend_Gdata_App::setMinorProtocolVersion()
 Zend_Gdata_App::setStaticHttpClient()
 Zend_Gdata_App::setVerboseExceptionMessages()
 Zend_Gdata_App::updateEntry()
 Zend_Gdata_App::__call()
Class Constants
AUTH_SERVICE_NAME = 'youtube' (line 76)
CLIENTLOGIN_URL = 'https://www.google.com/youtube/accounts/ClientLogin' (line 77)
FAVORITES_URI_SUFFIX = 'favorites' (line 105)
PLAYLIST_REL = 'http://gdata.youtube.com/schemas/2007#playlist' (line 95)
RELATED_URI_SUFFIX = 'related' (line 108)
RESPONSES_URI_SUFFIX = 'responses' (line 107)
STANDARD_MOST_VIEWED_URI = 'http://gdata.youtube.com/feeds/standardfeeds/most_viewed' (line 80)
STANDARD_MOST_VIEWED_URI_V2 =
'http://gdata.youtube.com/feeds/api/standardfeeds/most_viewed'
(line 86)
STANDARD_RECENTLY_FEATURED_URI = 'http://gdata.youtube.com/feeds/standardfeeds/recently_featured' (line 81)
STANDARD_RECENTLY_FEATURED_URI_V2 =
'http://gdata.youtube.com/feeds/api/standardfeeds/recently_featured'
(line 88)
STANDARD_TOP_RATED_URI = 'http://gdata.youtube.com/feeds/standardfeeds/top_rated' (line 79)
STANDARD_TOP_RATED_URI_V2 =
'http://gdata.youtube.com/feeds/api/standardfeeds/top_rated'
(line 84)
STANDARD_WATCH_ON_MOBILE_URI = 'http://gdata.youtube.com/feeds/standardfeeds/watch_on_mobile' (line 82)
STANDARD_WATCH_ON_MOBILE_URI_V2 =
'http://gdata.youtube.com/feeds/api/standardfeeds/watch_on_mobile'
(line 90)
UPLOADS_URI_SUFFIX = 'uploads' (line 106)
USER_CONTACTS_REL = 'http://gdata.youtube.com/schemas/2007#user.contacts' (line 99)
USER_FAVORITES_REL = 'http://gdata.youtube.com/schemas/2007#user.favorites' (line 100)
USER_PLAYLISTS_REL = 'http://gdata.youtube.com/schemas/2007#user.playlists' (line 97)
USER_SUBSCRIPTIONS_REL = 'http://gdata.youtube.com/schemas/2007#user.subscriptions' (line 98)
USER_UPLOADS_REL = 'http://gdata.youtube.com/schemas/2007#user.uploads' (line 96)
USER_URI = 'http://gdata.youtube.com/feeds/api/users' (line 93)
VIDEO_COMPLAINTS_REL = 'http://gdata.youtube.com/schemas/2007#video.complaints' (line 103)
VIDEO_RATINGS_REL = 'http://gdata.youtube.com/schemas/2007#video.ratings' (line 102)
VIDEO_RESPONSES_REL = 'http://gdata.youtube.com/schemas/2007#video.responses' (line 101)
VIDEO_URI = 'http://gdata.youtube.com/feeds/api/videos' (line 94)

Inherited Constants

Inherited from Zend_Gdata

Zend_Gdata::AUTH_SERVICE_NAME

Inherited from Zend_Gdata_App

Zend_Gdata_App::DEFAULT_MAJOR_PROTOCOL_VERSION
Zend_Gdata_App::DEFAULT_MINOR_PROTOCOL_VERSION

Documentation generated on Mon, 19 Jan 2009 19:04:44 +0300 by phpDocumentor 1.4.2