Update docs re: api_method + allow options in array-style calls
[arvados.git] / lib / google / api_client.rb
index 4856bde042a14ad42baa17f377ea55bdd4588cb0..88489ba29238e658b564f91c9c4cb8d7394811b0 100644 (file)
@@ -487,8 +487,6 @@ module Google
     #   - (String) body: The body of the request.
     #   - (Hash, Array) headers: The HTTP headers for the request.
     #   - (Hash) options: A set of options for the request, of which:
-    #     - (String) :version (default: "v1") -
-    #       The service version. Only used if `api_method` is a `String`.
     #     - (#generate_authenticated_request) :authorization (default: true) -
     #       The authorization mechanism for the response. Used only if
     #       `:authenticated` is `true`.
@@ -529,7 +527,7 @@ module Google
         options[:parameters] = params.shift if params.size > 0
         options[:body] = params.shift if params.size > 0
         options[:headers] = params.shift if params.size > 0
-        options[:client] = self
+        options.update(params.shift) if params.size > 0
         request = self.generate_request(options)
       end