diff --git a/docs/apiclient.contrib.html b/docs/apiclient.contrib.html new file mode 100644 index 0000000..513802a --- /dev/null +++ b/docs/apiclient.contrib.html @@ -0,0 +1,21 @@ + + +Python: package apiclient.contrib + + + + +
 
+ 
apiclient.contrib
index
/usr/local/google/home/jcgregorio/projects/apiary/apiclient/contrib/__init__.py
+

+

+ + + + + +
 
+Package Contents
       
+ \ No newline at end of file diff --git a/docs/apiclient.discovery.html b/docs/apiclient.discovery.html new file mode 100644 index 0000000..7936c9f --- /dev/null +++ b/docs/apiclient.discovery.html @@ -0,0 +1,59 @@ + + +Python: module apiclient.discovery + + + + +
 
+ 
apiclient.discovery
index
/usr/local/google/home/jcgregorio/projects/apiary/apiclient/discovery.py
+

Client for discovery based APIs

+A client library for Google's discovery
+based APIs.

+

+ + + + + +
 
+Modules
       
httplib2
+logging
+
os
+re
+
simplejson
+uritemplate
+
urllib
+urlparse
+

+ + + + + +
 
+Functions
       
build(serviceName, version, http=None, discoveryServiceUrl='https://www.googleapis.com/discovery/v0.2beta1/describe/{api}/{apiVersion}', developerKey=None, model=<apiclient.model.JsonModel object>, requestBuilder=<class 'apiclient.http.HttpRequest'>)
+
createResource(http, baseUrl, model, requestBuilder, resourceName, developerKey, resourceDesc, futureDesc)
+
key2param(key)
max-results -> max_results
+

+ + + + + +
 
+Data
       DISCOVERY_URI = 'https://www.googleapis.com/discovery/v0.2beta1/describe/{api}/{apiVersion}'
+URITEMPLATE = <_sre.SRE_Pattern object>
+VARNAME = <_sre.SRE_Pattern object>
+__author__ = 'jcgregorio@google.com (Joe Gregorio)'

+ + + + + +
 
+Author
       jcgregorio@google.com (Joe Gregorio)
+ \ No newline at end of file diff --git a/docs/apiclient.errors.html b/docs/apiclient.errors.html new file mode 100644 index 0000000..af69a51 --- /dev/null +++ b/docs/apiclient.errors.html @@ -0,0 +1,234 @@ + + +Python: module apiclient.errors + + + + +
 
+ 
apiclient.errors
index
/usr/local/google/home/jcgregorio/projects/apiary/apiclient/errors.py
+

Errors for the library.

+All exceptions defined by the library
+should be defined in this file.

+

+ + + + + +
 
+Classes
       
+
exceptions.Exception(exceptions.BaseException) +
+
+
Error +
+
+
HttpError +
UnknownLinkType +
+
+
+
+
+

+ + + + + + + +
 
+class Error(exceptions.Exception)
   Base error for this module.
 
 
Method resolution order:
+
Error
+
exceptions.Exception
+
exceptions.BaseException
+
__builtin__.object
+
+
+Data descriptors defined here:
+
__weakref__
+
list of weak references to the object (if defined)
+
+
+Methods inherited from exceptions.Exception:
+
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
+ +
+Data and other attributes inherited from exceptions.Exception:
+
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
+ +
+Methods inherited from exceptions.BaseException:
+
__delattr__(...)
x.__delattr__('name') <==> del x.name
+ +
__getattribute__(...)
x.__getattribute__('name') <==> x.name
+ +
__getitem__(...)
x.__getitem__(y) <==> x[y]
+ +
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]

+Use of negative indices is not supported.
+ +
__reduce__(...)
+ +
__repr__(...)
x.__repr__() <==> repr(x)
+ +
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
+ +
__setstate__(...)
+ +
__str__(...)
x.__str__() <==> str(x)
+ +
__unicode__(...)
+ +
+Data descriptors inherited from exceptions.BaseException:
+
__dict__
+
+
args
+
+
message
+
+

+ + + + + + + +
 
+class HttpError(Error)
   HTTP data was invalid or unexpected.
 
 
Method resolution order:
+
HttpError
+
Error
+
exceptions.Exception
+
exceptions.BaseException
+
__builtin__.object
+
+
+Methods defined here:
+
__init__(self, resp, detail)
+ +
__str__(self)
+ +
+Data descriptors inherited from Error:
+
__weakref__
+
list of weak references to the object (if defined)
+
+
+Data and other attributes inherited from exceptions.Exception:
+
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
+ +
+Methods inherited from exceptions.BaseException:
+
__delattr__(...)
x.__delattr__('name') <==> del x.name
+ +
__getattribute__(...)
x.__getattribute__('name') <==> x.name
+ +
__getitem__(...)
x.__getitem__(y) <==> x[y]
+ +
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]

+Use of negative indices is not supported.
+ +
__reduce__(...)
+ +
__repr__(...)
x.__repr__() <==> repr(x)
+ +
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
+ +
__setstate__(...)
+ +
__unicode__(...)
+ +
+Data descriptors inherited from exceptions.BaseException:
+
__dict__
+
+
args
+
+
message
+
+

+ + + + + + + +
 
+class UnknownLinkType(Error)
   Link type unknown or unexpected.
 
 
Method resolution order:
+
UnknownLinkType
+
Error
+
exceptions.Exception
+
exceptions.BaseException
+
__builtin__.object
+
+
+Data descriptors inherited from Error:
+
__weakref__
+
list of weak references to the object (if defined)
+
+
+Methods inherited from exceptions.Exception:
+
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
+ +
+Data and other attributes inherited from exceptions.Exception:
+
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
+ +
+Methods inherited from exceptions.BaseException:
+
__delattr__(...)
x.__delattr__('name') <==> del x.name
+ +
__getattribute__(...)
x.__getattribute__('name') <==> x.name
+ +
__getitem__(...)
x.__getitem__(y) <==> x[y]
+ +
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]

+Use of negative indices is not supported.
+ +
__reduce__(...)
+ +
__repr__(...)
x.__repr__() <==> repr(x)
+ +
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
+ +
__setstate__(...)
+ +
__str__(...)
x.__str__() <==> str(x)
+ +
__unicode__(...)
+ +
+Data descriptors inherited from exceptions.BaseException:
+
__dict__
+
+
args
+
+
message
+
+

+ + + + + +
 
+Data
       __author__ = 'jcgregorio@google.com (Joe Gregorio)'

+ + + + + +
 
+Author
       jcgregorio@google.com (Joe Gregorio)
+ \ No newline at end of file diff --git a/docs/apiclient.ext.appengine.html b/docs/apiclient.ext.appengine.html new file mode 100644 index 0000000..90cd6ca --- /dev/null +++ b/docs/apiclient.ext.appengine.html @@ -0,0 +1,224 @@ + + +Python: module apiclient.ext.appengine + + + + +
 
+ 
apiclient.ext.appengine
index
/usr/local/google/home/jcgregorio/projects/apiary/apiclient/ext/appengine.py
+

Utilities for Google App Engine

+Utilities for making it easier to use the
+Google API Client for Python on Google App Engine.

+

+ + + + + +
 
+Modules
       
google.appengine.ext.db
+
pickle
+

+ + + + + +
 
+Classes
       
+
google.appengine.ext.db.Property(__builtin__.object) +
+
+
FlowThreeLeggedProperty +
OAuthCredentialsProperty +
+
+
+

+ + + + + + + +
 
+class FlowThreeLeggedProperty(google.appengine.ext.db.Property)
   Utility property that allows easy
+storage and retreival of an
+apiclient.oauth.FlowThreeLegged
 
 
Method resolution order:
+
FlowThreeLeggedProperty
+
google.appengine.ext.db.Property
+
__builtin__.object
+
+
+Methods defined here:
+
empty(self, value)
+ +
get_value_for_datastore(self, model_instance)
# For writing to datastore.
+ +
make_value_from_datastore(self, value)
# For reading from datastore.
+ +
validate(self, value)
+ +
+Data and other attributes defined here:
+
data_type = <class 'apiclient.oauth.FlowThreeLegged'>
Does the Three Legged Dance for OAuth 1.0a.
+ +
+Methods inherited from google.appengine.ext.db.Property:
+
__get__(self, model_instance, model_class)
Returns the value for this property on the given model instance.

+See http://docs.python.org/ref/descriptors.html for a description of
+the arguments to this class and what they mean.
+ +
__init__(self, verbose_name=None, name=None, default=None, required=False, validator=None, choices=None, indexed=True)
Initializes this Property with the given options.

+Args:
+  verbose_name: User friendly name of property.
+  name: Storage name for property.  By default, uses attribute name
+    as it is assigned in the Model sub-class.
+  default: Default value for property if none is assigned.
+  required: Whether property is required.
+  validator: User provided method used for validation.
+  choices: User provided set of valid property values.
+  indexed: Whether property is indexed.
+ +
__property_config__(self, model_class, property_name)
Configure property, connecting it to its model.

+Configure the property so that it knows its property name and what class
+it belongs to.

+Args:
+  model_class: Model class which Property will belong to.
+  property_name: Name of property within Model instance to store property
+    values in.  By default this will be the property name preceded by
+    an underscore, but may change for different subclasses.
+ +
__set__(self, model_instance, value)
Sets the value for this property on the given model instance.

+See http://docs.python.org/ref/descriptors.html for a description of
+the arguments to this class and what they mean.
+ +
datastore_type(self)
Deprecated backwards-compatible accessor method for self.data_type.
+ +
default_value(self)
Default value for unassigned values.

+Returns:
+  Default value as provided by __init__(default).
+ +
+Data descriptors inherited from google.appengine.ext.db.Property:
+
__dict__
+
dictionary for instance variables (if defined)
+
+
__weakref__
+
list of weak references to the object (if defined)
+
+
+Data and other attributes inherited from google.appengine.ext.db.Property:
+
creation_counter = 0
+ +

+ + + + + + + +
 
+class OAuthCredentialsProperty(google.appengine.ext.db.Property)
   Utility property that allows easy
+storage and retrieval of
+apiclient.oath.OAuthCredentials
 
 
Method resolution order:
+
OAuthCredentialsProperty
+
google.appengine.ext.db.Property
+
__builtin__.object
+
+
+Methods defined here:
+
empty(self, value)
+ +
get_value_for_datastore(self, model_instance)
# For writing to datastore.
+ +
make_value_from_datastore(self, value)
# For reading from datastore.
+ +
validate(self, value)
+ +
+Data and other attributes defined here:
+
data_type = <class 'apiclient.oauth.OAuthCredentials'>
Credentials object for OAuth 1.0a
+ +
+Methods inherited from google.appengine.ext.db.Property:
+
__get__(self, model_instance, model_class)
Returns the value for this property on the given model instance.

+See http://docs.python.org/ref/descriptors.html for a description of
+the arguments to this class and what they mean.
+ +
__init__(self, verbose_name=None, name=None, default=None, required=False, validator=None, choices=None, indexed=True)
Initializes this Property with the given options.

+Args:
+  verbose_name: User friendly name of property.
+  name: Storage name for property.  By default, uses attribute name
+    as it is assigned in the Model sub-class.
+  default: Default value for property if none is assigned.
+  required: Whether property is required.
+  validator: User provided method used for validation.
+  choices: User provided set of valid property values.
+  indexed: Whether property is indexed.
+ +
__property_config__(self, model_class, property_name)
Configure property, connecting it to its model.

+Configure the property so that it knows its property name and what class
+it belongs to.

+Args:
+  model_class: Model class which Property will belong to.
+  property_name: Name of property within Model instance to store property
+    values in.  By default this will be the property name preceded by
+    an underscore, but may change for different subclasses.
+ +
__set__(self, model_instance, value)
Sets the value for this property on the given model instance.

+See http://docs.python.org/ref/descriptors.html for a description of
+the arguments to this class and what they mean.
+ +
datastore_type(self)
Deprecated backwards-compatible accessor method for self.data_type.
+ +
default_value(self)
Default value for unassigned values.

+Returns:
+  Default value as provided by __init__(default).
+ +
+Data descriptors inherited from google.appengine.ext.db.Property:
+
__dict__
+
dictionary for instance variables (if defined)
+
+
__weakref__
+
list of weak references to the object (if defined)
+
+
+Data and other attributes inherited from google.appengine.ext.db.Property:
+
creation_counter = 0
+ +

+ + + + + +
 
+Data
       __author__ = 'jcgregorio@google.com (Joe Gregorio)'

+ + + + + +
 
+Author
       jcgregorio@google.com (Joe Gregorio)
+ \ No newline at end of file diff --git a/docs/apiclient.ext.django_orm.html b/docs/apiclient.ext.django_orm.html new file mode 100644 index 0000000..7832fcf --- /dev/null +++ b/docs/apiclient.ext.django_orm.html @@ -0,0 +1,234 @@ + + +Python: module apiclient.ext.django_orm + + + + +
 
+ 
apiclient.ext.django_orm
index
/usr/local/google/home/jcgregorio/projects/apiary/apiclient/ext/django_orm.py
+

+

+ + + + + +
 
+Modules
       
django.db.models
+

+ + + + + +
 
+Classes
       
+
django.db.models.fields.Field(__builtin__.object) +
+
+
FlowThreeLeggedField +
OAuthCredentialsField +
+
+
+

+ + + + + +
 
+class FlowThreeLeggedField(django.db.models.fields.Field)
    
Method resolution order:
+
FlowThreeLeggedField
+
django.db.models.fields.Field
+
__builtin__.object
+
+
+Methods defined here:
+
contribute_to_class(self, cls, name)
+ +
db_type(self)
+ +
get_db_prep_value(self, value)
+ +
to_python(self, value)
+ +
+Data and other attributes defined here:
+
__metaclass__ = <class 'django.db.models.fields.subclassing.SubfieldBase'>
A metaclass for custom Field subclasses. This ensures the model's attribute
+has the descriptor protocol attached to it.
+ +
+Methods inherited from django.db.models.fields.Field:
+
__cmp__(self, other)
+ +
__deepcopy__(self, memodict)
+ +
__init__(self, verbose_name=None, name=None, primary_key=False, max_length=None, unique=False, blank=False, null=False, db_index=False, rel=None, default=<class django.db.models.fields.NOT_PROVIDED>, editable=True, serialize=True, unique_for_date=None, unique_for_month=None, unique_for_year=None, choices=None, help_text='', db_column=None, db_tablespace=None, auto_created=False)
+ +
bind(self, fieldmapping, original, bound_field_class)
+ +
formfield(self, form_class=<class 'django.forms.fields.CharField'>, **kwargs)
Returns a django.forms.Field instance for this database Field.
+ +
get_attname(self)
+ +
get_attname_column(self)
+ +
get_cache_name(self)
+ +
get_choices(self, include_blank=True, blank_choice=[('', '---------')])
Returns choices with a default blank choices included, for use
+as SelectField choices for this field.
+ +
get_choices_default(self)
+ +
get_db_prep_lookup(self, lookup_type, value)
Returns field's value prepared for database lookup.
+ +
get_db_prep_save(self, value)
Returns field's value prepared for saving into a database.
+ +
get_default(self)
Returns the default value for this field.
+ +
get_flatchoices(self, include_blank=True, blank_choice=[('', '---------')])
Returns flattened choices with a default blank choice included.
+ +
get_internal_type(self)
+ +
get_validator_unique_lookup_type(self)
+ +
has_default(self)
Returns a boolean of whether this field has a default value.
+ +
pre_save(self, model_instance, add)
Returns field's value just before saving.
+ +
save_form_data(self, instance, data)
+ +
set_attributes_from_name(self, name)
+ +
value_from_object(self, obj)
Returns the value of this field in the given model instance.
+ +
value_to_string(self, obj)
Returns a string value of this field from the passed obj.
+This is used by the serialization framework.
+ +
+Data descriptors inherited from django.db.models.fields.Field:
+
__dict__
+
dictionary for instance variables (if defined)
+
+
__weakref__
+
list of weak references to the object (if defined)
+
+
choices
+
+
flatchoices
+
Flattened version of choices tuple.
+
+
unique
+
+
+Data and other attributes inherited from django.db.models.fields.Field:
+
auto_creation_counter = -1
+ +
creation_counter = 0
+ +
empty_strings_allowed = True
+ +

+ + + + + +
 
+class OAuthCredentialsField(django.db.models.fields.Field)
    
Method resolution order:
+
OAuthCredentialsField
+
django.db.models.fields.Field
+
__builtin__.object
+
+
+Methods defined here:
+
contribute_to_class(self, cls, name)
+ +
db_type(self)
+ +
get_db_prep_value(self, value)
+ +
to_python(self, value)
+ +
+Data and other attributes defined here:
+
__metaclass__ = <class 'django.db.models.fields.subclassing.SubfieldBase'>
A metaclass for custom Field subclasses. This ensures the model's attribute
+has the descriptor protocol attached to it.
+ +
+Methods inherited from django.db.models.fields.Field:
+
__cmp__(self, other)
+ +
__deepcopy__(self, memodict)
+ +
__init__(self, verbose_name=None, name=None, primary_key=False, max_length=None, unique=False, blank=False, null=False, db_index=False, rel=None, default=<class django.db.models.fields.NOT_PROVIDED>, editable=True, serialize=True, unique_for_date=None, unique_for_month=None, unique_for_year=None, choices=None, help_text='', db_column=None, db_tablespace=None, auto_created=False)
+ +
bind(self, fieldmapping, original, bound_field_class)
+ +
formfield(self, form_class=<class 'django.forms.fields.CharField'>, **kwargs)
Returns a django.forms.Field instance for this database Field.
+ +
get_attname(self)
+ +
get_attname_column(self)
+ +
get_cache_name(self)
+ +
get_choices(self, include_blank=True, blank_choice=[('', '---------')])
Returns choices with a default blank choices included, for use
+as SelectField choices for this field.
+ +
get_choices_default(self)
+ +
get_db_prep_lookup(self, lookup_type, value)
Returns field's value prepared for database lookup.
+ +
get_db_prep_save(self, value)
Returns field's value prepared for saving into a database.
+ +
get_default(self)
Returns the default value for this field.
+ +
get_flatchoices(self, include_blank=True, blank_choice=[('', '---------')])
Returns flattened choices with a default blank choice included.
+ +
get_internal_type(self)
+ +
get_validator_unique_lookup_type(self)
+ +
has_default(self)
Returns a boolean of whether this field has a default value.
+ +
pre_save(self, model_instance, add)
Returns field's value just before saving.
+ +
save_form_data(self, instance, data)
+ +
set_attributes_from_name(self, name)
+ +
value_from_object(self, obj)
Returns the value of this field in the given model instance.
+ +
value_to_string(self, obj)
Returns a string value of this field from the passed obj.
+This is used by the serialization framework.
+ +
+Data descriptors inherited from django.db.models.fields.Field:
+
__dict__
+
dictionary for instance variables (if defined)
+
+
__weakref__
+
list of weak references to the object (if defined)
+
+
choices
+
+
flatchoices
+
Flattened version of choices tuple.
+
+
unique
+
+
+Data and other attributes inherited from django.db.models.fields.Field:
+
auto_creation_counter = -1
+ +
creation_counter = 0
+ +
empty_strings_allowed = True
+ +

+ \ No newline at end of file diff --git a/docs/apiclient.ext.html b/docs/apiclient.ext.html new file mode 100644 index 0000000..f9b24a0 --- /dev/null +++ b/docs/apiclient.ext.html @@ -0,0 +1,23 @@ + + +Python: package apiclient.ext + + + + +
 
+ 
apiclient.ext
index
/usr/local/google/home/jcgregorio/projects/apiary/apiclient/ext/__init__.py
+

+

+ + + + + +
 
+Package Contents
       
appengine
+
django_orm
+
+ \ No newline at end of file diff --git a/docs/apiclient.html b/docs/apiclient.html new file mode 100644 index 0000000..6b8dfbb --- /dev/null +++ b/docs/apiclient.html @@ -0,0 +1,29 @@ + + +Python: package apiclient + + + + +
 
+ 
apiclient
index
/usr/local/google/home/jcgregorio/projects/apiary/apiclient/__init__.py
+

+

+ + + + + +
 
+Package Contents
       
contrib (package)
+discovery
+
errors
+ext (package)
+
http
+json
+
model
+oauth
+
+ \ No newline at end of file diff --git a/docs/apiclient.http.html b/docs/apiclient.http.html new file mode 100644 index 0000000..9810823 --- /dev/null +++ b/docs/apiclient.http.html @@ -0,0 +1,149 @@ + + +Python: module apiclient.http + + + + +
 
+ 
apiclient.http
index
/usr/local/google/home/jcgregorio/projects/apiary/apiclient/http.py
+

Classes to encapsulate a single HTTP request.

+The classes implement a command pattern, with every
+object supporting an execute() method that does the
+actuall HTTP request.

+

+ + + + + +
 
+Classes
       
+
__builtin__.object +
+
+
HttpRequest +
RequestMockBuilder +
+
+
+

+ + + + + + + +
 
+class HttpRequest(__builtin__.object)
   Encapsulates a single HTTP request.
 
 Methods defined here:
+
__init__(self, http, uri, method='GET', body=None, headers=None, postproc=None, methodId=None)
Constructor for an HttpRequest.

+Only http and uri are required.

+Args:
+  http: httplib2.Http, the transport object to use to make a request
+  uri: string, the absolute URI to send the request to
+  method: string, the HTTP method to use
+  body: string, the request body of the HTTP request
+  headers: dict, the HTTP request headers
+  postproc: callable, called on the HTTP response and content to transform
+            it into a data object before returning, or raising an exception
+            on an error.
+  methodId: string, a unique identifier for the API method being called.
+ +
execute(self, http=None)
Execute the request.

+Args:
+  http: httplib2.Http, an http object to be used in place of the
+        one the HttpRequest request object was constructed with.

+Returns:
+  A deserialized object model of the response body as determined
+  by the postproc.

+Raises:
+  apiclient.errors.HttpError if the response was not a 2xx.
+  httplib2.Error if a transport error has occured.
+ +
+Data descriptors defined here:
+
__dict__
+
dictionary for instance variables (if defined)
+
+
__weakref__
+
list of weak references to the object (if defined)
+
+

+ + + + + + + +
 
+class RequestMockBuilder(__builtin__.object)
   A simple mock of HttpRequest

+Pass in a dictionary to the constructor that maps request methodIds to
+tuples of (httplib2.Response, content) that should be returned when that
+method is called. None may also be passed in for the httplib2.Response, in
+which case a 200 OK response will be generated.

+Example:
+  response = '{"data": {"id": "tag:google.c...'
+  requestBuilder = RequestMockBuilder(
+    {
+      'chili.activities.get': (None, response),
+    }
+  )
+  apiclient.discovery.build("buzz", "v1", requestBuilder=requestBuilder)

+Methods that you do not supply a response for will return a
+200 OK with an empty string as the response content. The methodId
+is taken from the rpcName in the discovery document.

+For more details see the project wiki.
 
 Methods defined here:
+
__call__(self, http, uri, method='GET', body=None, headers=None, postproc=None, methodId=None)
Implements the callable interface that discovery.build() expects
+of requestBuilder, which is to build an object compatible with
+HttpRequest.execute(). See that method for the description of the
+parameters and the expected response.
+ +
__init__(self, responses)
Constructor for RequestMockBuilder

+The constructed object should be a callable object
+that can replace the class HttpResponse.

+responses - A dictionary that maps methodIds into tuples
+            of (httplib2.Response, content). The methodId
+            comes from the 'rpcName' field in the discovery
+            document.
+ +
+Data descriptors defined here:
+
__dict__
+
dictionary for instance variables (if defined)
+
+
__weakref__
+
list of weak references to the object (if defined)
+
+

+ + + + + +
 
+Data
       __all__ = ['HttpRequest', 'RequestMockBuilder']
+__author__ = 'jcgregorio@google.com (Joe Gregorio)'

+ + + + + +
 
+Author
       jcgregorio@google.com (Joe Gregorio)
+ \ No newline at end of file diff --git a/docs/apiclient.json.html b/docs/apiclient.json.html new file mode 100644 index 0000000..00c56ab --- /dev/null +++ b/docs/apiclient.json.html @@ -0,0 +1,39 @@ + + +Python: module apiclient.json + + + + +
 
+ 
apiclient.json
index
/usr/local/google/home/jcgregorio/projects/apiary/apiclient/json.py
+

Utility module to import a JSON module

+Hides all the messy details of exactly where
+we get a simplejson module from.

+

+ + + + + +
 
+Modules
       
simplejson
+

+ + + + + +
 
+Data
       __author__ = 'jcgregorio@google.com (Joe Gregorio)'

+ + + + + +
 
+Author
       jcgregorio@google.com (Joe Gregorio)
+ \ No newline at end of file diff --git a/docs/apiclient.model.html b/docs/apiclient.model.html new file mode 100644 index 0000000..32ea8b9 --- /dev/null +++ b/docs/apiclient.model.html @@ -0,0 +1,107 @@ + + +Python: module apiclient.model + + + + +
 
+ 
apiclient.model
index
/usr/local/google/home/jcgregorio/projects/apiary/apiclient/model.py
+

Model objects for requests and responses

+Each API may support one or more serializations, such
+as JSON, Atom, etc. The model classes are responsible
+for converting between the wire format and the Python
+object representation.

+

+ + + + + +
 
+Modules
       
logging
+
simplejson
+
urllib
+

+ + + + + +
 
+Classes
       
+
__builtin__.object +
+
+
JsonModel +
+
+
+

+ + + + + + + +
 
+class JsonModel(__builtin__.object)
   Model class for JSON.

+Serializes and de-serializes between JSON and the Python
+object representation of HTTP request and response bodies.
 
 Methods defined here:
+
request(self, headers, path_params, query_params, body_value)
Updates outgoing requests with JSON bodies.

+Args:
+  headers: dict, request headers
+  path_params: dict, parameters that appear in the request path
+  query_params: dict, parameters that appear in the query
+  body_value: object, the request body as a Python object, which must be
+              serializable by simplejson.
+Returns:
+  A tuple of (headers, path_params, query, body)

+  headers: dict, request headers
+  path_params: dict, parameters that appear in the request path
+  query: string, query part of the request URI
+  body: string, the body serialized as JSON
+ +
response(self, resp, content)
Convert the response wire format into a Python object.

+Args:
+  resp: httplib2.Response, the HTTP response headers and status
+  content: string, the body of the HTTP response

+Returns:
+  The body de-serialized as a Python object.

+Raises:
+  apiclient.errors.HttpError if a non 2xx response is received.
+ +
+Data descriptors defined here:
+
__dict__
+
dictionary for instance variables (if defined)
+
+
__weakref__
+
list of weak references to the object (if defined)
+
+

+ + + + + +
 
+Data
       __author__ = 'jcgregorio@google.com (Joe Gregorio)'

+ + + + + +
 
+Author
       jcgregorio@google.com (Joe Gregorio)
+ \ No newline at end of file diff --git a/docs/apiclient.oauth.html b/docs/apiclient.oauth.html new file mode 100644 index 0000000..e55af8c --- /dev/null +++ b/docs/apiclient.oauth.html @@ -0,0 +1,375 @@ + + +Python: module apiclient.oauth + + + + +
 
+ 
apiclient.oauth
index
/usr/local/google/home/jcgregorio/projects/apiary/apiclient/oauth.py
+

Utilities for OAuth.

+Utilities for making it easier to work with OAuth.

+

+ + + + + +
 
+Modules
       
copy
+httplib2
+
logging
+oauth2
+
urllib
+

+ + + + + +
 
+Classes
       
+
__builtin__.object +
+
+
Credentials +
+
+
OAuthCredentials +
+
+
FlowThreeLegged +
+
+
exceptions.Exception(exceptions.BaseException) +
+
+
Error +
+
+
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) and
+authorizes 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 Error(exceptions.Exception)
   Base error for this module.
 
 
Method resolution order:
+
Error
+
exceptions.Exception
+
exceptions.BaseException
+
__builtin__.object
+
+
+Data descriptors defined here:
+
__weakref__
+
list of weak references to the object (if defined)
+
+
+Methods inherited from exceptions.Exception:
+
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
+ +
+Data and other attributes inherited from exceptions.Exception:
+
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
+ +
+Methods inherited from exceptions.BaseException:
+
__delattr__(...)
x.__delattr__('name') <==> del x.name
+ +
__getattribute__(...)
x.__getattribute__('name') <==> x.name
+ +
__getitem__(...)
x.__getitem__(y) <==> x[y]
+ +
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]

+Use of negative indices is not supported.
+ +
__reduce__(...)
+ +
__repr__(...)
x.__repr__() <==> repr(x)
+ +
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
+ +
__setstate__(...)
+ +
__str__(...)
x.__str__() <==> str(x)
+ +
__unicode__(...)
+ +
+Data descriptors inherited from exceptions.BaseException:
+
__dict__
+
+
args
+
+
message
+
+

+ + + + + + + +
 
+class FlowThreeLegged(__builtin__.object)
   Does the Three Legged Dance for OAuth 1.0a.
 
 Methods defined here:
+
__init__(self, discovery, consumer_key, consumer_secret, user_agent, **kwargs)
discovery       - Section of the API discovery document that describes
+                  the 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 token
+for OAuthCredentials.

+verifier - either the verifier token, or a dictionary
+    of the query parameters to the callback, which contains
+    the oauth_verifier.
+ +
+Data descriptors defined here:
+
__dict__
+
dictionary for instance variables (if defined)
+
+
__weakref__
+
list of weak references to the object (if defined)
+
+

+ + + + + +
 
+class MissingParameter(Error)
    
Method resolution order:
+
MissingParameter
+
Error
+
exceptions.Exception
+
exceptions.BaseException
+
__builtin__.object
+
+
+Data descriptors inherited from Error:
+
__weakref__
+
list of weak references to the object (if defined)
+
+
+Methods inherited from exceptions.Exception:
+
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
+ +
+Data and other attributes inherited from exceptions.Exception:
+
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
+ +
+Methods inherited from exceptions.BaseException:
+
__delattr__(...)
x.__delattr__('name') <==> del x.name
+ +
__getattribute__(...)
x.__getattribute__('name') <==> x.name
+ +
__getitem__(...)
x.__getitem__(y) <==> x[y]
+ +
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]

+Use of negative indices is not supported.
+ +
__reduce__(...)
+ +
__repr__(...)
x.__repr__() <==> repr(x)
+ +
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
+ +
__setstate__(...)
+ +
__str__(...)
x.__str__() <==> str(x)
+ +
__unicode__(...)
+ +
+Data descriptors inherited from exceptions.BaseException:
+
__dict__
+
+
args
+
+
message
+
+

+ + + + + + + +
 
+class OAuthCredentials(Credentials)
   Credentials object for OAuth 1.0a
 
 
Method resolution order:
+
OAuthCredentials
+
Credentials
+
__builtin__.object
+
+
+Methods defined here:
+
__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.
+ +
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()'.
+ +
+Data descriptors inherited from Credentials:
+
__dict__
+
dictionary for instance variables (if defined)
+
+
__weakref__
+
list of weak references to the object (if defined)
+
+

+ + + + + + + +
 
+class RequestError(Error)
   Error occurred during request.
 
 
Method resolution order:
+
RequestError
+
Error
+
exceptions.Exception
+
exceptions.BaseException
+
__builtin__.object
+
+
+Data descriptors inherited from Error:
+
__weakref__
+
list of weak references to the object (if defined)
+
+
+Methods inherited from exceptions.Exception:
+
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
+ +
+Data and other attributes inherited from exceptions.Exception:
+
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
+ +
+Methods inherited from exceptions.BaseException:
+
__delattr__(...)
x.__delattr__('name') <==> del x.name
+ +
__getattribute__(...)
x.__getattribute__('name') <==> x.name
+ +
__getitem__(...)
x.__getitem__(y) <==> x[y]
+ +
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]

+Use of negative indices is not supported.
+ +
__reduce__(...)
+ +
__repr__(...)
x.__repr__() <==> repr(x)
+ +
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
+ +
__setstate__(...)
+ +
__str__(...)
x.__str__() <==> str(x)
+ +
__unicode__(...)
+ +
+Data descriptors inherited from exceptions.BaseException:
+
__dict__
+
+
args
+
+
message
+
+

+ + + + + +
 
+Data
       __author__ = 'jcgregorio@google.com (Joe Gregorio)'

+ + + + + +
 
+Author
       jcgregorio@google.com (Joe Gregorio)
+ \ No newline at end of file diff --git a/docs/build.sh b/docs/build.sh new file mode 100755 index 0000000..1ea5060 --- /dev/null +++ b/docs/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# +# Copyright 2010 Google Inc. All Rights Reserved. +# Author: jcgregorio@google.com (Joe Gregorio) +# +# Creates the documentation set for the library by +# running pydoc on all the files in apiclient. +# +# Notes: You may have to update the location of the +# App Engine library for your local system. + +set GOOGLE_APPENGINE=$HOME/projects/google_appengine/ +set DJANGO_SETTINGS_MODULE=fakesettings +set PYTHONPATH=`pwd`/..:$GOOGLE_APPENGINE +find ../apiclient/ -name "*.py" | sed "s/\/__init__.py//" | sed "s/\.py//" | sed "s/^\.\.\///" | sed "s#/#.#g" | xargs pydoc -w + diff --git a/docs/fakesettings.py b/docs/fakesettings.py new file mode 100644 index 0000000..565d2e5 --- /dev/null +++ b/docs/fakesettings.py @@ -0,0 +1,83 @@ +# Django settings for django_sample project. +import os + +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +ADMINS = ( + # ('Your Name', 'your_email@domain.com'), +) + +MANAGERS = ADMINS + +DATABASE_ENGINE = 'sqlite3' +DATABASE_NAME = 'database.sqlite3' +DATABASE_USER = '' +DATABASE_PASSWORD = '' +DATABASE_HOST = '' +DATABASE_PORT = '' + +# Local time zone for this installation. Choices can be found here: +# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name +# although not all choices may be available on all operating systems. +# If running in a Windows environment this must be set to the same as your +# system time zone. +TIME_ZONE = 'America/New_York' + +# Language code for this installation. All choices can be found here: +# http://www.i18nguy.com/unicode/language-identifiers.html +LANGUAGE_CODE = 'en-us' + +SITE_ID = 1 + +# If you set this to False, Django will make some optimizations so as not +# to load the internationalization machinery. +USE_I18N = True + +# Absolute path to the directory that holds media. +# Example: "/home/media/media.lawrence.com/" +MEDIA_ROOT = '' + +# URL that handles the media served from MEDIA_ROOT. Make sure to use a +# trailing slash if there is a path component (optional in other cases). +# Examples: "http://media.lawrence.com", "http://example.com/media/" +MEDIA_URL = '' + +# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a +# trailing slash. +# Examples: "http://foo.com/media/", "/media/". +ADMIN_MEDIA_PREFIX = '/media/' + +# Make this unique, and don't share it with anybody. +SECRET_KEY = '_=9hq-$t_uv1ckf&s!y2$9g$1dm*6p1cl%*!^mg=7gr)!zj32d' + +# List of callables that know how to import templates from various sources. +TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.load_template_source', + 'django.template.loaders.app_directories.load_template_source', +# 'django.template.loaders.eggs.load_template_source', +) + +MIDDLEWARE_CLASSES = ( + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', +) + +ROOT_URLCONF = 'django_sample.urls' + +TEMPLATE_DIRS = ( + # Put strings here, like "/home/html/django_templates" + # Always use forward slashes, even on Windows. + # Don't forget to use absolute paths, not relative paths. + os.path.join(os.path.dirname(__file__), 'templates') +) + +INSTALLED_APPS = ( + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django_sample.buzz' +)