class documentation

A class for interacting with a resource.

Method __enter__ Undocumented
Method __exit__ Undocumented
Method __getstate__ Trim the state down to something that can be pickled.
Method __init__ Build a Resource from the API description.
Method __setstate__ Reconstitute the state of the object from being pickled.
Method close Close httplib2 connections.
Method _add_basic_methods Undocumented
Method _add_nested_resources Undocumented
Method _add_next_methods Undocumented
Method _set_dynamic_attr Sets an instance attribute and tracks it in a list of dynamic attributes.
Method _set_service_methods Undocumented
Method _validate_credentials Validates client's and credentials' universe domains are consistent.
Instance Variable _baseUrl Undocumented
Instance Variable _credentials_validated Undocumented
Instance Variable _developerKey Undocumented
Instance Variable _dynamic_attrs Undocumented
Instance Variable _http Undocumented
Instance Variable _model Undocumented
Instance Variable _requestBuilder Undocumented
Instance Variable _resourceDesc Undocumented
Instance Variable _rootDesc Undocumented
Instance Variable _schema Undocumented
Instance Variable _universe_domain Undocumented
def __enter__(self):

Undocumented

def __exit__(self, exc_type, exc, exc_tb):

Undocumented

def __getstate__(self):

Trim the state down to something that can be pickled.

Uses the fact that the instance variable _dynamic_attrs holds attrs that will be wiped and restored on pickle serialization.

def __init__(self, http, baseUrl, model, requestBuilder, developerKey, resourceDesc, rootDesc, schema, universe_domain=universe.DEFAULT_UNIVERSE if HAS_UNIVERSE else ''):

Build a Resource from the API description.

Parameters
httphttplib2.Http, Object to make http requests with.
baseUrlstring, base URL for the API. All requests are relative to this URI.
modelgoogleapiclient.Model, converts to and from the wire format.
requestBuilderclass or callable that instantiates an googleapiclient.HttpRequest object.
developerKeystring, key obtained from https://code.google.com/apis/console
resourceDescobject, section of deserialized discovery document that describes a resource. Note that the top level discovery document is considered a resource.
rootDescobject, the entire deserialized discovery document.
schemaobject, mapping of schema names to schema descriptions.
universe_domainstring, the universe for the API. The default universe
is "googleapis.com".
def __setstate__(self, state):

Reconstitute the state of the object from being pickled.

Uses the fact that the instance variable _dynamic_attrs holds attrs that will be wiped and restored on pickle serialization.

def close(self):

Close httplib2 connections.

def _add_basic_methods(self, resourceDesc, rootDesc, schema):

Undocumented

def _add_nested_resources(self, resourceDesc, rootDesc, schema):

Undocumented

def _add_next_methods(self, resourceDesc, schema):

Undocumented

def _set_dynamic_attr(self, attr_name, value):

Sets an instance attribute and tracks it in a list of dynamic attributes.

Parameters
attr_namestring; The name of the attribute to be set
valueThe value being set on the object and tracked in the dynamic cache.
def _set_service_methods(self):

Undocumented

def _validate_credentials(self):

Validates client's and credentials' universe domains are consistent.

Returns
boolTrue iff the configured universe domain is valid.
Raises
UniverseMismatchErrorIf the configured universe domain is not valid.
_baseUrl =

Undocumented

_credentials_validated =

Undocumented

_developerKey =

Undocumented

_dynamic_attrs: list =

Undocumented

_http =

Undocumented

_model =

Undocumented

_requestBuilder =

Undocumented

_resourceDesc =

Undocumented

_rootDesc =

Undocumented

_schema =

Undocumented

_universe_domain =

Undocumented