| |
- Method resolution order:
- BloggerClient
- gdata.client.GDClient
- atom.client.AtomPubClient
- __builtin__.object
Methods defined here:
- AddComment = add_comment(self, blog_id, post_id, title, body, auth_token=None, title_type='text', body_type='html', **kwargs)
- AddPost = add_post(self, blog_id, title, body, labels=None, draft=False, auth_token=None, title_type='text', body_type='html', **kwargs)
- Delete = delete(self, entry_or_uri, auth_token=None, **kwargs)
- GetBlogArchive = get_blog_archive(self, blog_id, auth_token=None, **kwargs)
- GetBlogComments = get_blog_comments(self, blog_id, auth_token=None, desired_class=<class 'gdata.blogger.data.CommentFeed'>, query=None, **kwargs)
- GetBlogs = get_blogs(self, user_id='default', auth_token=None, desired_class=<class 'gdata.blogger.data.BlogFeed'>, **kwargs)
- GetPostComments = get_post_comments(self, blog_id, post_id, auth_token=None, desired_class=<class 'gdata.blogger.data.CommentFeed'>, query=None, **kwargs)
- GetPosts = get_posts(self, blog_id, auth_token=None, desired_class=<class 'gdata.blogger.data.BlogPostFeed'>, query=None, **kwargs)
- Update = update(self, entry, auth_token=None, **kwargs)
- add_comment(self, blog_id, post_id, title, body, auth_token=None, title_type='text', body_type='html', **kwargs)
- add_post(self, blog_id, title, body, labels=None, draft=False, auth_token=None, title_type='text', body_type='html', **kwargs)
- delete(self, entry_or_uri, auth_token=None, **kwargs)
- get_blog_archive(self, blog_id, auth_token=None, **kwargs)
- get_blog_comments(self, blog_id, auth_token=None, desired_class=<class 'gdata.blogger.data.CommentFeed'>, query=None, **kwargs)
- get_blogs(self, user_id='default', auth_token=None, desired_class=<class 'gdata.blogger.data.BlogFeed'>, **kwargs)
- get_post_comments(self, blog_id, post_id, auth_token=None, desired_class=<class 'gdata.blogger.data.CommentFeed'>, query=None, **kwargs)
- get_posts(self, blog_id, auth_token=None, desired_class=<class 'gdata.blogger.data.BlogPostFeed'>, query=None, **kwargs)
- update(self, entry, auth_token=None, **kwargs)
Data and other attributes defined here:
- api_version = '2'
- auth_scopes = ['http://www.blogger.com/feeds/']
- auth_serice = 'blogger'
Methods inherited from gdata.client.GDClient:
- ClientLogin = client_login(self, email, password, source, service=None, account_type='HOSTED_OR_GOOGLE', auth_url='https://www.google.com/accounts/ClientLogin', captcha_token=None, captcha_response=None)
- GetEntry = get_entry(self, uri, auth_token=None, converter=None, desired_class=<class 'gdata.data.GDEntry'>, **kwargs)
- GetFeed = get_feed(self, uri, auth_token=None, converter=None, desired_class=<class 'gdata.data.GDFeed'>, **kwargs)
- GetNext = get_next(self, feed, auth_token=None, converter=None, desired_class=None, **kwargs)
- Fetches the next set of results from the feed.
When requesting a feed, the number of entries returned is capped at a
service specific default limit (often 25 entries). You can specify your
own entry-count cap using the max-results URL query parameter. If there
are more results than could fit under max-results, the feed will contain
a next link. This method performs a GET against this next results URL.
Returns:
A new feed object containing the next set of entries in this feed.
- ModifyRequest = modify_request(self, http_request)
- Adds or changes request before making the HTTP request.
This client will add the API version if it is specified.
Subclasses may override this method to add their own request
modifications before the request is made.
- Post = post(self, entry, uri, auth_token=None, converter=None, desired_class=None, **kwargs)
- Request = request(self, method=None, uri=None, auth_token=None, http_request=None, converter=None, desired_class=None, redirects_remaining=4, **kwargs)
- Make an HTTP request to the server.
See also documentation for atom.client.AtomPubClient.request.
If a 302 redirect is sent from the server to the client, this client
assumes that the redirect is in the form used by the Google Calendar API.
The same request URI and method will be used as in the original request,
but a gsessionid URL parameter will be added to the request URI with
the value provided in the server's 302 redirect response. If the 302
redirect is not in the format specified by the Google Calendar API, a
RedirectError will be raised containing the body of the server's
response.
The method calls the client's modify_request method to make any changes
required by the client before the request is made. For example, a
version 2 client could add a GData-Version: 2 header to the request in
its modify_request method.
Args:
method: str The HTTP verb for this request, usually 'GET', 'POST',
'PUT', or 'DELETE'
uri: atom.http_core.Uri, str, or unicode The URL being requested.
auth_token: An object which sets the Authorization HTTP header in its
modify_request method. Recommended classes include
gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
among others.
http_request: (optional) atom.http_core.HttpRequest
converter: function which takes the body of the response as it's only
argument and returns the desired object.
desired_class: class descended from atom.core.XmlElement to which a
successful response should be converted. If there is no
converter function specified (converter=None) then the
desired_class will be used in calling the
atom.core.parse function. If neither
the desired_class nor the converter is specified, an
HTTP reponse object will be returned.
redirects_remaining: (optional) int, if this number is 0 and the
server sends a 302 redirect, the request method
will raise an exception. This parameter is used in
recursive request calls to avoid an infinite loop.
Any additional arguments are passed through to
atom.client.AtomPubClient.request.
Returns:
An HTTP response object (see atom.http_core.HttpResponse for a
description of the object's interface) if no converter was
specified and no desired_class was specified. If a converter function
was provided, the results of calling the converter are returned. If no
converter was specified but a desired_class was provided, the response
body will be converted to the class using
atom.core.parse.
- RequestClientLoginToken = request_client_login_token(self, email, password, source, service=None, account_type='HOSTED_OR_GOOGLE', auth_url=<atom.http_core.Uri object at 0xd104d0>, captcha_token=None, captcha_response=None)
- UpgradeToken = upgrade_token(self, token=None, url=<atom.http_core.Uri object at 0xd10510>)
- Asks the Google auth server for a multi-use AuthSub token.
For details on AuthSub, see:
http://code.google.com/apis/accounts/docs/AuthSub.html
Args:
token: gdata.gauth.AuthSubToken (optional) If no token is passed in,
the client's auth_token member is used to request the new token.
The token object will be modified to contain the new session
token string.
url: str or atom.http_core.Uri (optional) The URL to which the token
upgrade request should be sent. Defaults to:
https://www.google.com/accounts/AuthSubSessionToken
Returns:
The upgraded gdata.gauth.AuthSubToken object.
- client_login(self, email, password, source, service=None, account_type='HOSTED_OR_GOOGLE', auth_url='https://www.google.com/accounts/ClientLogin', captcha_token=None, captcha_response=None)
- get_entry(self, uri, auth_token=None, converter=None, desired_class=<class 'gdata.data.GDEntry'>, **kwargs)
- get_feed(self, uri, auth_token=None, converter=None, desired_class=<class 'gdata.data.GDFeed'>, **kwargs)
- get_next(self, feed, auth_token=None, converter=None, desired_class=None, **kwargs)
- Fetches the next set of results from the feed.
When requesting a feed, the number of entries returned is capped at a
service specific default limit (often 25 entries). You can specify your
own entry-count cap using the max-results URL query parameter. If there
are more results than could fit under max-results, the feed will contain
a next link. This method performs a GET against this next results URL.
Returns:
A new feed object containing the next set of entries in this feed.
- modify_request(self, http_request)
- Adds or changes request before making the HTTP request.
This client will add the API version if it is specified.
Subclasses may override this method to add their own request
modifications before the request is made.
- post(self, entry, uri, auth_token=None, converter=None, desired_class=None, **kwargs)
- request(self, method=None, uri=None, auth_token=None, http_request=None, converter=None, desired_class=None, redirects_remaining=4, **kwargs)
- Make an HTTP request to the server.
See also documentation for atom.client.AtomPubClient.request.
If a 302 redirect is sent from the server to the client, this client
assumes that the redirect is in the form used by the Google Calendar API.
The same request URI and method will be used as in the original request,
but a gsessionid URL parameter will be added to the request URI with
the value provided in the server's 302 redirect response. If the 302
redirect is not in the format specified by the Google Calendar API, a
RedirectError will be raised containing the body of the server's
response.
The method calls the client's modify_request method to make any changes
required by the client before the request is made. For example, a
version 2 client could add a GData-Version: 2 header to the request in
its modify_request method.
Args:
method: str The HTTP verb for this request, usually 'GET', 'POST',
'PUT', or 'DELETE'
uri: atom.http_core.Uri, str, or unicode The URL being requested.
auth_token: An object which sets the Authorization HTTP header in its
modify_request method. Recommended classes include
gdata.gauth.ClientLoginToken and gdata.gauth.AuthSubToken
among others.
http_request: (optional) atom.http_core.HttpRequest
converter: function which takes the body of the response as it's only
argument and returns the desired object.
desired_class: class descended from atom.core.XmlElement to which a
successful response should be converted. If there is no
converter function specified (converter=None) then the
desired_class will be used in calling the
atom.core.parse function. If neither
the desired_class nor the converter is specified, an
HTTP reponse object will be returned.
redirects_remaining: (optional) int, if this number is 0 and the
server sends a 302 redirect, the request method
will raise an exception. This parameter is used in
recursive request calls to avoid an infinite loop.
Any additional arguments are passed through to
atom.client.AtomPubClient.request.
Returns:
An HTTP response object (see atom.http_core.HttpResponse for a
description of the object's interface) if no converter was
specified and no desired_class was specified. If a converter function
was provided, the results of calling the converter are returned. If no
converter was specified but a desired_class was provided, the response
body will be converted to the class using
atom.core.parse.
- request_client_login_token(self, email, password, source, service=None, account_type='HOSTED_OR_GOOGLE', auth_url=<atom.http_core.Uri object at 0xd104d0>, captcha_token=None, captcha_response=None)
- upgrade_token(self, token=None, url=<atom.http_core.Uri object at 0xd10510>)
- Asks the Google auth server for a multi-use AuthSub token.
For details on AuthSub, see:
http://code.google.com/apis/accounts/docs/AuthSub.html
Args:
token: gdata.gauth.AuthSubToken (optional) If no token is passed in,
the client's auth_token member is used to request the new token.
The token object will be modified to contain the new session
token string.
url: str or atom.http_core.Uri (optional) The URL to which the token
upgrade request should be sent. Defaults to:
https://www.google.com/accounts/AuthSubSessionToken
Returns:
The upgraded gdata.gauth.AuthSubToken object.
Data and other attributes inherited from gdata.client.GDClient:
- auth_service = None
Methods inherited from atom.client.AtomPubClient:
- Get = get(self, uri=None, auth_token=None, http_request=None, **kwargs)
- Put = put(self, uri=None, data=None, auth_token=None, http_request=None, **kwargs)
- __init__(self, http_client=None, host=None, auth_token=None, **kwargs)
- Creates a new AtomPubClient instance.
Args:
http_client: An object capable of performing HTTP requests through a
request method. This object is used to perform the request
when the AtomPubClient's request method is called. Used to
allow HTTP requests to be directed to a mock server, or use
an alternate library instead of the default of httplib to
make HTTP requests.
host: str The default host name to use if a host is not specified in the
requested URI.
auth_token: An object which sets the HTTP Authorization header when its
modify_request method is called.
- get(self, uri=None, auth_token=None, http_request=None, **kwargs)
- put(self, uri=None, data=None, auth_token=None, http_request=None, **kwargs)
Data descriptors inherited from atom.client.AtomPubClient:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from atom.client.AtomPubClient:
- auth_token = None
- host = None
|