Fix docs for batch callbacks.

Reviewed in http://codereview.appspot.com/6354092/
This commit is contained in:
Joe Gregorio
2012-07-11 14:47:39 -04:00
parent c752e33776
commit 4fbde1cbec
2 changed files with 10 additions and 5 deletions

View File

@@ -828,8 +828,10 @@ class BatchHttpRequest(object):
Args:
callback: callable, A callback to be called for each response, of the
form callback(id, response). The first parameter is the request id, and
the second is the deserialized response object.
form callback(id, response, exception). The first parameter is the
request id, and the second is the deserialized response object. The
third is an apiclient.errors.HttpError exception object if an HTTP error
occurred while processing the request, or None if no error occurred.
batch_uri: string, URI to send batch requests to.
"""
if batch_uri is None:
@@ -1030,8 +1032,10 @@ class BatchHttpRequest(object):
Args:
request: HttpRequest, Request to add to the batch.
callback: callable, A callback to be called for this response, of the
form callback(id, response). The first parameter is the request id, and
the second is the deserialized response object.
form callback(id, response, exception). The first parameter is the
request id, and the second is the deserialized response object. The
third is an apiclient.errors.HttpError exception object if an HTTP error
occurred while processing the request, or None if no errors occurred.
request_id: string, A unique id for the request. The id will be passed to
the callback with the response.

View File

@@ -51,8 +51,8 @@ from google.appengine.ext import testbed
from google.appengine.runtime import apiproxy_errors
from oauth2client.anyjson import simplejson
from oauth2client.appengine import AppAssertionCredentials
from oauth2client.appengine import FlowProperty
from oauth2client.appengine import CredentialsModel
from oauth2client.appengine import FlowProperty
from oauth2client.appengine import OAuth2Decorator
from oauth2client.appengine import OAuth2Handler
from oauth2client.appengine import StorageByKeyName
@@ -64,6 +64,7 @@ from oauth2client.client import OAuth2Credentials
from oauth2client.client import flow_from_clientsecrets
from webtest import TestApp
DATA_DIR = os.path.join(os.path.dirname(__file__), 'data')