gdata.youtube.service
index
/usr/local/svn/gdata-python-client-release/src/gdata/youtube/service.py

YouTubeService extends GDataService to streamline YouTube operations.
 
YouTubeService: Provides methods to perform CRUD operations on YouTube feeds.
Extends GDataService.

 
Modules
       
elementtree.ElementTree
atom
gdata
os
urllib

 
Classes
       
exceptions.Exception
Error
RequestError
YouTubeError
gdata.service.GDataService(atom.service.AtomService)
YouTubeService
gdata.service.Query(__builtin__.dict)
YouTubeVideoQuery
YouTubePlaylistQuery
YouTubeUserQuery

 
class Error(exceptions.Exception)
    Base class for errors within the YouTube service.
 
  Methods inherited from exceptions.Exception:
__getitem__(...)
__init__(...)
__str__(...)

 
class RequestError(Error)
    Error class that is thrown in response to an invalid HTTP Request.
 
 
Method resolution order:
RequestError
Error
exceptions.Exception

Methods inherited from exceptions.Exception:
__getitem__(...)
__init__(...)
__str__(...)

 
class YouTubeError(Error)
    YouTube service specific error class.
 
 
Method resolution order:
YouTubeError
Error
exceptions.Exception

Methods inherited from exceptions.Exception:
__getitem__(...)
__init__(...)
__str__(...)

 
class YouTubePlaylistQuery(YouTubeVideoQuery)
    Subclasses YouTubeVideoQuery to perform playlist-specific queries.
 
Attributes are set dynamically via properties. Properties correspond to
the standard Google Data API query parameters with YouTube Data API
extensions.
 
 
Method resolution order:
YouTubePlaylistQuery
YouTubeVideoQuery
gdata.service.Query
__builtin__.dict
__builtin__.object

Methods defined here:
__init__(self, playlist_id, text_query=None, params=None, categories=None)

Properties inherited from YouTubeVideoQuery:
format
The format query parameter
get = _GetFormat(self)
set = _SetFormat(self, val)
location
The location query parameter
get = _GetLocation(self)
set = _SetLocation(self, val)
lr
The lr (language restriction) query parameter
get = _GetLanguageRestriction(self)
set = _SetLanguageRestriction(self, val)
orderby
The orderby query parameter
get = _GetOrderBy(self)
set = _SetOrderBy(self, val)
racy
The racy query parameter
get = _GetRacy(self)
set = _SetRacy(self, val)
restriction
The restriction query parameter
get = _GetIPRestriction(self)
set = _SetIPRestriction(self, val)
time
The time query parameter
get = _GetTime(self)
set = _SetTime(self, val)
vq
The video query (vq) query parameter
get = _GetVideoQuery(self)
set = _SetVideoQuery(self, val)

Methods inherited from gdata.service.Query:
ToUri(self)
__str__(self)

Properties inherited from gdata.service.Query:
alt
The feed query's alt parameter
get = _GetAlt(self)
set = _SetAlt(self, query)
author
The feed query's author parameter
get = _GetAuthor(self)
set = _SetAuthor(self, query)
max_results
The feed query's max-results parameter
get = _GetMaxResults(self)
set = _SetMaxResults(self, query)
published_max
The feed query's published-max parameter
get = _GetPublishedMax(self)
set = _SetPublishedMax(self, query)
published_min
The feed query's published-min parameter
get = _GetPublishedMin(self)
set = _SetPublishedMin(self, query)
start_index
The feed query's start-index parameter
get = _GetStartIndex(self)
set = _SetStartIndex(self, query)
text_query
The feed query's q parameter
get = _GetTextQuery(self)
set = _SetTextQuery(self, query)
updated_max
The feed query's updated-max parameter
get = _GetUpdatedMax(self)
set = _SetUpdatedMax(self, query)
updated_min
The feed query's updated-min parameter
get = _GetUpdatedMin(self)
set = _SetUpdatedMin(self, query)

Data and other attributes inherited from gdata.service.Query:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'Query' objects>
list of weak references to the object (if defined)

Methods inherited from __builtin__.dict:
__cmp__(...)
x.__cmp__(y) <==> cmp(x,y)
__contains__(...)
D.__contains__(k) -> True if D has a key k, else False
__delitem__(...)
x.__delitem__(y) <==> del x[y]
__eq__(...)
x.__eq__(y) <==> x==y
__ge__(...)
x.__ge__(y) <==> x>=y
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__gt__(...)
x.__gt__(y) <==> x>y
__hash__(...)
x.__hash__() <==> hash(x)
__iter__(...)
x.__iter__() <==> iter(x)
__le__(...)
x.__le__(y) <==> x<=y
__len__(...)
x.__len__() <==> len(x)
__lt__(...)
x.__lt__(y) <==> x<y
__ne__(...)
x.__ne__(y) <==> x!=y
__repr__(...)
x.__repr__() <==> repr(x)
__setitem__(...)
x.__setitem__(i, y) <==> x[i]=y
clear(...)
D.clear() -> None.  Remove all items from D.
copy(...)
D.copy() -> a shallow copy of D
get(...)
D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.
has_key(...)
D.has_key(k) -> True if D has a key k, else False
items(...)
D.items() -> list of D's (key, value) pairs, as 2-tuples
iteritems(...)
D.iteritems() -> an iterator over the (key, value) items of D
iterkeys(...)
D.iterkeys() -> an iterator over the keys of D
itervalues(...)
D.itervalues() -> an iterator over the values of D
keys(...)
D.keys() -> list of D's keys
pop(...)
D.pop(k[,d]) -> v, remove specified key and return the corresponding value
If key is not found, d is returned if given, otherwise KeyError is raised
popitem(...)
D.popitem() -> (k, v), remove and return some (key, value) pair as a
2-tuple; but raise KeyError if D is empty
setdefault(...)
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
update(...)
D.update(E, **F) -> None.  Update D from E and F: for k in E: D[k] = E[k]
(if E has keys else: for (k, v) in E: D[k] = v) then: for k in F: D[k] = F[k]
values(...)
D.values() -> list of D's values

Data and other attributes inherited from __builtin__.dict:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
fromkeys = <built-in method fromkeys of type object>
dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.
v defaults to None.

 
class YouTubeService(gdata.service.GDataService)
    Client for the YouTube service.
 
Performs all documented Google Data YouTube API functions, such as inserting,
updating and deleting videos, comments, playlist, subscriptions etc.
YouTube Service requires authentication for any write, update or delete
actions.
 
Attributes:
  email: An optional string identifying the user. Required only for
      authenticated actions.
  password: An optional string identifying the user's password.
  source: An optional string identifying the name of your application.
  server: An optional address of the YouTube API server. gdata.youtube.com 
      is provided as the default value.
  additional_headers: An optional dictionary containing additional headers
      to be passed along with each request. Use to store developer key.
  client_id: An optional string identifying your application, required for   
      authenticated requests, along with a developer key.
  developer_key: An optional string value. Register your application at
      http://code.google.com/apis/youtube/dashboard to obtain a (free) key.
 
 
Method resolution order:
YouTubeService
gdata.service.GDataService
atom.service.AtomService
__builtin__.object

Methods defined here:
AddComment(self, comment_text, video_entry)
Add a comment to a video entry.
 
Needs authentication. Note that each comment that is posted must contain
    the video entry that it is to be posted to.
 
Args:
  comment_text: A string representing the text of the comment.
  video_entry: The YouTubeVideoEntry to be commented on.
 
Returns:
  True if the comment was added successfully.
AddComplaint(self, complaint_text, complaint_term, video_id)
Add a complaint for a particular video entry.
 
Needs authentication.
 
Args:
  complaint_text: A string representing the complaint text.
  complaint_term: A string representing the complaint category term.
  video_id: A string representing the ID of YouTubeVideoEntry to
      complain about.
 
Returns:
  True if posted successfully.
 
Raises:
  YouTubeError: Your complaint_term is not valid.
AddContact(self, contact_username, my_username='default')
Add a new contact to the currently authenticated user's contact feed.
 
Needs authentication.
 
Args:
  contact_username: A string representing the username of the contact
      that you wish to add.
  my_username: An optional string representing the username to whose
      contact the new contact is to be added.
 
Returns:
    A YouTubeContactEntry if added successfully.
AddPlaylist(self, playlist_title, playlist_description, playlist_private=None)
Add a new playlist to the currently authenticated users account.
 
Needs authentication.
 
Args:
  playlist_title: A string representing the title for the new playlist.
  playlist_description: A string representing the description of the
      playlist.
  playlist_private: An optional boolean, set to True if the playlist is
      to be private.
 
Returns:
  The YouTubePlaylistEntry if successfully posted.
AddPlaylistVideoEntryToPlaylist(self, playlist_uri, video_id, custom_video_title=None, custom_video_description=None)
Add a video entry to a playlist, optionally providing a custom title
and description.
 
Needs authentication.
 
Args:
  playlist_uri: A string representing the URI of the playlist to which this
      video entry is to be added.
  video_id: A string representing the ID of the video entry to add.
  custom_video_title: An optional string representing a custom title for
      the video (only shown on the playlist).
  custom_video_description: An optional string representing a custom
      description for the video (only shown on the playlist).
 
Returns:
  A YouTubePlaylistVideoEntry if successfully posted.
AddRating(self, rating_value, video_entry)
Add a rating to a video entry.
 
Needs authentication.
 
Args:
  rating_value: The integer value for the rating (between 1 and 5).
  video_entry: The YouTubeVideoEntry to be rated.
 
Returns:
  True if the rating was added successfully.
 
Raises:
  YouTubeError: rating_value must be between 1 and 5 in AddRating().
AddSubscriptionToChannel(self, username_to_subscribe_to, my_username='default')
Add a new channel subscription to the currently authenticated users
account.
 
Needs authentication.
 
Args:
  username_to_subscribe_to: A string representing the username of the 
      channel to which we want to subscribe to.
  my_username: An optional string representing the name of the user which
      we want to subscribe. Defaults to currently authenticated user.
 
Returns:
  A new YouTubeSubscriptionEntry if successfully posted.
AddSubscriptionToFavorites(self, username, my_username='default')
Add a new subscription to a users favorites to the currently
authenticated user's account.
 
Needs authentication
 
Args:
  username: A string representing the username of the user's favorite feed
      to subscribe to.
  my_username: An optional string representing the username of the user
      that is to be subscribed. Defaults to currently authenticated user.
 
Returns:
    A new YouTubeSubscriptionEntry if successful.
AddSubscriptionToQuery(self, query, my_username='default')
Add a new subscription to a specific keyword query to the currently
authenticated user's account.
 
Needs authentication
 
Args:
  query: A string representing the keyword query to subscribe to.
  my_username: An optional string representing the username of the user
      that is to be subscribed. Defaults to currently authenticated user.
 
Returns:
    A new YouTubeSubscriptionEntry if successful.
AddVideoEntryToFavorites(self, video_entry, username='default')
Add a video entry to a users favorite feed.
 
Needs authentication.
 
Args:
  video_entry: The YouTubeVideoEntry to add.
  username: An optional string representing the username to whose favorite
      feed you wish to add the entry. Defaults to the currently
      authenticated user.
Returns:
    The posted YouTubeVideoEntry if successfully posted.
AddVideoResponse(self, video_id_to_respond_to, video_response)
Add a video response.
 
Needs authentication.
 
Args:
  video_id_to_respond_to: A string representing the ID of the video to be
      responded to.
  video_response: YouTubeVideoEntry to be posted as a response.
 
Returns:
  True if video response was posted successfully.
CheckUploadStatus(self, video_entry=None, video_id=None)
Check upload status on a recently uploaded video entry.
 
Needs authentication. Either video_entry or video_id must be provided.
 
Args:
  video_entry: An optional YouTubeVideoEntry whose upload status to check
  video_id: An optional string representing the ID of the uploaded video
      whose status is to be checked.
 
Returns:
  A tuple containing (video_upload_state, detailed_message) or None if
      no status information is found.
 
Raises:
  YouTubeError: You must provide at least a video_entry or a video_id to the
      CheckUploadStatus() method.
DeleteContact(self, contact_username, my_username='default')
Delete a contact from a users contact feed.
 
Needs authentication.
 
Args:
  contact_username: A string representing the username of the contact
      that is to be deleted.
  my_username: An optional string representing the username of the user's
      contact feed from which to delete the contact. Defaults to the
      currently authenticated user.
 
Returns:
  True if the contact was deleted successfully
DeletePlaylist(self, playlist_uri)
Delete a playlist from the currently authenticated users playlists.
 
Needs authentication.
 
Args:
  playlist_uri: A string representing the URI of the playlist that is
      to be deleted.
 
Returns:
  True if successfully deleted.
DeletePlaylistVideoEntry(self, playlist_uri, playlist_video_entry_id)
Delete a playlist video entry from a playlist.
 
Needs authentication.
 
Args:
  playlist_uri: A URI representing the playlist from which the playlist
      video entry is to be removed from.
  playlist_video_entry_id: A string representing id of the playlist video
      entry that is to be removed.
 
Returns:
    True if entry was successfully deleted.
DeleteSubscription(self, subscription_uri)
Delete a subscription from the currently authenticated user's account.
 
Needs authentication.
 
Args:
  subscription_uri: A string representing the URI of the subscription that
      is to be deleted.
 
Returns:
  True if deleted successfully.
DeleteVideoEntry(self, video_entry)
Deletes a video entry.
 
Needs authentication.
 
Args:
  video_entry: The YouTubeVideoEntry to be deleted.
 
Returns:
  True if entry was deleted successfully.
DeleteVideoEntryFromFavorites(self, video_id, username='default')
Delete a video entry from the users favorite feed.
 
Needs authentication.
 
Args:
  video_id: A string representing the ID of the video that is to be removed
  username: An optional string representing the username of the user's
      favorite feed. Defaults to the currently authenticated user.
 
Returns:
    True if entry was successfully deleted.
DeleteVideoResponse(self, video_id, response_video_id)
Delete a video response.
 
Needs authentication.
 
Args:
  video_id: A string representing the ID of video that contains the
      response.
  response_video_id: A string representing the ID of the video that was
      posted as a response.
 
Returns:
  True if video response was deleted succcessfully.
GetFormUploadToken(self, video_entry, uri='http://gdata.youtube.com/action/GetUploadToken')
Receives a YouTube Token and a YouTube PostUrl from a YouTubeVideoEntry.
 
Needs authentication.
 
Args:
  video_entry: The YouTubeVideoEntry to upload (meta-data only).
  uri: An optional string representing the URI from where to fetch the
      token information. Defaults to the YOUTUBE_UPLOADTOKEN_URI.
 
Returns:
  A tuple containing the URL to which to post your video file, along
      with the youtube token that must be included with your upload in the
      form of: (post_url, youtube_token).
GetMostDiscussedVideoFeed(self)
Retrieve the 'most_discussed' standard video feed.
 
Returns:
  A YouTubeVideoFeed if successfully retrieved.
GetMostLinkedVideoFeed(self)
Retrieve the 'most_linked' standard video feed.
 
Returns:
  A YouTubeVideoFeed if successfully retrieved.
GetMostRecentVideoFeed(self)
Retrieve the 'most_recent' standard video feed.
 
Returns:
  A YouTubeVideoFeed if successfully retrieved.
GetMostRespondedVideoFeed(self)
Retrieve the 'most_responded' standard video feed.
 
Returns:
  A YouTubeVideoFeed if successfully retrieved.
GetMostViewedVideoFeed(self)
Retrieve the 'most_viewed' standard video feed.
 
Returns:
  A YouTubeVideoFeed if successfully retrieved.
GetRecentlyFeaturedVideoFeed(self)
Retrieve the 'recently_featured' standard video feed.
 
Returns:
  A YouTubeVideoFeed if successfully retrieved.
GetTopFavoritesVideoFeed(self)
Retrieve the 'top_favorites' standard video feed.
 
Returns:
  A YouTubeVideoFeed if successfully retrieved.
GetTopRatedVideoFeed(self)
Retrieve the 'top_rated' standard video feed.
 
Returns:
  A YouTubeVideoFeed if successfully retrieved.
GetUserFavoritesFeed(self, username='default')
Retrieve the favorites feed for a given user.
 
Args:
  username: An optional string representing the username whose favorites
      feed is to be retrieved. Defaults to the currently authenticated user.
 
Returns:
  A YouTubeVideoFeed if successfully retrieved.
GetWatchOnMobileVideoFeed(self)
Retrieve the 'watch_on_mobile' standard video feed.
 
Returns:
  A YouTubeVideoFeed if successfully retrieved.
GetYouTubeContactEntry(self, uri)
Retrieve a YouTubeContactEntry.
 
Args:
  uri: A string representing the URI of the contact entry that is to
      be retrieved.
 
Returns:
  A YouTubeContactEntry if successfully retrieved.
GetYouTubeContactFeed(self, uri=None, username='default')
Retrieve a YouTubeContactFeed.
 
Either a uri or a username must be provided.
 
Args:
  uri: An optional string representing the URI of the contact feed that
      is to be retrieved.
  username: An optional string representing the username. Defaults to the
      currently authenticated user.
 
Returns:
  A YouTubeContactFeed if successfully retrieved.
 
Raises:
  YouTubeError: You must provide at least a uri or a username to the
      GetYouTubeContactFeed() method.
GetYouTubePlaylistEntry(self, uri)
Retrieve a YouTubePlaylistEntry.
 
Args:
  uri: A string representing the URI of the playlist feed that is to
      be retrieved.
 
Returns:
  A YouTubePlaylistEntry if successfully retrieved.
GetYouTubePlaylistFeed(self, uri=None, username='default')
Retrieve a YouTubePlaylistFeed (a feed of playlists for a user).
 
Either a uri or a username must be provided.
 
Args:
  uri: An optional string representing the URI of the playlist feed that
      is to be retrieved.
  username: An optional string representing the username. Defaults to the
      currently authenticated user.
 
Returns:
  A YouTubePlaylistFeed if successfully retrieved.
 
Raises:
  YouTubeError: You must provide at least a uri or a username to the
      GetYouTubePlaylistFeed() method.
GetYouTubePlaylistVideoFeed(self, uri=None, playlist_id=None)
Retrieve a YouTubePlaylistVideoFeed (a feed of videos on a playlist).
 
Either a uri or a playlist_id must be provided.
 
Args:
  uri: An optional string representing the URI of the playlist video feed
      that is to be retrieved.
  playlist_id: An optional string representing the Id of the playlist whose
      playlist video feed is to be retrieved.
 
Returns:
  A YouTubePlaylistVideoFeed if successfully retrieved.
 
Raises:
  YouTubeError: You must provide at least a uri or a playlist_id to the
      GetYouTubePlaylistVideoFeed() method.
GetYouTubeRelatedVideoFeed(self, uri=None, video_id=None)
Retrieve a YouTubeRelatedVideoFeed.
 
Either a uri for the feed or a video_id is required.
 
Args:
  uri: An optional string representing the URI of the feed that is to
      be retrieved.
  video_id: An optional string representing the ID of the video for which
      to retrieve the related video feed.
 
Returns:
  A YouTubeRelatedVideoFeed if successfully retrieved.
 
Raises:
  YouTubeError: You must provide at least a uri or a video_id to the
      GetYouTubeRelatedVideoFeed() method.
GetYouTubeSubscriptionEntry(self, uri)
Retrieve a YouTubeSubscriptionEntry.
 
Args:
  uri: A string representing the URI of the entry that is to be retrieved.
 
Returns:
  A YouTubeVideoSubscriptionEntry if successfully retrieved.
GetYouTubeSubscriptionFeed(self, uri=None, username='default')
Retrieve a YouTubeSubscriptionFeed.
 
Either the uri of the feed or a username must be provided.
 
Args:
  uri: An optional string representing the URI of the feed that is to
      be retrieved.
  username: An optional string representing the username whose subscription
      feed is to be retrieved. Defaults to the currently authenticted user.
 
Returns:
  A YouTubeVideoSubscriptionFeed if successfully retrieved.
GetYouTubeUserEntry(self, uri=None, username=None)
Retrieve a YouTubeUserEntry.
 
Either a uri or a username must be provided.
 
Args:
  uri: An optional string representing the URI of the user entry that is
      to be retrieved.
  username: An optional string representing the username.
 
Returns:
  A YouTubeUserEntry if successfully retrieved.
 
Raises:
  YouTubeError: You must provide at least a uri or a username to the
      GetYouTubeUserEntry() method.
GetYouTubeUserFeed(self, uri=None, username=None)
Retrieve a YouTubeUserFeed.
 
Either a uri or a username must be provided.
 
Args:
  uri: An optional string representing the URI of the user feed that is
      to be retrieved.
  username: An optional string representing the username.
 
Returns:
  A YouTubeUserFeed if successfully retrieved.
 
Raises:
  YouTubeError: You must provide at least a uri or a username to the
      GetYouTubeUserFeed() method.
GetYouTubeVideoCommentEntry(self, uri)
Retrieve a YouTubeVideoCommentEntry.
 
Args:
  uri: A string representing the URI of the comment entry that is to
      be retrieved.
 
Returns:
  A YouTubeCommentEntry if successfully retrieved.
GetYouTubeVideoCommentFeed(self, uri=None, video_id=None)
Retrieve a YouTubeVideoCommentFeed.
 
Either a uri or a video_id must be provided.
 
Args:
  uri: An optional string representing the URI of the comment feed that
      is to be retrieved.
  video_id: An optional string representing the ID of the video for which
      to retrieve the comment feed.
 
Returns:
  A YouTubeVideoCommentFeed if successfully retrieved.
 
Raises:
  YouTubeError: You must provide at least a uri or a video_id to the
      GetYouTubeVideoCommentFeed() method.
GetYouTubeVideoEntry(self, uri=None, video_id=None)
Retrieve a YouTubeVideoEntry.
 
Either a uri or a video_id must be provided.
 
Args:
  uri: An optional string representing the URI of the entry that is to 
      be retrieved.
  video_id: An optional string representing the ID of the video.
 
Returns:
  A YouTubeVideoFeed if successfully retrieved.
 
Raises:
  YouTubeError: You must provide at least a uri or a video_id to the
      GetYouTubeVideoEntry() method.
GetYouTubeVideoFeed(self, uri)
Retrieve a YouTubeVideoFeed.
 
Args:
  uri: A string representing the URI of the feed that is to be retrieved.
 
Returns:
  A YouTubeVideoFeed if successfully retrieved.
GetYouTubeVideoResponseEntry(self, uri)
Retrieve a YouTubeVideoResponseEntry.
 
Args:
  uri: A string representing the URI of the video response entry that
      is to be retrieved.
 
Returns:
  A YouTubeVideoResponseEntry if successfully retrieved.
GetYouTubeVideoResponseFeed(self, uri=None, video_id=None)
Retrieve a YouTubeVideoResponseFeed.
 
Either a uri or a playlist_id must be provided.
 
Args:
  uri: An optional string representing the URI of the video response feed
      that is to be retrieved.
  video_id: An optional string representing the ID of the video whose
      response feed is to be retrieved.
 
Returns:
  A YouTubeVideoResponseFeed if successfully retrieved.
 
Raises:
  YouTubeError: You must provide at least a uri or a video_id to the
      GetYouTubeVideoResponseFeed() method.
InsertVideoEntry(self, video_entry, filename_or_handle, youtube_username='default', content_type='video/quicktime')
Upload a new video to YouTube using the direct upload mechanism.
 
Needs authentication.
 
Args:
  video_entry: The YouTubeVideoEntry to upload.
  filename_or_handle: A file-like object or file name where the video
      will be read from.
  youtube_username: An optional string representing the username into whose
      account this video is to be uploaded to. Defaults to the currently
      authenticated user.
  content_type: An optional string representing internet media type
      (a.k.a. mime type) of the media object. Currently the YouTube API
      supports these types:
        o video/mpeg
        o video/quicktime
        o video/x-msvideo
        o video/mp4
        o video/x-flv
 
Returns:
  The newly created YouTubeVideoEntry if successful.
 
Raises:
  AssertionError: video_entry must be a gdata.youtube.VideoEntry instance.
  YouTubeError: An error occurred trying to read the video file provided.
  gdata.service.RequestError: An error occurred trying to upload the video
      to the API server.
Query(self, uri)
Performs a query and returns a resulting feed or entry.
 
Args:
  uri: A string representing the URI of the feed that is to be queried.
 
Returns:
  On success, a tuple in the form:
  (boolean succeeded=True, ElementTree._Element result)
  On failure, a tuple in the form:
  (boolean succeeded=False, {'status': HTTP status code from server,
                             'reason': HTTP reason from the server,
                             'body': HTTP body of the server's response})
UpdateContact(self, contact_username, new_contact_status, new_contact_category, my_username='default')
Update a contact, providing a new status and a new category.
 
Needs authentication.
 
Args:
  contact_username: A string representing the username of the contact
      that is to be updated.
  new_contact_status: A string representing the new status of the contact.
      This can either be set to 'accepted' or 'rejected'.
  new_contact_category: A string representing the new category for the
      contact, either 'Friends' or 'Family'.
  my_username: An optional string representing the username of the user
      whose contact feed we are modifying. Defaults to the currently
      authenticated user.
 
Returns:
  A YouTubeContactEntry if updated succesfully.
 
Raises:
  YouTubeError: New contact status must be within the accepted values. Or
      new contact category must be within the accepted categories.
UpdatePlaylist(self, playlist_id, new_playlist_title, new_playlist_description, playlist_private=None, username='default')
Update a playlist with new meta-data.
 
 Needs authentication.
 
 Args:
   playlist_id: A string representing the ID of the playlist to be updated.
   new_playlist_title: A string representing a new title for the playlist.
   new_playlist_description: A string representing a new description for the
       playlist.
   playlist_private: An optional boolean, set to True if the playlist is
       to be private.
   username: An optional string representing the username whose playlist is
       to be updated. Defaults to the currently authenticated user.
 
Returns:
   A YouTubePlaylistEntry if the update was successful.
UpdatePlaylistVideoEntryMetaData(self, playlist_uri, playlist_entry_id, new_video_title, new_video_description, new_video_position)
Update the meta data for a YouTubePlaylistVideoEntry.
 
Needs authentication.
 
Args:
  playlist_uri: A string representing the URI of the playlist that contains
      the entry to be updated.
  playlist_entry_id: A string representing the ID of the entry to be
      updated.
  new_video_title: A string representing the new title for the video entry.
  new_video_description: A string representing the new description for
      the video entry.
  new_video_position: An integer representing the new position on the
      playlist for the video.
 
Returns:
  A YouTubePlaylistVideoEntry if the update was successful.
UpdateVideoEntry(self, video_entry)
Updates a video entry's meta-data.
 
Needs authentication.
 
Args:
  video_entry: The YouTubeVideoEntry to update, containing updated
      meta-data.
 
Returns:
  An updated YouTubeVideoEntry on success or None.
YouTubeQuery(self, query)
Performs a YouTube specific query and returns a resulting feed or entry.
 
Args:
  query: A Query object or one if its sub-classes (YouTubeVideoQuery,
      YouTubeUserQuery or YouTubePlaylistQuery).
 
Returns:
  Depending on the type of Query object submitted returns either a
      YouTubeVideoFeed, a YouTubeUserFeed, a YouTubePlaylistFeed. If the
      Query object provided was not YouTube-related, a tuple is returned.
      On success the tuple will be in this form:
      (boolean succeeded=True, ElementTree._Element result)
      On failure, the tuple will be in this form:
      (boolean succeeded=False, {'status': HTTP status code from server,
                                 'reason': HTTP reason from the server,
                                 'body': HTTP body of the server response})
__init__(self, email=None, password=None, source=None, server='gdata.youtube.com', additional_headers=None, client_id=None, developer_key=None)

Properties defined here:
client_id
The ClientId property
get = _GetClientId(self)
Getter for Client Id property.
 
Returns:
  If the client_id has been set, a string representing it is returned
      or None.
set = _SetClientId(self, client_id)
Setter for Client Id property.
 
Sets the 'X-Gdata-Client' header.
developer_key
The Developer Key property
get = _GetDeveloperKey(self)
Getter for Developer Key property.
 
Returns:
  If the developer key has been set, a string representing the developer key
      is returned or None.
set = _SetDeveloperKey(self, developer_key)
Setter for Developer Key property.
 
Sets the developer key in the 'X-GData-Key' header. The actual value that
    is set is 'key=' plus the developer_key that was passed.

Methods inherited from gdata.service.GDataService:
ClientLogin(self, username, password, account_type=None, service=None, auth_service_url=None, source=None, captcha_token=None, captcha_response=None)
Convenience method for authenticating using ProgrammaticLogin. 
 
Sets values for email, password, and other optional members.
 
Args:
  username:
  password:
  account_type: string (optional)
  service: string (optional)
  auth_service_url: string (optional)
  captcha_token: string (optional)
  captcha_response: string (optional)
Delete(self, uri, extra_headers=None, url_params=None, escape_params=True, redirects_remaining=4)
Deletes the entry at the given URI.
 
Args:
  uri: string The URI of the entry to be deleted. Example: 
       '/base/feeds/items/ITEM-ID'
  extra_headers: dict (optional) HTTP headers which are to be included.
                 The client automatically sets the Content-Type and
                 Authorization headers.
  url_params: dict (optional) Additional URL parameters to be included
              in the URI. These are translated into query arguments
              in the form '&dict_key=value&...'.
              Example: {'max-results': '250'} becomes &max-results=250
  escape_params: boolean (optional) If false, the calling code has already
                 ensured that the query will form a valid URL (all
                 reserved characters have been escaped). If true, this
                 method will escape the query and any URL parameters
                 provided.
 
Returns:
  True if the entry was deleted.
GenerateAuthSubURL(self, next, scope, secure=False, session=True, domain='default')
Generate a URL at which the user will login and be redirected back.
 
Users enter their credentials on a Google login page and a token is sent
to the URL specified in next. See documentation for AuthSub login at:
http://code.google.com/apis/accounts/AuthForWebApps.html
 
Args:
  next: string The URL user will be sent to after logging in.
  scope: string or list of strings. The URLs of the services to be 
         accessed.
  secure: boolean (optional) Determines whether or not the issued token
          is a secure token.
  session: boolean (optional) Determines whether or not the issued token
           can be upgraded to a session token.
Get(self, uri, extra_headers=None, redirects_remaining=4, encoding='UTF-8', converter=None)
Query the GData API with the given URI
 
The uri is the portion of the URI after the server value 
(ex: www.google.com).
 
To perform a query against Google Base, set the server to 
'base.google.com' and set the uri to '/base/feeds/...', where ... is 
your query. For example, to find snippets for all digital cameras uri 
should be set to: '/base/feeds/snippets?bq=digital+camera'
 
Args:
  uri: string The query in the form of a URI. Example:
       '/base/feeds/snippets?bq=digital+camera'.
  extra_headers: dictionary (optional) Extra HTTP headers to be included
                 in the GET request. These headers are in addition to 
                 those stored in the client's additional_headers property.
                 The client automatically sets the Content-Type and 
                 Authorization headers.
  redirects_remaining: int (optional) Tracks the number of additional
      redirects this method will allow. If the service object receives
      a redirect and remaining is 0, it will not follow the redirect. 
      This was added to avoid infinite redirect loops.
  encoding: string (optional) The character encoding for the server's
      response. Default is UTF-8
  converter: func (optional) A function which will transform
      the server's results before it is returned. Example: use 
      GDataFeedFromString to parse the server response as if it
      were a GDataFeed.
 
Returns:
  If there is no ResultsTransformer specified in the call, a GDataFeed 
  or GDataEntry depending on which is sent from the server. If the 
  response is niether a feed or entry and there is no ResultsTransformer,
  return a string. If there is a ResultsTransformer, the returned value 
  will be that of the ResultsTransformer function.
GetAuthSubToken(self)
Returns the AuthSub Token after removing the AuthSub Authorization
Label.
 
The AuthSub Authorization Label reads: "AuthSub token"
 
Returns:
  If the AuthSub Token is set AND it begins with the AuthSub 
  Authorization Label, the AuthSub Token is returned minus the AuthSub
  Label. If the AuthSub Token does not start with the AuthSub
  Authorization Label or it is not set, None is returned.
GetClientLoginToken(self)
Returns the token string for the current request scope.
 
The current scope is determined by the service name string member.
The token string is the end of the Authorization header, it doesn not
include the ClientLogin label.
GetEntry(self, uri, extra_headers=None)
Query the GData API with the given URI and receive an Entry.
 
See also documentation for gdata.service.Get
 
Args:
  uri: string The query in the form of a URI. Example:
       '/base/feeds/snippets?bq=digital+camera'.
  extra_headers: dictionary (optional) Extra HTTP headers to be included
                 in the GET request. These headers are in addition to
                 those stored in the client's additional_headers property.
                 The client automatically sets the Content-Type and
                 Authorization headers.
 
Returns:
  A GDataEntry built from the XML in the server's response.
GetFeed(self, uri, extra_headers=None, converter=<function GDataFeedFromString>)
Query the GData API with the given URI and receive a Feed.
 
See also documentation for gdata.service.Get
 
Args:
  uri: string The query in the form of a URI. Example:
       '/base/feeds/snippets?bq=digital+camera'.
  extra_headers: dictionary (optional) Extra HTTP headers to be included
                 in the GET request. These headers are in addition to
                 those stored in the client's additional_headers property.
                 The client automatically sets the Content-Type and
                 Authorization headers.
 
Returns:
  A GDataFeed built from the XML in the server's response.
GetMedia(self, uri, extra_headers=None)
Returns a MediaSource containing media and its metadata from the given
URI string.
GetNext(self, feed)
Requests the next 'page' of results in the feed.
 
This method uses the feed's next link to request an additional feed
and uses the class of the feed to convert the results of the GET request.
 
Args:
  feed: atom.Feed or a subclass. The feed should contain a next link and
      the type of the feed will be applied to the results from the 
      server. The new feed which is returned will be of the same class
      as this feed which was passed in.
 
Returns:
  A new feed representing the next set of results in the server's feed.
  The type of this feed will match that of the feed argument.
Post(self, data, uri, extra_headers=None, url_params=None, escape_params=True, redirects_remaining=4, media_source=None, converter=None)
Insert or update  data into a GData service at the given URI.
 
Args:
  data: string, ElementTree._Element, atom.Entry, or gdata.GDataEntry The
        XML to be sent to the uri.
  uri: string The location (feed) to which the data should be inserted.
       Example: '/base/feeds/items'.
  extra_headers: dict (optional) HTTP headers which are to be included.
                 The client automatically sets the Content-Type,
                 Authorization, and Content-Length headers.
  url_params: dict (optional) Additional URL parameters to be included
              in the URI. These are translated into query arguments
              in the form '&dict_key=value&...'.
              Example: {'max-results': '250'} becomes &max-results=250
  escape_params: boolean (optional) If false, the calling code has already
                 ensured that the query will form a valid URL (all
                 reserved characters have been escaped). If true, this
                 method will escape the query and any URL parameters
                 provided.
  media_source: MediaSource (optional) Container for the media to be sent
      along with the entry, if provided.
  converter: func (optional) A function which will be executed on the
      server's response. Often this is a function like
      GDataEntryFromString which will parse the body of the server's
      response and return a GDataEntry.
 
Returns:
  If the post succeeded, this method will return a GDataFeed, GDataEntry,
  or the results of running converter on the server's result body (if
  converter was specified).
PostOrPut(self, verb, data, uri, extra_headers=None, url_params=None, escape_params=True, redirects_remaining=4, media_source=None, converter=None)
Insert data into a GData service at the given URI.
 
Args:
  verb: string, either 'POST' or 'PUT'
  data: string, ElementTree._Element, atom.Entry, or gdata.GDataEntry The
        XML to be sent to the uri. 
  uri: string The location (feed) to which the data should be inserted. 
       Example: '/base/feeds/items'. 
  extra_headers: dict (optional) HTTP headers which are to be included. 
                 The client automatically sets the Content-Type,
                 Authorization, and Content-Length headers.
  url_params: dict (optional) Additional URL parameters to be included
              in the URI. These are translated into query arguments
              in the form '&dict_key=value&...'.
              Example: {'max-results': '250'} becomes &max-results=250
  escape_params: boolean (optional) If false, the calling code has already
                 ensured that the query will form a valid URL (all
                 reserved characters have been escaped). If true, this
                 method will escape the query and any URL parameters
                 provided.
  media_source: MediaSource (optional) Container for the media to be sent
      along with the entry, if provided.
  converter: func (optional) A function which will be executed on the 
      server's response. Often this is a function like 
      GDataEntryFromString which will parse the body of the server's 
      response and return a GDataEntry.
 
Returns:
  If the post succeeded, this method will return a GDataFeed, GDataEntry,
  or the results of running converter on the server's result body (if
  converter was specified).
ProgrammaticLogin(self, captcha_token=None, captcha_response=None)
Authenticates the user and sets the GData Auth token.
 
Login retreives a temporary auth token which must be used with all
requests to GData services. The auth token is stored in the GData client
object.
 
Login is also used to respond to a captcha challenge. If the user's login
attempt failed with a CaptchaRequired error, the user can respond by
calling Login with the captcha token and the answer to the challenge.
 
Args:
  captcha_token: string (optional) The identifier for the captcha challenge
                 which was presented to the user.
  captcha_response: string (optional) The user's answer to the captch 
                    challenge.
 
Raises:
  CaptchaRequired if the login service will require a captcha response
  BadAuthentication if the login service rejected the username or password
  Error if the login service responded with a 403 different from the above
Put(self, data, uri, extra_headers=None, url_params=None, escape_params=True, redirects_remaining=3, media_source=None, converter=None)
Updates an entry at the given URI.
 
Args:
  data: string, ElementTree._Element, or xml_wrapper.ElementWrapper The 
        XML containing the updated data.
  uri: string A URI indicating entry to which the update will be applied.
       Example: '/base/feeds/items/ITEM-ID'
  extra_headers: dict (optional) HTTP headers which are to be included.
                 The client automatically sets the Content-Type,
                 Authorization, and Content-Length headers.
  url_params: dict (optional) Additional URL parameters to be included
              in the URI. These are translated into query arguments
              in the form '&dict_key=value&...'.
              Example: {'max-results': '250'} becomes &max-results=250
  escape_params: boolean (optional) If false, the calling code has already
                 ensured that the query will form a valid URL (all
                 reserved characters have been escaped). If true, this
                 method will escape the query and any URL parameters
                 provided.
  converter: func (optional) A function which will be executed on the 
      server's response. Often this is a function like 
      GDataEntryFromString which will parse the body of the server's 
      response and return a GDataEntry.
 
Returns:
  If the put succeeded, this method will return a GDataFeed, GDataEntry,
  or the results of running converter on the server's result body (if
  converter was specified).
RevokeAuthSubToken(self)
Revokes an existing AuthSub token.
 
Raises:
  NonAuthSubToken if the user's auth token is not an AuthSub token
SetAuthSubToken(self, token, scopes=None)
Sets the token sent in requests to an AuthSub token.
 
Only use this method if you have received a token from the AuthSub
service. The authi token is set automatically when UpgradeToSessionToken()
is used. See documentation for Google AuthSub here:
http://code.google.com/apis/accounts/AuthForWebApps.html 
 
Args:
 token: gdata.auth.AuthSubToken or string The token returned by the
        AuthSub service. If the token is an AuthSubToken, the scope
        information stored in the AuthSubToken is used. If the token
        is a string, the scopes parameter is used to determine the
        valid scopes.
 scopes: list of URLs for which the token is valid. This is only used
         if the token parameter is a string.
SetClientLoginToken(self, token, scopes=None)
Sets the token sent in requests to an ClientLogin token.
 
Only use this method if you have received a token from the ClientLogin
service. The auth_token is set automatically when ProgrammaticLogin()
is used. See documentation for Google ClientLogin here:
http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html
 
Args:
  token: string The token returned by the ClientLogin service.
UpgradeToSessionToken(self, token=None)
Upgrades a single use AuthSub token to a session token.
 
Args:
  token: A gdata.auth.AuthSubToken (optional) which is good for a single
         use but can be upgraded to a session token. If no token is 
         passed in, the AuthSubToken is found by looking in the 
         token_store by looking for a token for the current scope.
 
Raises:
  NonAuthSubToken if the user's auth token is not an AuthSub token
  TokenUpgradeFailed if the server responded to the request with an 
  error.
upgrade_to_session_token(self, token)
Upgrades a single use AuthSub token to a session token.
 
Args:
  token: A gdata.auth.AuthSubToken (optional) which is good for a single
         use but can be upgraded to a session token.
 
Returns:
  The upgraded token as a gdata.auth.AuthSubToken object.
 
Raises:
  TokenUpgradeFailed if the server responded to the request with an 
  error.

Properties inherited from gdata.service.GDataService:
captcha_token
Get the captcha token for a login request.
get = __GetCaptchaToken(self)
captcha_url
Get the captcha URL for a login request.
get = __GetCaptchaURL(self)
source
The source is the name of the application making the request. 
It should be in the form company_id-app_name-app_version
get = __GetSource(self)
# Private methods to create the source property.
set = __SetSource(self, new_source)

Data and other attributes inherited from gdata.service.GDataService:
auth_token = None
handler = None
tokens = None

Methods inherited from atom.service.AtomService:
UseBasicAuth(self, username, password, for_proxy=False)
Sets an Authenticaiton: Basic HTTP header containing plaintext.
 
Deprecated, use use_basic_auth instead.
 
The username and password are base64 encoded and added to an HTTP header
which will be included in each request. Note that your username and 
password are sent in plaintext.
 
Args:
  username: str
  password: str
request(self, operation, url, data=None, headers=None, url_params=None)
use_basic_auth(self, username, password, scopes=None)

Properties inherited from atom.service.AtomService:
debug
If True, HTTP debug information is printed.
get = _get_debug(self)
set = _set_debug(self, value)

Data and other attributes inherited from atom.service.AtomService:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'AtomService' objects>
list of weak references to the object (if defined)
override_token = None
port = 80
ssl = False

 
class YouTubeUserQuery(YouTubeVideoQuery)
    Subclasses YouTubeVideoQuery to perform user-specific queries.
 
Attributes are set dynamically via properties. Properties correspond to
the standard Google Data API query parameters with YouTube Data API
extensions.
 
 
Method resolution order:
YouTubeUserQuery
YouTubeVideoQuery
gdata.service.Query
__builtin__.dict
__builtin__.object

Methods defined here:
__init__(self, username=None, feed_type=None, subscription_id=None, text_query=None, params=None, categories=None)

Properties inherited from YouTubeVideoQuery:
format
The format query parameter
get = _GetFormat(self)
set = _SetFormat(self, val)
location
The location query parameter
get = _GetLocation(self)
set = _SetLocation(self, val)
lr
The lr (language restriction) query parameter
get = _GetLanguageRestriction(self)
set = _SetLanguageRestriction(self, val)
orderby
The orderby query parameter
get = _GetOrderBy(self)
set = _SetOrderBy(self, val)
racy
The racy query parameter
get = _GetRacy(self)
set = _SetRacy(self, val)
restriction
The restriction query parameter
get = _GetIPRestriction(self)
set = _SetIPRestriction(self, val)
time
The time query parameter
get = _GetTime(self)
set = _SetTime(self, val)
vq
The video query (vq) query parameter
get = _GetVideoQuery(self)
set = _SetVideoQuery(self, val)

Methods inherited from gdata.service.Query:
ToUri(self)
__str__(self)

Properties inherited from gdata.service.Query:
alt
The feed query's alt parameter
get = _GetAlt(self)
set = _SetAlt(self, query)
author
The feed query's author parameter
get = _GetAuthor(self)
set = _SetAuthor(self, query)
max_results
The feed query's max-results parameter
get = _GetMaxResults(self)
set = _SetMaxResults(self, query)
published_max
The feed query's published-max parameter
get = _GetPublishedMax(self)
set = _SetPublishedMax(self, query)
published_min
The feed query's published-min parameter
get = _GetPublishedMin(self)
set = _SetPublishedMin(self, query)
start_index
The feed query's start-index parameter
get = _GetStartIndex(self)
set = _SetStartIndex(self, query)
text_query
The feed query's q parameter
get = _GetTextQuery(self)
set = _SetTextQuery(self, query)
updated_max
The feed query's updated-max parameter
get = _GetUpdatedMax(self)
set = _SetUpdatedMax(self, query)
updated_min
The feed query's updated-min parameter
get = _GetUpdatedMin(self)
set = _SetUpdatedMin(self, query)

Data and other attributes inherited from gdata.service.Query:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'Query' objects>
list of weak references to the object (if defined)

Methods inherited from __builtin__.dict:
__cmp__(...)
x.__cmp__(y) <==> cmp(x,y)
__contains__(...)
D.__contains__(k) -> True if D has a key k, else False
__delitem__(...)
x.__delitem__(y) <==> del x[y]
__eq__(...)
x.__eq__(y) <==> x==y
__ge__(...)
x.__ge__(y) <==> x>=y
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__gt__(...)
x.__gt__(y) <==> x>y
__hash__(...)
x.__hash__() <==> hash(x)
__iter__(...)
x.__iter__() <==> iter(x)
__le__(...)
x.__le__(y) <==> x<=y
__len__(...)
x.__len__() <==> len(x)
__lt__(...)
x.__lt__(y) <==> x<y
__ne__(...)
x.__ne__(y) <==> x!=y
__repr__(...)
x.__repr__() <==> repr(x)
__setitem__(...)
x.__setitem__(i, y) <==> x[i]=y
clear(...)
D.clear() -> None.  Remove all items from D.
copy(...)
D.copy() -> a shallow copy of D
get(...)
D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.
has_key(...)
D.has_key(k) -> True if D has a key k, else False
items(...)
D.items() -> list of D's (key, value) pairs, as 2-tuples
iteritems(...)
D.iteritems() -> an iterator over the (key, value) items of D
iterkeys(...)
D.iterkeys() -> an iterator over the keys of D
itervalues(...)
D.itervalues() -> an iterator over the values of D
keys(...)
D.keys() -> list of D's keys
pop(...)
D.pop(k[,d]) -> v, remove specified key and return the corresponding value
If key is not found, d is returned if given, otherwise KeyError is raised
popitem(...)
D.popitem() -> (k, v), remove and return some (key, value) pair as a
2-tuple; but raise KeyError if D is empty
setdefault(...)
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
update(...)
D.update(E, **F) -> None.  Update D from E and F: for k in E: D[k] = E[k]
(if E has keys else: for (k, v) in E: D[k] = v) then: for k in F: D[k] = F[k]
values(...)
D.values() -> list of D's values

Data and other attributes inherited from __builtin__.dict:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
fromkeys = <built-in method fromkeys of type object>
dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.
v defaults to None.

 
class YouTubeVideoQuery(gdata.service.Query)
    Subclasses gdata.service.Query to represent a YouTube Data API query.
 
Attributes are set dynamically via properties. Properties correspond to
the standard Google Data API query parameters with YouTube Data API
extensions. Please refer to the API documentation for details.
 
Attributes:
  vq: The vq parameter, which is only supported for video feeds, specifies a
      search query term. Refer to API documentation for further details.
  orderby: The orderby parameter, which is only supported for video feeds,
      specifies the value that will be used to sort videos in the search
      result set. Valid values for this parameter are relevance, published,
      viewCount and rating.
  time: The time parameter, which is only available for the top_rated,
      top_favorites, most_viewed, most_discussed, most_linked and
      most_responded standard feeds, restricts the search to videos uploaded
      within the specified time. Valid values for this parameter are today
      (1 day), this_week (7 days), this_month (1 month) and all_time.
      The default value for this parameter is all_time.
  format: The format parameter specifies that videos must be available in a
      particular video format. Refer to the API documentation for details.
  racy: The racy parameter allows a search result set to include restricted
      content as well as standard content. Valid values for this parameter
      are include and exclude. By default, restricted content is excluded.
  lr: The lr parameter restricts the search to videos that have a title,
      description or keywords in a specific language. Valid values for the lr
      parameter are ISO 639-1 two-letter language codes.
  restriction: The restriction parameter identifies the IP address that
      should be used to filter videos that can only be played in specific
      countries.
  location: A string of geo coordinates. Note that this is not used when the
      search is performed but rather to filter the returned videos for ones
      that match to the location entered.
 
 
Method resolution order:
YouTubeVideoQuery
gdata.service.Query
__builtin__.dict
__builtin__.object

Methods defined here:
__init__(self, video_id=None, feed_type=None, text_query=None, params=None, categories=None)

Properties defined here:
format
The format query parameter
get = _GetFormat(self)
set = _SetFormat(self, val)
location
The location query parameter
get = _GetLocation(self)
set = _SetLocation(self, val)
lr
The lr (language restriction) query parameter
get = _GetLanguageRestriction(self)
set = _SetLanguageRestriction(self, val)
orderby
The orderby query parameter
get = _GetOrderBy(self)
set = _SetOrderBy(self, val)
racy
The racy query parameter
get = _GetRacy(self)
set = _SetRacy(self, val)
restriction
The restriction query parameter
get = _GetIPRestriction(self)
set = _SetIPRestriction(self, val)
time
The time query parameter
get = _GetTime(self)
set = _SetTime(self, val)
vq
The video query (vq) query parameter
get = _GetVideoQuery(self)
set = _SetVideoQuery(self, val)

Methods inherited from gdata.service.Query:
ToUri(self)
__str__(self)

Properties inherited from gdata.service.Query:
alt
The feed query's alt parameter
get = _GetAlt(self)
set = _SetAlt(self, query)
author
The feed query's author parameter
get = _GetAuthor(self)
set = _SetAuthor(self, query)
max_results
The feed query's max-results parameter
get = _GetMaxResults(self)
set = _SetMaxResults(self, query)
published_max
The feed query's published-max parameter
get = _GetPublishedMax(self)
set = _SetPublishedMax(self, query)
published_min
The feed query's published-min parameter
get = _GetPublishedMin(self)
set = _SetPublishedMin(self, query)
start_index
The feed query's start-index parameter
get = _GetStartIndex(self)
set = _SetStartIndex(self, query)
text_query
The feed query's q parameter
get = _GetTextQuery(self)
set = _SetTextQuery(self, query)
updated_max
The feed query's updated-max parameter
get = _GetUpdatedMax(self)
set = _SetUpdatedMax(self, query)
updated_min
The feed query's updated-min parameter
get = _GetUpdatedMin(self)
set = _SetUpdatedMin(self, query)

Data and other attributes inherited from gdata.service.Query:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'Query' objects>
list of weak references to the object (if defined)

Methods inherited from __builtin__.dict:
__cmp__(...)
x.__cmp__(y) <==> cmp(x,y)
__contains__(...)
D.__contains__(k) -> True if D has a key k, else False
__delitem__(...)
x.__delitem__(y) <==> del x[y]
__eq__(...)
x.__eq__(y) <==> x==y
__ge__(...)
x.__ge__(y) <==> x>=y
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__gt__(...)
x.__gt__(y) <==> x>y
__hash__(...)
x.__hash__() <==> hash(x)
__iter__(...)
x.__iter__() <==> iter(x)
__le__(...)
x.__le__(y) <==> x<=y
__len__(...)
x.__len__() <==> len(x)
__lt__(...)
x.__lt__(y) <==> x<y
__ne__(...)
x.__ne__(y) <==> x!=y
__repr__(...)
x.__repr__() <==> repr(x)
__setitem__(...)
x.__setitem__(i, y) <==> x[i]=y
clear(...)
D.clear() -> None.  Remove all items from D.
copy(...)
D.copy() -> a shallow copy of D
get(...)
D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.
has_key(...)
D.has_key(k) -> True if D has a key k, else False
items(...)
D.items() -> list of D's (key, value) pairs, as 2-tuples
iteritems(...)
D.iteritems() -> an iterator over the (key, value) items of D
iterkeys(...)
D.iterkeys() -> an iterator over the keys of D
itervalues(...)
D.itervalues() -> an iterator over the values of D
keys(...)
D.keys() -> list of D's keys
pop(...)
D.pop(k[,d]) -> v, remove specified key and return the corresponding value
If key is not found, d is returned if given, otherwise KeyError is raised
popitem(...)
D.popitem() -> (k, v), remove and return some (key, value) pair as a
2-tuple; but raise KeyError if D is empty
setdefault(...)
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
update(...)
D.update(E, **F) -> None.  Update D from E and F: for k in E: D[k] = E[k]
(if E has keys else: for (k, v) in E: D[k] = v) then: for k in F: D[k] = F[k]
values(...)
D.values() -> list of D's values

Data and other attributes inherited from __builtin__.dict:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
fromkeys = <built-in method fromkeys of type object>
dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.
v defaults to None.

 
Data
        UNKOWN_ERROR = 1000
YOUTUBE_BAD_REQUEST = 400
YOUTUBE_CLIENTLOGIN_AUTHENTICATION_URL = 'https://www.google.com/youtube/accounts/ClientLogin'
YOUTUBE_COMPLAINT_CATEGORY_SCHEME = 'http://gdata.youtube.com/schemas/complaint-reasons.cat'
YOUTUBE_COMPLAINT_CATEGORY_TERMS = ('PORN', 'VIOLENCE', 'HATE', 'DANGEROUS', 'RIGHTS', 'SPAM')
YOUTUBE_CONFLICT = 409
YOUTUBE_CONTACT_CATEGORY = ('Friends', 'Family')
YOUTUBE_CONTACT_STATUS = ('accepted', 'rejected')
YOUTUBE_INTERNAL_SERVER_ERROR = 500
YOUTUBE_INVALID_ARGUMENT = 601
YOUTUBE_INVALID_CONTENT_TYPE = 602
YOUTUBE_INVALID_KIND = 604
YOUTUBE_NOT_A_VIDEO = 603
YOUTUBE_PLAYLIST_FEED_URI = 'http://gdata.youtube.com/feeds/api/playlists'
YOUTUBE_QUERY_VALID_FORMAT_PARAMETERS = ('1', '5', '6')
YOUTUBE_QUERY_VALID_ORDERBY_PARAMETERS = ('published', 'viewCount', 'rating', 'relevance')
YOUTUBE_QUERY_VALID_RACY_PARAMETERS = ('include', 'exclude')
YOUTUBE_QUERY_VALID_TIME_PARAMETERS = ('today', 'this_week', 'this_month', 'all_time')
YOUTUBE_RATING_LINK_REL = 'http://gdata.youtube.com/schemas#video.ratings'
YOUTUBE_SCHEMA = 'http://gdata.youtube.com/schemas'
YOUTUBE_SERVER = 'gdata.youtube.com'
YOUTUBE_SERVICE = 'youtube'
YOUTUBE_STANDARDFEEDS = ('most_recent', 'recently_featured', 'top_rated', 'most_viewed', 'watch_on_mobile')
YOUTUBE_STANDARD_FEEDS = 'http://gdata.youtube.com/feeds/api/standardfeeds'
YOUTUBE_STANDARD_MOST_DISCUSSED_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/most_discussed'
YOUTUBE_STANDARD_MOST_LINKED_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/most_linked'
YOUTUBE_STANDARD_MOST_RECENT_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/most_recent'
YOUTUBE_STANDARD_MOST_RESPONDED_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/most_responded'
YOUTUBE_STANDARD_MOST_VIEWED_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/most_viewed'
YOUTUBE_STANDARD_RECENTLY_FEATURED_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/recently_featured'
YOUTUBE_STANDARD_TOP_FAVORITES_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/top_favorites'
YOUTUBE_STANDARD_TOP_RATED_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/top_rated'
YOUTUBE_STANDARD_WATCH_ON_MOBILE_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/watch_on_mobile'
YOUTUBE_SUBSCRIPTION_CATEGORY_SCHEME = 'http://gdata.youtube.com/schemas/subscriptiontypes.cat'
YOUTUBE_SUPPORTED_UPLOAD_TYPES = ('mov', 'avi', 'wmv', 'mpg', 'quicktime', 'flv')
YOUTUBE_UPLOAD_TOKEN_URI = 'http://gdata.youtube.com/action/GetUploadToken'
YOUTUBE_UPLOAD_URI = 'http://uploads.gdata.youtube.com/feeds/api/users'
YOUTUBE_USER_FEED_URI = 'http://gdata.youtube.com/feeds/api/users'
YOUTUBE_VIDEO_URI = 'http://gdata.youtube.com/feeds/api/videos'
__author__ = 'api.stephaniel@gmail.com (Stephanie Liu), api.jhartmann@gmail.com (Jochen Hartmann)'

 
Author
        api.stephaniel@gmail.com (Stephanie Liu), api.jhartmann@gmail.com (Jochen Hartmann)