|  |  | 
__builtin__.object
Credentials
OAuthCredentials
Flow
FlowThreeLegged
Storage
exceptions.Exception(exceptions.BaseException)
Error
CredentialsInvalidError
MissingParameter
RequestError
 
 
| class Credentials(__builtin__.object)
 |  |  | Base class for all Credentials objects. 
 Subclasses must define an authorize() method
 that applies the credentials to an HTTP transport.
 
 |  |  | Methods defined here: 
 authorize(self, http)Take an httplib2.Http instance (or equivalent) andauthorizes it for the set of credentials, usually by
 replacing http.request() with a method that adds in
 the appropriate headers and then delegates to the original
 Http.request() method.
 Data descriptors defined here:
 
 __dict__dictionary for instance variables (if defined)
 __weakref__list of weak references to the object (if defined)
 |  
 
 
 
| class Flow(__builtin__.object)
 |  |  | Base class for all Flow objects. 
 |  |  | Data descriptors defined here: 
 __dict__dictionary for instance variables (if defined)
 __weakref__list of weak references to the object (if defined)
 |  
 
| class FlowThreeLegged(Flow)
 |  |  | Does the Three Legged Dance for OAuth 1.0a. 
 |  |  | Method resolution order:FlowThreeLeggedFlow__builtin__.object
 Methods defined here:
 
 __init__(self, discovery, consumer_key, consumer_secret, user_agent, **kwargs)discovery       - Section of the API discovery document that describesthe OAuth endpoints.
 consumer_key    - OAuth consumer key
 consumer_secret - OAuth consumer secret
 user_agent      - The HTTP User-Agent that identifies the application.
 **kwargs        - The keyword arguments are all optional and required
 parameters for the OAuth calls.
 step1_get_authorize_url(self, oauth_callback='oob')Returns a URI to redirect to the provider.
 oauth_callback - Either the string 'oob' for a non-web-based application,
 or a URI that handles the callback from the authorization
 server.
 
 If oauth_callback is 'oob' then pass in the
 generated verification code to step2_exchange,
 otherwise pass in the query parameters received
 at the callback uri to step2_exchange.
 step2_exchange(self, verifier)Exhanges an authorized request tokenfor OAuthCredentials.
 
 Args:
 verifier: string, dict - either the verifier token, or a dictionary
 of the query parameters to the callback, which contains
 the oauth_verifier.
 Returns:
 The Credentials object.
 Data descriptors inherited from Flow:
 
 __dict__dictionary for instance variables (if defined)
 __weakref__list of weak references to the object (if defined)
 |  
 
 
| class OAuthCredentials(Credentials)
 |  |  | Credentials object for OAuth 1.0a 
 |  |  | Method resolution order:OAuthCredentialsCredentials__builtin__.object
 Methods defined here:
 
 __getstate__(self)Trim the state down to something that can be pickled.
 __init__(self, consumer, token, user_agent)consumer   - An instance of oauth.Consumer.token      - An instance of oauth.Token constructed with
 the access token and secret.
 user_agent - The HTTP User-Agent to provide for this application.
 __setstate__(self, state)Reconstitute the state of the object from being pickled.
 authorize(self, http)Args:http - An instance of httplib2.Http
 or something that acts like it.
 
 Returns:
 A modified instance of http that was passed in.
 
 Example:
 
 h = httplib2.Http()
 h = credentials.authorize(h)
 
 You can't create a new OAuth
 subclass of httplib2.Authenication because
 it never gets passed the absolute URI, which is
 needed for signing. So instead we have to overload
 'request' with a closure that adds in the
 Authorization header and then calls the original version
 of 'request()'.
 set_store(self, store)Set the storage for the credential.
 Args:
 store: callable, a callable that when passed a Credential
 will store the credential back to where it came from.
 This is needed to store the latest access_token if it
 has been revoked.
 Data descriptors defined here:
 
 invalidTrue if the credentials are invalid, such as being revoked.
 Data descriptors inherited from Credentials:
 
 __dict__dictionary for instance variables (if defined)
 __weakref__list of weak references to the object (if defined)
 |  
 
 
| class Storage(__builtin__.object)
 |  |  | Base class for all Storage objects. 
 Store and retrieve a single credential.
 
 |  |  | Methods defined here: 
 get(self)Retrieve credential.
 Returns:
 apiclient.oauth.Credentials
 put(self, credentials)Write a credential.
 Args:
 credentials: Credentials, the credentials to store.
 Data descriptors defined here:
 
 __dict__dictionary for instance variables (if defined)
 __weakref__list of weak references to the object (if defined)
 |  |