Allow options when executing batch requests (#48)
This commit is contained in:
1 parent
794c6a90f7
commit
aa7a254d23
2 files changed
+18
-4
No files matched your search
@@ -542,10 +542,9 @@ module Google
|
||||
#
|
||||
# @see Google::APIClient#generate_request
|
||||
def execute(*params)
|
||||
if params.last.kind_of?(Google::APIClient::Request) &&
|
||||
params.size == 1
|
||||
request = params.pop
|
||||
options = {}
|
||||
if params.first.kind_of?(Google::APIClient::Request)
|
||||
request = params.shift
|
||||
options = params.shift || {}
|
||||
else
|
||||
# This block of code allows us to accept multiple parameter passing
|
||||
# styles, and maintaining some backwards compatibility.
|
||||
|
||||
Reference in new issue
Block a user