From 20a5aa983e690a74e3cf51765721cce919cb50b8 Mon Sep 17 00:00:00 2001 From: Joe Gregorio Date: Fri, 1 Apr 2011 17:44:25 -0400 Subject: [PATCH] Updated copyright notices where appropriate and refreshed generated docs. --- FAQ | 3 +- README | 3 +- TODO | 11 +-- apiclient/errors.py | 14 +++- apiclient/ext/django_orm.py | 14 ++++ apiclient/ext/file.py | 14 +++- apiclient/http.py | 14 +++- apiclient/model.py | 14 +++- apiclient/oauth.py | 14 +++- contrib/buzz/simple_wrapper.py | 16 +++- describe.py | 44 ++++++---- docs/apiclient.anyjson.html | 2 +- docs/apiclient.contrib.html | 22 ----- docs/apiclient.discovery.html | 2 +- docs/apiclient.errors.html | 2 +- docs/apiclient.ext.authtools.html | 2 +- docs/apiclient.ext.django_orm.html | 82 +++++++++++++++---- docs/apiclient.ext.file.html | 2 +- docs/apiclient.ext.html | 2 +- docs/apiclient.html | 2 +- docs/apiclient.http.html | 57 +++++++------ docs/apiclient.model.html | 2 +- docs/apiclient.oauth.html | 2 +- docs/build.sh | 17 +++- docs/dyn/buzz.v1.activities.html | 16 ++-- docs/dyn/buzz.v1.groups.html | 14 ++-- docs/dyn/buzz.v1.people.html | 6 +- docs/dyn/buzz.v1.photoAlbums.html | 18 ++-- docs/dyn/buzz.v1.photos.html | 12 +-- docs/dyn/chromewebstore.v1.html | 28 +++++++ docs/dyn/chromewebstore.v1.licenses.html | 32 ++++++++ docs/dyn/customsearch.v1.cse.html | 2 +- docs/dyn/diacritize.v1.diacritize.corpus.html | 4 +- docs/dyn/moderator.v1.responses.html | 2 +- docs/dyn/moderator.v1.series.submissions.html | 1 + docs/dyn/moderator.v1.submissions.html | 1 + docs/dyn/moderator.v1.topics.submissions.html | 11 +-- docs/dyn/shopping.v1.products.html | 26 +++--- docs/dyn/translate.v2.detections.html | 31 +++++++ docs/dyn/translate.v2.html | 4 + docs/dyn/translate.v2.languages.html | 31 +++++++ docs/dyn/translate.v2.translations.html | 6 +- docs/dyn/urlshortener.v1.url.html | 4 +- docs/httplib2.html | 2 +- docs/httplib2.socks.html | 2 +- docs/oauth2client.client.html | 4 +- docs/oauth2client.django_orm.html | 68 +++++++++++---- docs/oauth2client.file.html | 2 +- docs/oauth2client.html | 5 +- docs/oauth2client.tools.html | 2 +- docs/uritemplate.html | 2 +- oauth2client/client.py | 14 +++- oauth2client/django_orm.py | 14 +++- oauth2client/file.py | 14 +++- samples/api-python-client-doc/main.py | 1 - samples/buzz/buzz.py | 52 +++++++++++- samples/moderator/moderator.py | 21 ++++- 57 files changed, 601 insertions(+), 208 deletions(-) delete mode 100644 docs/apiclient.contrib.html create mode 100644 docs/dyn/chromewebstore.v1.html create mode 100644 docs/dyn/chromewebstore.v1.licenses.html create mode 100644 docs/dyn/translate.v2.detections.html create mode 100644 docs/dyn/translate.v2.languages.html diff --git a/FAQ b/FAQ index deba976..dc736f2 100644 --- a/FAQ +++ b/FAQ @@ -2,6 +2,7 @@ Frequently asked questions? Q: How do I work out the arguments and methods that are available for a particular API? -A: http://api-python-client-doc.appspot.com/ has dynamically generated documentation for all the APIs supported by this library. +A: http://api-python-client-doc.appspot.com/ has dynamically generated + documentation for all the APIs supported by this library. diff --git a/README b/README index 38f18b5..9a7b28c 100644 --- a/README +++ b/README @@ -45,8 +45,7 @@ should be able to cd to samples/buzz and run the code from there. Third Party Libraries ===================== -These libraries should be installed when you install the client library, either -automatically if you have setuptools installed, or manually if you do not: +These libraries will be installed when you install the client library: http://code.google.com/p/httplib2 http://code.google.com/p/uri-templates diff --git a/TODO b/TODO index f95e6b2..aeca34a 100644 --- a/TODO +++ b/TODO @@ -1,13 +1,4 @@ TODO ==== - - LICENSE file - - - OAuth cmdline sample should start local http server to catch response. - - - Caching of discovery doc - - - Examples of caching - - - 2.x and 3.x compatible - + - Maybe support Python 3.x? diff --git a/apiclient/errors.py b/apiclient/errors.py index 0d81ec3..189dd52 100644 --- a/apiclient/errors.py +++ b/apiclient/errors.py @@ -1,6 +1,18 @@ #!/usr/bin/python2.4 # -# Copyright 2010 Google Inc. All Rights Reserved. +# Copyright (C) 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Errors for the library. diff --git a/apiclient/ext/django_orm.py b/apiclient/ext/django_orm.py index c92c3af..84b0d74 100644 --- a/apiclient/ext/django_orm.py +++ b/apiclient/ext/django_orm.py @@ -1,3 +1,17 @@ +# Copyright (C) 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import apiclient import base64 import pickle diff --git a/apiclient/ext/file.py b/apiclient/ext/file.py index a243fd2..ed1a18c 100644 --- a/apiclient/ext/file.py +++ b/apiclient/ext/file.py @@ -1,4 +1,16 @@ -# Copyright 2010 Google Inc. All Rights Reserved. +# Copyright (C) 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Utilities for OAuth. diff --git a/apiclient/http.py b/apiclient/http.py index 8c81ad4..2481c23 100644 --- a/apiclient/http.py +++ b/apiclient/http.py @@ -1,4 +1,16 @@ -# Copyright 2010 Google Inc. All Rights Reserved. +# Copyright (C) 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Classes to encapsulate a single HTTP request. diff --git a/apiclient/model.py b/apiclient/model.py index 1e5b862..7bc6858 100644 --- a/apiclient/model.py +++ b/apiclient/model.py @@ -1,6 +1,18 @@ #!/usr/bin/python2.4 # -# Copyright 2010 Google Inc. All Rights Reserved. +# Copyright (C) 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Model objects for requests and responses. diff --git a/apiclient/oauth.py b/apiclient/oauth.py index 618b29f..430d068 100644 --- a/apiclient/oauth.py +++ b/apiclient/oauth.py @@ -1,4 +1,16 @@ -# Copyright 2010 Google Inc. All Rights Reserved. +# Copyright (C) 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Utilities for OAuth. diff --git a/contrib/buzz/simple_wrapper.py b/contrib/buzz/simple_wrapper.py index 7689a28..49c6038 100644 --- a/contrib/buzz/simple_wrapper.py +++ b/contrib/buzz/simple_wrapper.py @@ -1,6 +1,18 @@ #!/usr/bin/python2.4 # -# Copyright 2010 Google Inc. All Rights Reserved. +# Copyright (C) 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. __author__ = 'ade@google.com (Ade Oshineye)' @@ -67,4 +79,4 @@ class SimpleWrapper(object): members = cmd.execute() if 'totalResults' not in members.keys(): return -1 - return members['totalResults'] \ No newline at end of file + return members['totalResults'] diff --git a/describe.py b/describe.py index 4f7fe96..fd8c89d 100644 --- a/describe.py +++ b/describe.py @@ -1,23 +1,32 @@ +#!/usr/bin/env python +# +# Copyright 2007 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__author__ = 'jcgregorio@google.com (Joe Gregorio)' + import os import pydoc import re +import sys +import httplib2 +from apiclient.anyjson import simplejson from apiclient.discovery import build BASE = 'docs/dyn' -APIS = [ - ('buzz', 'v1'), - ('moderator', 'v1'), - ('latitude', 'v1'), - ('customsearch', 'v1'), - ('diacritize', 'v1'), - ('translate', 'v2'), - ('prediction', 'v1.1'), - ('shopping', 'v1'), - ('urlshortener', 'v1'), - ] - def document(resource, path): print path collections = [] @@ -44,6 +53,11 @@ def document_api(name, version): document(service, '%s.%s.' % (name, version)) if __name__ == '__main__': - for name, version in APIS: - document_api(name, version) - + http = httplib2.Http() + resp, content = http.request('https://www.googleapis.com/discovery/v0.3/directory?preferred=true') + if resp.status == 200: + directory = simplejson.loads(content)['items'] + for api in directory: + document_api(api['name'], api['version']) + else: + sys.exit("Failed to load the discovery document.") diff --git a/docs/apiclient.anyjson.html b/docs/apiclient.anyjson.html index 7471a08..aed7393 100644 --- a/docs/apiclient.anyjson.html +++ b/docs/apiclient.anyjson.html @@ -8,7 +8,7 @@  
 
apiclient.anyjson
index
/home/jcgregorio/projects/apiary/apiclient/anyjson.py
+>index
/home/jcgregorio/projects/apiclient-release/apiclient/anyjson.py

Utility module to import a JSON module
 
Hides all the messy details of exactly where
diff --git a/docs/apiclient.contrib.html b/docs/apiclient.contrib.html deleted file mode 100644 index 5950718..0000000 --- a/docs/apiclient.contrib.html +++ /dev/null @@ -1,22 +0,0 @@ - - -Python: package apiclient.contrib - - - - -
 
- 
apiclient.contrib
index
/home/jcgregorio/projects/apiary/apiclient/contrib/__init__.py
-

-

- - - - - -
 
-Package Contents
       
buzz (package)
-
- \ No newline at end of file diff --git a/docs/apiclient.discovery.html b/docs/apiclient.discovery.html index 0f0a75e..0fc8a73 100644 --- a/docs/apiclient.discovery.html +++ b/docs/apiclient.discovery.html @@ -8,7 +8,7 @@  
 
apiclient.discovery
index
/home/jcgregorio/projects/apiary/apiclient/discovery.py
+>index
/home/jcgregorio/projects/apiclient-release/apiclient/discovery.py

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

diff --git a/docs/apiclient.errors.html b/docs/apiclient.errors.html index d19fb96..c99feec 100644 --- a/docs/apiclient.errors.html +++ b/docs/apiclient.errors.html @@ -8,7 +8,7 @@  
 
apiclient.errors
index
/home/jcgregorio/projects/apiary/apiclient/errors.py
+>index
/home/jcgregorio/projects/apiclient-release/apiclient/errors.py

Errors for the library.
 
All exceptions defined by the library
diff --git a/docs/apiclient.ext.authtools.html b/docs/apiclient.ext.authtools.html index 63c30ea..7f77886 100644 --- a/docs/apiclient.ext.authtools.html +++ b/docs/apiclient.ext.authtools.html @@ -8,7 +8,7 @@  
 
apiclient.ext.authtools
index
/home/jcgregorio/projects/apiary/apiclient/ext/authtools.py
+>index
/home/jcgregorio/projects/apiclient-release/apiclient/ext/authtools.py

Command-line tools for authenticating via OAuth 1.0
 
Do the OAuth 1.0 Three Legged Dance for
diff --git a/docs/apiclient.ext.django_orm.html b/docs/apiclient.ext.django_orm.html index 28d728f..ef8c965 100644 --- a/docs/apiclient.ext.django_orm.html +++ b/docs/apiclient.ext.django_orm.html @@ -8,8 +8,20 @@  
 
apiclient.ext.django_orm
index
/usr/local/google/home/jcgregorio/projects/apiclient/apiclient/ext/django_orm.py
-

+>index
/home/jcgregorio/projects/apiclient-release/apiclient/ext/django_orm.py
+

# Copyright (C) 2010 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.

@@ -53,9 +65,13 @@ Methods defined here:
contribute_to_class(self, cls, name)
-
db_type(self)
+
db_type = inner(*args, **kwargs)
-
get_db_prep_value(self, value)
+
get_db_prep_lookup = inner(*args, **kwargs)
+ +
get_db_prep_save = inner(*args, **kwargs)
+ +
get_db_prep_value = inner(*args, **kwargs)
to_python(self, value)
@@ -70,10 +86,14 @@ Methods inherited from django.db.mo
__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)
+
__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, validators=[], error_messages=None)
bind(self, fieldmapping, original, bound_field_class)
+
clean(self, value, model_instance)
Convert the value's type and run validation. Validation errors from to_python
+and validate are propagated. The correct value is returned if no error is
+raised.
+
formfield(self, form_class=<class 'django.forms.fields.CharField'>, **kwargs)
Returns a django.forms.Field instance for this database Field.
get_attname(self)
@@ -87,26 +107,31 @@ 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_prep_lookup(self, lookup_type, value)
Perform preliminary non-db specific lookup checks and conversions
+ +
get_prep_value(self, value)
Perform preliminary non-db specific value checks and conversions.
+
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.
+
run_validators(self, value)
+
save_form_data(self, instance, data)
set_attributes_from_name(self, name)
+
validate(self, value, model_instance)
Validates value and throws ValidationError. Subclasses should override
+this to provide validation logic.
+
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.
@@ -122,6 +147,8 @@ Data descriptors inherited from dja
choices
+
description
+
flatchoices
Flattened version of choices tuple.
@@ -133,6 +160,10 @@ Data and other attributes inherited from
contribute_to_class(self, cls, name)
-
db_type(self)
+
db_type = inner(*args, **kwargs)
-
get_db_prep_value(self, value)
+
get_db_prep_lookup = inner(*args, **kwargs)
+ +
get_db_prep_save = inner(*args, **kwargs)
+ +
get_db_prep_value = inner(*args, **kwargs)
to_python(self, value)
@@ -168,10 +203,14 @@ Methods inherited from django.db.mo
__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)
+
__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, validators=[], error_messages=None)
bind(self, fieldmapping, original, bound_field_class)
+
clean(self, value, model_instance)
Convert the value's type and run validation. Validation errors from to_python
+and validate are propagated. The correct value is returned if no error is
+raised.
+
formfield(self, form_class=<class 'django.forms.fields.CharField'>, **kwargs)
Returns a django.forms.Field instance for this database Field.
get_attname(self)
@@ -185,26 +224,31 @@ 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_prep_lookup(self, lookup_type, value)
Perform preliminary non-db specific lookup checks and conversions
+ +
get_prep_value(self, value)
Perform preliminary non-db specific value checks and conversions.
+
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.
+
run_validators(self, value)
+
save_form_data(self, instance, data)
set_attributes_from_name(self, name)
+
validate(self, value, model_instance)
Validates value and throws ValidationError. Subclasses should override
+this to provide validation logic.
+
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.
@@ -220,6 +264,8 @@ Data descriptors inherited from dja
choices
+
description
+
flatchoices
Flattened version of choices tuple.
@@ -231,6 +277,10 @@ Data and other attributes inherited from
 
apiclient.ext.file
index
/home/jcgregorio/projects/apiary/apiclient/ext/file.py
+>index
/home/jcgregorio/projects/apiclient-release/apiclient/ext/file.py

Utilities for OAuth.
 
Utilities for making it easier to work with OAuth 1.0 credentials.

diff --git a/docs/apiclient.ext.html b/docs/apiclient.ext.html index d3b597d..502f4b6 100644 --- a/docs/apiclient.ext.html +++ b/docs/apiclient.ext.html @@ -8,7 +8,7 @@  
 
apiclient.ext
index
/home/jcgregorio/projects/apiary/apiclient/ext/__init__.py
+>index
/home/jcgregorio/projects/apiclient-release/apiclient/ext/__init__.py

diff --git a/docs/apiclient.html b/docs/apiclient.html index 4e9ce70..1ca9194 100644 --- a/docs/apiclient.html +++ b/docs/apiclient.html @@ -8,7 +8,7 @@
 
 
apiclient
index
/home/jcgregorio/projects/apiary/apiclient/__init__.py
+>index
/home/jcgregorio/projects/apiclient-release/apiclient/__init__.py

diff --git a/docs/apiclient.http.html b/docs/apiclient.http.html index a9c5ce4..46037e9 100644 --- a/docs/apiclient.http.html +++ b/docs/apiclient.http.html @@ -8,7 +8,7 @@
 
 
apiclient.http
index
/home/jcgregorio/projects/apiary/apiclient/http.py
+>index
/home/jcgregorio/projects/apiclient-release/apiclient/http.py

Classes to encapsulate a single HTTP request.
 
The classes implement a command pattern, with every
@@ -23,7 +23,8 @@ actuall HTTP request.

       
httplib2
os
-

+simplejson
+

 
@@ -34,8 +35,7 @@ actuall HTTP request.

__builtin__.object
-
HttpMock -
HttpRequest +
HttpRequest
RequestMockBuilder
@@ -44,30 +44,6 @@ actuall HTTP request.

- - - - -
 
-class HttpMock(__builtin__.object)
   Mock of httplib2.Http
 
 Methods defined here:
-
__init__(self, filename, headers=None)
Args:
-  filename: string, absolute filename to read response from
-  headers: dict, header to return with response
- -
request(self, uri, method='GET', body=None, headers=None, redirections=1, connection_type=None)
- -
-Data descriptors defined here:
-
__dict__
-
dictionary for instance variables (if defined)
-
-
__weakref__
-
list of weak references to the object (if defined)
-
-

- - - @@ -164,12 +140,35 @@ Data descriptors defined here:
 
class HttpRequest(__builtin__.object)
   

+ + + + +
 
+Functions
       
tunnel_patch(http)
Tunnel PATCH requests over POST.
+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 = tunnel_patch(h, "my-app-name/6.0")

+Useful if you are running on a platform that doesn't support PATCH.
+Apply this last if you are using OAuth 1.0, as changing the method
+will result in a different signature.
+

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

diff --git a/docs/apiclient.model.html b/docs/apiclient.model.html index 8d870d0..eb102e7 100644 --- a/docs/apiclient.model.html +++ b/docs/apiclient.model.html @@ -8,7 +8,7 @@
 
 
apiclient.model
index
/home/jcgregorio/projects/apiary/apiclient/model.py
+>index
/home/jcgregorio/projects/apiclient-release/apiclient/model.py

Model objects for requests and responses.
 
Each API may support one or more serializations, such
diff --git a/docs/apiclient.oauth.html b/docs/apiclient.oauth.html index 602e8f5..08eba24 100644 --- a/docs/apiclient.oauth.html +++ b/docs/apiclient.oauth.html @@ -8,7 +8,7 @@  
 
apiclient.oauth
index
/home/jcgregorio/projects/apiary/apiclient/oauth.py
+>index
/home/jcgregorio/projects/apiclient-release/apiclient/oauth.py

Utilities for OAuth.
 
Utilities for making it easier to work with OAuth.

diff --git a/docs/build.sh b/docs/build.sh index 1c21da1..7ca3737 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -1,6 +1,19 @@ #!/bin/bash # -# Copyright 2010 Google Inc. All Rights Reserved. +# Copyright 2007 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: jcgregorio@google.com (Joe Gregorio) # # Creates the documentation set for the library by @@ -9,7 +22,7 @@ # Notes: You may have to update the location of the # App Engine library for your local system. -export GOOGLE_APPENGINE=$HOME/projects/google_appengine/ +export GOOGLE_APPENGINE=$HOME/projects/google_appengine export DJANGO_SETTINGS_MODULE=fakesettings export 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/dyn/buzz.v1.activities.html b/docs/dyn/buzz.v1.activities.html index e88dd37..d93169f 100644 --- a/docs/dyn/buzz.v1.activities.html +++ b/docs/dyn/buzz.v1.activities.html @@ -40,14 +40,14 @@ Args:
 
Args:
  c: string, A continuation token that allows pagination.
-  pid: string, ID of a place to use in a geographic location query.
+  lat: string, Latitude to use in a geographic location query.
  lon: string, Longitude to use in a geographic location query.
+  pid: string, ID of a place to use in a geographic location query.
  q: string, Full-text search query string.
  max_results: integer, Maximum number of results to include.
  radius: string, Radius to use in a geographic location query.
  bbox: string, Bounding box to use in a geographic location query.
  hl: string, Language code to limit language results.
-  lat: string, Latitude to use in a geographic location query.
  alt: string, Specifies an alternative representation type.
    Allowed values
      atom - Use Atom XML format
@@ -57,8 +57,8 @@ Args:
 
Args:
  postId: string, ID of the post to get. (required)
-  userId: string, ID of the user whose post to get. (required)
  truncateAtom: boolean, Truncate the value of the atom:content element.
+  userId: string, ID of the user whose post to get. (required)
  hl: string, Language code to limit language results.
  alt: string, Specifies an alternative representation type.
    Allowed values
@@ -83,8 +83,8 @@ Args:
 
Args:
  c: string, A continuation token that allows pagination.
-  userId: string, ID of the user being referenced. (required)
  truncateAtom: boolean, Truncate the value of the atom:content element.
+  userId: string, ID of the user being referenced. (required)
  max_results: integer, Maximum number of results to include.
  hl: string, Language code to limit language results.
  scope: string, The collection of activities to list. (required)
@@ -112,15 +112,15 @@ the collection.
 
Args:
  c: string, A continuation token that allows pagination.
-  pid: string, ID of a place to use in a geographic location query.
+  lat: string, Latitude to use in a geographic location query.
  lon: string, Longitude to use in a geographic location query.
+  pid: string, ID of a place to use in a geographic location query.
  q: string, Full-text search query string.
  truncateAtom: boolean, Truncate the value of the atom:content element.
  max_results: integer, Maximum number of results to include.
  radius: string, Radius to use in a geographic location query.
  bbox: string, Bounding box to use in a geographic location query.
  hl: string, Language code to limit language results.
-  lat: string, Latitude to use in a geographic location query.
  alt: string, Specifies an alternative representation type.
    Allowed values
      atom - Use Atom XML format
@@ -137,14 +137,14 @@ the collection.
 
Args:
  c: string, A continuation token that allows pagination.
-  pid: string, ID of a place to use in a geographic location query.
+  lat: string, Latitude to use in a geographic location query.
  lon: string, Longitude to use in a geographic location query.
+  pid: string, ID of a place to use in a geographic location query.
  q: string, Full-text search query string.
  max_results: integer, Maximum number of results to include.
  radius: string, Radius to use in a geographic location query.
  bbox: string, Bounding box to use in a geographic location query.
  hl: string, Language code to limit language results.
-  lat: string, Latitude to use in a geographic location query.
  alt: string, Specifies an alternative representation type.
    Allowed values
      atom - Use Atom XML format
diff --git a/docs/dyn/buzz.v1.groups.html b/docs/dyn/buzz.v1.groups.html index 2e1404f..257bcff 100644 --- a/docs/dyn/buzz.v1.groups.html +++ b/docs/dyn/buzz.v1.groups.html @@ -17,35 +17,35 @@
delete = method(self, **kwargs)
Delete a group
 
Args:
+  userId: string, ID of the user being referenced. (required)
+  hl: string, Language code to limit language results.
  alt: string, Specifies an alternative representation type.
    Allowed values
      atom - Use Atom XML format
      json - Use JSON format
-  hl: string, Language code to limit language results.
-  userId: string, ID of the user being referenced. (required)
  groupId: string, ID of the group to delete. (required)
get = method(self, **kwargs)
Get a group
 
Args:
+  userId: string, ID of the user being referenced. (required)
+  hl: string, Language code to limit language results.
  alt: string, Specifies an alternative representation type.
    Allowed values
      atom - Use Atom XML format
      json - Use JSON format
-  hl: string, Language code to limit language results.
-  userId: string, ID of the user being referenced. (required)
  groupId: string, ID of the group to get. (required)
insert = method(self, **kwargs)
Create a group
 
Args:
  body: object, The request body. (required)
+  userId: string, ID of the user being referenced. (required)
+  hl: string, Language code to limit language results.
  alt: string, Specifies an alternative representation type.
    Allowed values
      atom - Use Atom XML format
-      json - Use JSON format
-  userId: string, ID of the user being referenced. (required)
-  hl: string, Language code to limit language results.
+      json - Use JSON format
list = method(self, **kwargs)
Get a user's groups
 
diff --git a/docs/dyn/buzz.v1.people.html b/docs/dyn/buzz.v1.people.html index 19d9d35..e2ac0af 100644 --- a/docs/dyn/buzz.v1.people.html +++ b/docs/dyn/buzz.v1.people.html @@ -29,12 +29,12 @@ Args:
get = method(self, **kwargs)
Get a user profile
 
Args:
+  userId: string, ID of the user being referenced. (required)
+  hl: string, Language code to limit language results.
  alt: string, Specifies an alternative representation type.
    Allowed values
      atom - Use Atom XML format
-      json - Use JSON format
-  userId: string, ID of the user being referenced. (required)
-  hl: string, Language code to limit language results.
+      json - Use JSON format
liked = method(self, **kwargs)
Get people who liked an activity
 
diff --git a/docs/dyn/buzz.v1.photoAlbums.html b/docs/dyn/buzz.v1.photoAlbums.html index f7b1cd8..4ca4ec5 100644 --- a/docs/dyn/buzz.v1.photoAlbums.html +++ b/docs/dyn/buzz.v1.photoAlbums.html @@ -18,34 +18,34 @@  
Args:
  albumId: string, ID of the album to delete. (required)
+  userId: string, ID of the user being referenced. (required)
+  hl: string, Language code to limit language results.
  alt: string, Specifies an alternative representation type.
    Allowed values
      atom - Use Atom XML format
-      json - Use JSON format
-  userId: string, ID of the user being referenced. (required)
-  hl: string, Language code to limit language results.
+      json - Use JSON format
get = method(self, **kwargs)
Get a photo album
 
Args:
  albumId: string, ID of the album to get. (required)
+  userId: string, ID of the user being referenced. (required)
+  hl: string, Language code to limit language results.
  alt: string, Specifies an alternative representation type.
    Allowed values
      atom - Use Atom XML format
-      json - Use JSON format
-  userId: string, ID of the user being referenced. (required)
-  hl: string, Language code to limit language results.
+      json - Use JSON format
insert = method(self, **kwargs)
Create a photo album
 
Args:
  body: object, The request body. (required)
+  userId: string, ID of the user being referenced. (required)
+  hl: string, Language code to limit language results.
  alt: string, Specifies an alternative representation type.
    Allowed values
      atom - Use Atom XML format
-      json - Use JSON format
-  userId: string, ID of the user being referenced. (required)
-  hl: string, Language code to limit language results.
+      json - Use JSON format
list = method(self, **kwargs)
List a user's photo albums
 
diff --git a/docs/dyn/buzz.v1.photos.html b/docs/dyn/buzz.v1.photos.html index e9fc4b2..c46eba9 100644 --- a/docs/dyn/buzz.v1.photos.html +++ b/docs/dyn/buzz.v1.photos.html @@ -18,8 +18,8 @@  
Args:
  photoId: string, ID of the photo to delete. (required)
-  userId: string, ID of the user being referenced. (required)
  albumId: string, ID of the album to which to photo belongs. (required)
+  userId: string, ID of the user being referenced. (required)
  hl: string, Language code to limit language results.
  alt: string, Specifies an alternative representation type.
    Allowed values
@@ -29,9 +29,9 @@ Args:
get = method(self, **kwargs)
Get photo metadata
 
Args:
-  photoId: string, ID of the album containing the photo. (required)
+  photoId: string, ID of the photo for which to get metadata. (required)
+  albumId: string, ID of the album containing the photo. (required)
  userId: string, ID of the user being referenced. (required)
-  albumId: string, ID of the photo for which to get metadata. (required)
  hl: string, Language code to limit language results.
  alt: string, Specifies an alternative representation type.
    Allowed values
@@ -42,8 +42,8 @@ Args:
 
Args:
  body: object, The request body. (required)
-  userId: string, ID of the user being referenced. (required)
  albumId: string, ID of the album to which to upload. (required)
+  userId: string, ID of the user being referenced. (required)
  hl: string, Language code to limit language results.
  alt: string, Specifies an alternative representation type.
    Allowed values
@@ -54,8 +54,8 @@ Args:
 
Args:
  body: object, The request body. (required)
-  userId: string, ID of the user being referenced. (required)
  albumId: string, ID of the album to which to upload. (required)
+  userId: string, ID of the user being referenced. (required)
  hl: string, Language code to limit language results.
  alt: string, Specifies an alternative representation type.
    Allowed values
@@ -66,8 +66,8 @@ Args:
 
Args:
  c: string, A continuation token that allows pagination.
-  userId: string, ID of the user being referenced. (required)
  albumId: string, ID of the album for which to list photos. (required)
+  userId: string, ID of the user being referenced. (required)
  max_results: integer, Maximum number of results to include.
  hl: string, Language code to limit language results.
  alt: string, Specifies an alternative representation type.
diff --git a/docs/dyn/chromewebstore.v1.html b/docs/dyn/chromewebstore.v1.html new file mode 100644 index 0000000..2045b5c --- /dev/null +++ b/docs/dyn/chromewebstore.v1.html @@ -0,0 +1,28 @@ + + +Python: class Resource + +

+ + + + + + + +
 
+class Resource(__builtin__.object)
   A class for interacting with a resource.
 
 Methods defined here:
+
__init__(self)
+ +
licenses = methodResource(self)
A collection resource.
+ +
+Data descriptors defined here:
+
__dict__
+
dictionary for instance variables (if defined)
+
+
__weakref__
+
list of weak references to the object (if defined)
+
+
+ \ No newline at end of file diff --git a/docs/dyn/chromewebstore.v1.licenses.html b/docs/dyn/chromewebstore.v1.licenses.html new file mode 100644 index 0000000..af92a3c --- /dev/null +++ b/docs/dyn/chromewebstore.v1.licenses.html @@ -0,0 +1,32 @@ + + +Python: class Resource + +

+ + + + + + + +
 
+class Resource(__builtin__.object)
   A class for interacting with a resource.
 
 Methods defined here:
+
__init__(self)
+ +
get = method(self, **kwargs)
A description of how to use this function

+Args:
+  userId: string, A parameter (required)
+  appId: string, A parameter (required)
+ +
+Data descriptors defined here:
+
__dict__
+
dictionary for instance variables (if defined)
+
+
__weakref__
+
list of weak references to the object (if defined)
+
+
+ \ No newline at end of file diff --git a/docs/dyn/customsearch.v1.cse.html b/docs/dyn/customsearch.v1.cse.html index c783068..7cbc708 100644 --- a/docs/dyn/customsearch.v1.cse.html +++ b/docs/dyn/customsearch.v1.cse.html @@ -19,13 +19,13 @@ Args:
  sort: string, The sort expression to apply to the results
  num: string, Number of search results to return
+  start: string, The index of the first result to return
  safe: string, Search safety level
    Allowed values
      high - Enables highest level of safe search filtering.
      medium - Enables moderate safe search filtering.
      off - Disables safe search filtering.
  q: string, Query (required)
-  start: string, The index of the first result to return
  cx: string, The custom search engine ID to scope this search query
  lr: string, The language restriction for the search results
    Allowed values
diff --git a/docs/dyn/diacritize.v1.diacritize.corpus.html b/docs/dyn/diacritize.v1.diacritize.corpus.html index be7ff78..9ed825c 100644 --- a/docs/dyn/diacritize.v1.diacritize.corpus.html +++ b/docs/dyn/diacritize.v1.diacritize.corpus.html @@ -18,8 +18,8 @@  
Args:
  lang: string, Language of the message (required)
-  message: string, Message to be diacritized (required)
-  last_letter: boolean, Flag to indicate whether the last letter in a word should be diacritized or not (required)

+  last_letter: boolean, Flag to indicate whether the last letter in a word should be diacritized or not (required)
+  message: string, Message to be diacritized (required)

Data descriptors defined here:
diff --git a/docs/dyn/moderator.v1.responses.html b/docs/dyn/moderator.v1.responses.html index d5f7c7e..48a487a 100644 --- a/docs/dyn/moderator.v1.responses.html +++ b/docs/dyn/moderator.v1.responses.html @@ -18,9 +18,9 @@  
Args:
  seriesId: integer, The decimal ID of the Series. (required)
-  body: object, The request body. (required)
  topicId: integer, The decimal ID of the Topic within the Series. (required)
  parentSubmissionId: integer, The decimal ID of the parent Submission within the Series. (required)
+  body: object, The request body. (required)
  anonymous: boolean, Set to true to mark the new submission as anonymous.
list = method(self, **kwargs)
Lists or searches the responses for the specified submission within the specified series and returns the search results.
diff --git a/docs/dyn/moderator.v1.series.submissions.html b/docs/dyn/moderator.v1.series.submissions.html index d1ef85c..8dec541 100644 --- a/docs/dyn/moderator.v1.series.submissions.html +++ b/docs/dyn/moderator.v1.series.submissions.html @@ -19,6 +19,7 @@ Args:
  lang: string, The language code for the language the client prefers resuls in.
  seriesId: integer, The decimal ID of the Series. (required)
+  includeVotes: boolean, Specifies whether to include the current user's vote
  author: string, Restricts the results to submissions by a specific author.
  sort: string, Sort order.
  max_results: integer, Maximum number of results to return.
diff --git a/docs/dyn/moderator.v1.submissions.html b/docs/dyn/moderator.v1.submissions.html index 4cc5493..622cc24 100644 --- a/docs/dyn/moderator.v1.submissions.html +++ b/docs/dyn/moderator.v1.submissions.html @@ -19,6 +19,7 @@ Args:
  lang: string, The language code for the language the client prefers resuls in.
  seriesId: integer, The decimal ID of the Series. (required)
+  includeVotes: boolean, Specifies whether to include the current user's vote
  submissionId: integer, The decimal ID of the Submission within the Series. (required)
insert = method(self, **kwargs)
Inserts a new submission in the specified topic within the specified series.
diff --git a/docs/dyn/moderator.v1.topics.submissions.html b/docs/dyn/moderator.v1.topics.submissions.html index 064f595..8283e3c 100644 --- a/docs/dyn/moderator.v1.topics.submissions.html +++ b/docs/dyn/moderator.v1.topics.submissions.html @@ -17,14 +17,15 @@
list = method(self, **kwargs)
Searches the submissions for the specified topic within the specified series and returns the search results.
 
Args:
-  sort: string, Sort order.
  seriesId: integer, The decimal ID of the Series. (required)
-  author: string, Restricts the results to submissions by a specific author.
  topicId: integer, The decimal ID of the Topic within the Series. (required)
-  q: string, Search query.
+  includeVotes: boolean, Specifies whether to include the current user's vote
+  author: string, Restricts the results to submissions by a specific author.
+  sort: string, Sort order.
  max_results: integer, Maximum number of results to return.
-  hasAttachedVideo: boolean, Specifies whether to restrict to submissions that have videos attached.
-  start_index: integer, Index of the first result to be retrieved.
+  q: string, Search query.
+  start_index: integer, Index of the first result to be retrieved.
+  hasAttachedVideo: boolean, Specifies whether to restrict to submissions that have videos attached.

Data descriptors defined here:
diff --git a/docs/dyn/shopping.v1.products.html b/docs/dyn/shopping.v1.products.html index 6ca32d7..aee9d2d 100644 --- a/docs/dyn/shopping.v1.products.html +++ b/docs/dyn/shopping.v1.products.html @@ -17,22 +17,22 @@
get = method(self, **kwargs)
Returns a single product
 
Args:
-  productIdType: string, Type of productId (required)
-  categories_include: string, Category specification
-  thumbnails: string, Thumbnail specification
+  debug_searchResponse: boolean, Google Internal
  taxonomy: string, Merchant taxonomy
+  recommendations_useGcsConfig: boolean, This parameter is currently ignored
+  accountId: string, Merchant center account id (required)
+  source: string, Query source (required)
  recommendations_include: string, Recommendation specification
+  debug_enabled: boolean, Google Internal
+  debug_searchRequest: boolean, Google Internal
+  productId: string, Id of product (required)
+  productIdType: string, Type of productId (required)
  debug_enableLogging: boolean, Google Internal
  recommendations_enabled: boolean, Whether to return recommendation information
-  debug_enabled: boolean, Google Internal
-  source: string, Query source (required)
-  debug_searchRequest: boolean, Google Internal
  categories_enabled: boolean, Whether to return category information
-  recommendations_useGcsConfig: boolean, This parameter is currently ignored
-  productId: string, Id of product (required)
  categories_useGcsConfig: boolean, This parameter is currently ignored
-  accountId: string, Merchant center account id (required)
-  debug_searchResponse: boolean, Google Internal
+  thumbnails: string, Thumbnail specification
+  categories_include: string, Category specification
list = method(self, **kwargs)
Returns a list of products and content modules
 
@@ -47,10 +47,8 @@ Args:
  debug_rdcResponse: boolean, Google Internal
  facets_discover: string, Facets to discover
  startIndex: integer, Index (1-based) of first product to return
-  redirects_useGcsConfig: boolean, Whether to return redirect information as configured in the GCS account
  crowdBy: string, Crowding specification
  spelling_enabled: boolean, Whether to return spelling suggestions
-  sayt_enabled: boolean, Google Internal
  debug_enabled: boolean, Google Internal
  spelling_useGcsConfig: boolean, This parameter is currently ignored
  source: string, Query source (required)
@@ -70,12 +68,14 @@ Args:
  thumbnails: string, Image thumbnails specification
  language: string, Language restriction (BCP 47)
  currency: string, Currency restriction (ISO 4217)
-  country: string, Country restriction (ISO 3166)
+  sayt_enabled: boolean, Google Internal
  rankBy: string, Ranking specification
  redirects_enabled: boolean, Whether to return redirect information
  restrictBy: string, Restriction specification
  q: string, Search query
+  redirects_useGcsConfig: boolean, Whether to return redirect information as configured in the GCS account
  sayt_useGcsConfig: boolean, Google Internal
+  country: string, Country restriction (ISO 3166)
  relatedQueries_useGcsConfig: boolean, This parameter is currently ignored
  promotions_useGcsConfig: boolean, Whether to return promotion information as configured in the GCS account
diff --git a/docs/dyn/translate.v2.detections.html b/docs/dyn/translate.v2.detections.html new file mode 100644 index 0000000..59f5f59 --- /dev/null +++ b/docs/dyn/translate.v2.detections.html @@ -0,0 +1,31 @@ + + +Python: class Resource + +

+ + + + + + + +
 
+class Resource(__builtin__.object)
   A class for interacting with a resource.
 
 Methods defined here:
+
__init__(self)
+ +
list = method(self, **kwargs)
Detect the language of text.

+Args:
+  q: string, The text to detect (required) (repeated)
+ +
+Data descriptors defined here:
+
__dict__
+
dictionary for instance variables (if defined)
+
+
__weakref__
+
list of weak references to the object (if defined)
+
+
+ \ No newline at end of file diff --git a/docs/dyn/translate.v2.html b/docs/dyn/translate.v2.html index eb6500f..e834dff 100644 --- a/docs/dyn/translate.v2.html +++ b/docs/dyn/translate.v2.html @@ -14,6 +14,10 @@ Methods defined here:

__init__(self)
+
detections = methodResource(self)
A collection resource.
+ +
languages = methodResource(self)
A collection resource.
+
translations = methodResource(self)
A collection resource.

diff --git a/docs/dyn/translate.v2.languages.html b/docs/dyn/translate.v2.languages.html new file mode 100644 index 0000000..3ecb5cd --- /dev/null +++ b/docs/dyn/translate.v2.languages.html @@ -0,0 +1,31 @@ + + +Python: class Resource + +

+ + + + + + + +
 
+class Resource(__builtin__.object)
   A class for interacting with a resource.
 
 Methods defined here:
+
__init__(self)
+ +
list = method(self, **kwargs)
List the source/target languages supported by the API

+Args:
+  target: string, the language and collation in which the localized results should be returned
+ +
+Data descriptors defined here:
+
__dict__
+
dictionary for instance variables (if defined)
+
+
__weakref__
+
list of weak references to the object (if defined)
+
+
+ \ No newline at end of file diff --git a/docs/dyn/translate.v2.translations.html b/docs/dyn/translate.v2.translations.html index 84a708a..8dd749b 100644 --- a/docs/dyn/translate.v2.translations.html +++ b/docs/dyn/translate.v2.translations.html @@ -17,13 +17,13 @@

list = method(self, **kwargs)
Returns text translations from one language to another.
 
Args:
-  q: string, The text to translate (required) (repeated)
-  source: string, The source language of the text
  target: string, The target language into which the text should be translated (required)
  format: string, The format of the text
    Allowed values
      html - Specifies the input is in HTML
-      text - Specifies the input is in plain textual format
+      text - Specifies the input is in plain textual format
+  q: string, The text to translate (required) (repeated)
+  source: string, The source language of the text
Data descriptors defined here:
diff --git a/docs/dyn/urlshortener.v1.url.html b/docs/dyn/urlshortener.v1.url.html index 23a753d..47ec765 100644 --- a/docs/dyn/urlshortener.v1.url.html +++ b/docs/dyn/urlshortener.v1.url.html @@ -17,12 +17,12 @@
get = method(self, **kwargs)
Expands a short URL or gets creation time and analytics.
 
Args:
-  shortUrl: string, The short URL, including the protocol. (required)
  projection: string, Additional information to return.
    Allowed values
      ANALYTICS_CLICKS - Returns only click counts.
      ANALYTICS_TOP_STRINGS - Returns only top string counts.
-      FULL - Returns the creation timestamp and all available analytics.
+      FULL - Returns the creation timestamp and all available analytics.
+  shortUrl: string, The short URL, including the protocol. (required)
insert = method(self, **kwargs)
Creates a new short URL.
 
diff --git a/docs/httplib2.html b/docs/httplib2.html index 944ec63..8be442d 100644 --- a/docs/httplib2.html +++ b/docs/httplib2.html @@ -8,7 +8,7 @@  
 
httplib2 (version $Rev$)
index
/home/jcgregorio/projects/apiary/httplib2/__init__.py
+>index
/home/jcgregorio/projects/apiclient-release/httplib2/__init__.py

diff --git a/docs/httplib2.socks.html b/docs/httplib2.socks.html index cfcd67e..c06e9be 100644 --- a/docs/httplib2.socks.html +++ b/docs/httplib2.socks.html @@ -8,7 +8,7 @@
 
 
httplib2.socks
index
/home/jcgregorio/projects/apiary/httplib2/socks.py
+>index
/home/jcgregorio/projects/apiclient-release/httplib2/socks.py

SocksiPy - Python SOCKS module.
Version 1.00
 
diff --git a/docs/oauth2client.client.html b/docs/oauth2client.client.html index 1693061..b00aba6 100644 --- a/docs/oauth2client.client.html +++ b/docs/oauth2client.client.html @@ -8,7 +8,7 @@  
 
oauth2client.client
index
/home/jcgregorio/projects/apiary/oauth2client/client.py
+>index
/home/jcgregorio/projects/apiclient-release/oauth2client/client.py

An OAuth 2.0 client
 
Tools for interacting with OAuth 2.0 protected
@@ -622,7 +622,7 @@ Store and retrieve a single credential.
 
<

get(self)
Retrieve credential.
 
Returns:
-  apiclient.oauth.Credentials
+  oauth2client.client.Credentials
put(self, credentials)
Write a credential.
 
diff --git a/docs/oauth2client.django_orm.html b/docs/oauth2client.django_orm.html index 437b1c8..e276c28 100644 --- a/docs/oauth2client.django_orm.html +++ b/docs/oauth2client.django_orm.html @@ -8,7 +8,7 @@  
 
oauth2client.django_orm
index
/usr/local/google/home/jcgregorio/projects/apiclient/oauth2client/django_orm.py
+>index
/home/jcgregorio/projects/apiclient-release/oauth2client/django_orm.py

OAuth 2.0 utilities for Django.
 
Utilities for using OAuth 2.0 in conjunction with
@@ -62,9 +62,13 @@ the Django datastore.

Methods defined here:
contribute_to_class(self, cls, name)
-
db_type(self)
+
db_type = inner(*args, **kwargs)
-
get_db_prep_value(self, value)
+
get_db_prep_lookup = inner(*args, **kwargs)
+ +
get_db_prep_save = inner(*args, **kwargs)
+ +
get_db_prep_value = inner(*args, **kwargs)
to_python(self, value)
@@ -79,10 +83,14 @@ Methods inherited from django.db.mo
__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)
+
__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, validators=[], error_messages=None)
bind(self, fieldmapping, original, bound_field_class)
+
clean(self, value, model_instance)
Convert the value's type and run validation. Validation errors from to_python
+and validate are propagated. The correct value is returned if no error is
+raised.
+
formfield(self, form_class=<class 'django.forms.fields.CharField'>, **kwargs)
Returns a django.forms.Field instance for this database Field.
get_attname(self)
@@ -96,26 +104,31 @@ 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_prep_lookup(self, lookup_type, value)
Perform preliminary non-db specific lookup checks and conversions
+ +
get_prep_value(self, value)
Perform preliminary non-db specific value checks and conversions.
+
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.
+
run_validators(self, value)
+
save_form_data(self, instance, data)
set_attributes_from_name(self, name)
+
validate(self, value, model_instance)
Validates value and throws ValidationError. Subclasses should override
+this to provide validation logic.
+
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.
@@ -131,6 +144,8 @@ Data descriptors inherited from dja
choices
+
description
+
flatchoices
Flattened version of choices tuple.
@@ -142,6 +157,10 @@ Data and other attributes inherited from
contribute_to_class(self, cls, name)
-
db_type(self)
+
db_type = inner(*args, **kwargs)
-
get_db_prep_value(self, value)
+
get_db_prep_lookup = inner(*args, **kwargs)
+ +
get_db_prep_save = inner(*args, **kwargs)
+ +
get_db_prep_value = inner(*args, **kwargs)
to_python(self, value)
@@ -177,10 +200,14 @@ Methods inherited from django.db.mo
__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)
+
__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, validators=[], error_messages=None)
bind(self, fieldmapping, original, bound_field_class)
+
clean(self, value, model_instance)
Convert the value's type and run validation. Validation errors from to_python
+and validate are propagated. The correct value is returned if no error is
+raised.
+
formfield(self, form_class=<class 'django.forms.fields.CharField'>, **kwargs)
Returns a django.forms.Field instance for this database Field.
get_attname(self)
@@ -194,26 +221,31 @@ 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_prep_lookup(self, lookup_type, value)
Perform preliminary non-db specific lookup checks and conversions
+ +
get_prep_value(self, value)
Perform preliminary non-db specific value checks and conversions.
+
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.
+
run_validators(self, value)
+
save_form_data(self, instance, data)
set_attributes_from_name(self, name)
+
validate(self, value, model_instance)
Validates value and throws ValidationError. Subclasses should override
+this to provide validation logic.
+
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.
@@ -229,6 +261,8 @@ Data descriptors inherited from dja
choices
+
description
+
flatchoices
Flattened version of choices tuple.
@@ -240,6 +274,10 @@ Data and other attributes inherited from
 
oauth2client.fileindex
/home/jcgregorio/projects/apiary/oauth2client/file.py
+>index
/home/jcgregorio/projects/apiclient-release/oauth2client/file.py

Utilities for OAuth.
 
Utilities for making it easier to work with OAuth 2.0
diff --git a/docs/oauth2client.html b/docs/oauth2client.html index a8f23e0..6e11166 100644 --- a/docs/oauth2client.html +++ b/docs/oauth2client.html @@ -8,7 +8,7 @@  
 
oauth2client
index
/home/jcgregorio/projects/apiary/oauth2client/__init__.py
+>index
/home/jcgregorio/projects/apiclient-release/oauth2client/__init__.py

@@ -21,6 +21,7 @@ client
django_orm
file
-
tools
+
setup
+tools
\ No newline at end of file diff --git a/docs/oauth2client.tools.html b/docs/oauth2client.tools.html index d1c97ec..ddd6b29 100644 --- a/docs/oauth2client.tools.html +++ b/docs/oauth2client.tools.html @@ -8,7 +8,7 @@  
 
oauth2client.tools
index
/home/jcgregorio/projects/apiary/oauth2client/tools.py
+>index
/home/jcgregorio/projects/apiclient-release/oauth2client/tools.py

Command-line tools for authenticating via OAuth 2.0
 
Do the OAuth 2.0 Web Server dance for a command line application. Stores the
diff --git a/docs/uritemplate.html b/docs/uritemplate.html index 38598ae..3be8aeb 100644 --- a/docs/uritemplate.html +++ b/docs/uritemplate.html @@ -8,7 +8,7 @@  
 
uritemplate
index
/home/jcgregorio/projects/apiary/uritemplate/__init__.py
+>index
/home/jcgregorio/projects/apiclient-release/uritemplate/__init__.py

# Early, and incomplete implementation of -04.
#

diff --git a/oauth2client/client.py b/oauth2client/client.py index c18a0ce..3c59980 100644 --- a/oauth2client/client.py +++ b/oauth2client/client.py @@ -1,4 +1,16 @@ -# Copyright 2010 Google Inc. All Rights Reserved. +# Copyright (C) 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """An OAuth 2.0 client diff --git a/oauth2client/django_orm.py b/oauth2client/django_orm.py index 18a4a28..2f32faa 100644 --- a/oauth2client/django_orm.py +++ b/oauth2client/django_orm.py @@ -1,4 +1,16 @@ -# Copyright 2010 Google Inc. All Rights Reserved. +# Copyright (C) 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """OAuth 2.0 utilities for Django. diff --git a/oauth2client/file.py b/oauth2client/file.py index b72e3c5..da666c4 100644 --- a/oauth2client/file.py +++ b/oauth2client/file.py @@ -1,4 +1,16 @@ -# Copyright 2010 Google Inc. All Rights Reserved. +# Copyright (C) 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Utilities for OAuth. diff --git a/samples/api-python-client-doc/main.py b/samples/api-python-client-doc/main.py index 1315c7f..df0209a 100755 --- a/samples/api-python-client-doc/main.py +++ b/samples/api-python-client-doc/main.py @@ -17,7 +17,6 @@ __author__ = 'jcgregorio@google.com (Joe Gregorio)' - import httplib2 import inspect import os diff --git a/samples/buzz/buzz.py b/samples/buzz/buzz.py index 74ee3a4..3d657b9 100644 --- a/samples/buzz/buzz.py +++ b/samples/buzz/buzz.py @@ -1,12 +1,36 @@ #!/usr/bin/python2.4 # -*- coding: utf-8 -*- # -# Copyright 2010 Google Inc. All Rights Reserved. +# Copyright (C) 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Simple command-line example for Buzz. -Command-line application that retrieves the users -latest content and then adds a new entry. +Command-line application that retrieves the users latest content and then adds +a new entry. + +Usage: + $ python buzz.py.py + +You can also get help on all the command-line flags the program understands +by running: + + $ python buzz.py.py --help + +To get detailed log output run: + + $ python buzz.py.py --logging_level=DEBUG """ __author__ = 'jcgregorio@google.com (Joe Gregorio)' @@ -23,35 +47,55 @@ from oauth2client.client import OAuth2WebServerFlow from oauth2client.tools import run FLAGS = gflags.FLAGS + +# Set up a Flow object to be used if we need to authenticate. This +# sample uses OAuth 2.0, and we set up the OAuth2WebServerFlow with +# the information it needs to authenticate. Note that it is called +# the Web Server Flow, but it can also handle the flow for native +# applications +# The client_id client_secret are copied from the Identity tab on +# the Google APIs Console FLOW = OAuth2WebServerFlow( client_id='433807057907.apps.googleusercontent.com', client_secret='jigtZpMApkRxncxikFpR+SFg', scope='https://www.googleapis.com/auth/buzz', user_agent='buzz-cmdline-sample/1.0') +# The gflags module makes defining command-line options easy for +# applications. Run this program with the '--help' argument to see +# all the flags that it understands. gflags.DEFINE_enum('logging_level', 'ERROR', ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'], 'Set the level of logging detail.') def main(argv): + # Let the gflags module process the command-line arguments try: argv = FLAGS(argv) except gflags.FlagsError, e: print '%s\\nUsage: %s ARGS\\n%s' % (e, argv[0], FLAGS) sys.exit(1) + # Set the logging according to the command-line flag logging.getLogger().setLevel(getattr(logging, FLAGS.logging_level)) + # If the Credentials don't exist or are invalid run through the native client + # flow. The Storage object will ensure that if successful the good + # Credentials will get written back to a file. storage = Storage('buzz.dat') credentials = storage.get() if credentials is None or credentials.invalid == True: credentials = run(FLOW, storage) + # Create an httplib2.Http object to handle our HTTP requests and authorize it + # with our good Credentials. http = httplib2.Http() http = credentials.authorize(http) - # Build the Buzz service + # Build a service object for interacting with the API. Visit + # the Google APIs Console + # to get a developerKey for your own application. service = build("buzz", "v1", http=http, developerKey="AIzaSyDRRpR3GS1F1_jKNNM9HCNd2wJQyPG3oN0") activities = service.activities() diff --git a/samples/moderator/moderator.py b/samples/moderator/moderator.py index be62a1f..f77534a 100644 --- a/samples/moderator/moderator.py +++ b/samples/moderator/moderator.py @@ -1,7 +1,19 @@ #!/usr/bin/python2.4 # -*- coding: utf-8 -*- # -# Copyright 2010 Google Inc. All Rights Reserved. +# Copyright (C) 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Simple command-line example for Moderator. @@ -82,8 +94,11 @@ def main(argv): http = httplib2.Http(cache=".cache") http = credentials.authorize(http) - # Build a service object for interacting with the API. - service = build("moderator", "v1", http=http) + # Build a service object for interacting with the API. Visit + # the Google APIs Console + # to get a developerKey for your own application. + service = build("moderator", "v1", http=http, + developerKey="AIzaSyDRRpR3GS1F1_jKNNM9HCNd2wJQyPG3oN0") # Create a new Moderator series. series_body = {