Skip to content

Add a new_batch_http_request() method to services - #105

Merged
nathanielmanistaatgoogle merged 1 commit into
googleapis:masterfrom
eljobe:master
Jun 13, 2015
Merged

nathanielmanistaatgoogle merged 1 commit into
googleapis:masterfrom
eljobe:master

Conversation

@eljobe

@eljobe eljobe commented Jun 12, 2015

Copy link
Copy Markdown
Contributor

This method can be used to get a BatchHttpRequest object with the
batch_uri calculated from the rootUrl and batchPath fields from the
discovery doc.

Without this change, users have to know what the batch url for newer api
endpoints is. For example:
batch = BatchHttpRequest(batch_uri=http://zoo.googleapis.com/batch)

With this change, the syntax is easier:
zoo = build('zoo', 'v1', http=http)
batch = zoo.new_batch_http_request()

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 12, 2015
Comment thread googleapiclient/discovery.py Outdated

This comment was marked as spam.

This comment was marked as spam.

@nathanielmanistaatgoogle

Copy link
Copy Markdown
Contributor

Spelling errors on both the first and last lines of your commit message, right? Plus an erroneous second space after a period in the middle paragraph (http://www.slate.com/articles/technology/technology/2011/01/space_invaders.html).

Comment thread googleapiclient/discovery.py Outdated

This comment was marked as spam.

This comment was marked as spam.

@nathanielmanistaatgoogle

Copy link
Copy Markdown
Contributor

Given the dynamism here I'll want @craigcitro to be looking at this as well as myself.

Comment thread googleapiclient/discovery.py Outdated

This comment was marked as spam.

This comment was marked as spam.

This method can be used to get a BatchHttpRequest object with the
batch_uri calculated from the rootUrl and batchPath fields from the
discovery doc.

Without this change, users have to know what the batch url for newer api
endpoints is. For example:
batch = BatchHttpRequest(batch_uri=http://zoo.googleapis.com/batch)

With this change, the syntax is easier:
zoo = build('zoo', 'v1', http=http)
batch = zoo.new_batch_http_request()
@eljobe eljobe changed the title Add a new_batch_http_request() meethod to services Add a new_batch_http_request() method to services Jun 13, 2015
@eljobe

eljobe commented Jun 13, 2015

Copy link
Copy Markdown
Contributor Author

Took me a little while to figure out git rebase, but this now looks like a single commit like we wanted, right?

@nathanielmanistaatgoogle

Copy link
Copy Markdown
Contributor

LGTM. Any urgent need for this to be merged right away?

@craigcitro

Copy link
Copy Markdown
Contributor

LGTM

nathanielmanistaatgoogle added a commit that referenced this pull request Jun 13, 2015
Add a new_batch_http_request(callback=None) method to services.
@nathanielmanistaatgoogle
nathanielmanistaatgoogle merged commit b7f2760 into googleapis:master Jun 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants