Skip to content

Commit

Permalink
Merge pull request googleapis#106 from eljobe/master
Browse files Browse the repository at this point in the history
Adds a doc comment for new_batch_http_request.
  • Loading branch information
nathanielmanistaatgoogle committed Jun 14, 2015
2 parents b7f2760 + 56052ec commit b1a707c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions googleapiclient/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,19 @@ def _add_basic_methods(self, resourceDesc, rootDesc, schema):
batch_uri = '%s%s' % (
rootDesc['rootUrl'], rootDesc.get('batchPath', 'batch'))
def new_batch_http_request(callback=None):
"""Create a BatchHttpRequest object based on the discovery document.
Args:
callback: callable, A callback to be called for each response, of the
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.
Returns:
A BatchHttpRequest object based on the discovery document.
"""
return BatchHttpRequest(callback=callback, batch_uri=batch_uri)
self._set_dynamic_attr('new_batch_http_request', new_batch_http_request)

Expand Down

0 comments on commit b1a707c

Please sign in to comment.