lib/elasticsearch/api/actions/async_search/get.rb in elasticsearch-api-8.12.2 vs lib/elasticsearch/api/actions/async_search/get.rb in elasticsearch-api-8.13.0
- old
+ new
@@ -28,17 +28,16 @@
# @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response
# @option arguments [Time] :keep_alive Specify the time interval in which the results (partial or final) for this search will be available
# @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
# @option arguments [Hash] :headers Custom HTTP headers
#
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html
#
def get(arguments = {})
- request_opts = { endpoint: arguments[:endpoint] || "async_search.get" }
+ request_opts = { endpoint: arguments[:endpoint] || 'async_search.get' }
- defined_params = [:id].inject({}) do |set_variables, variable|
+ defined_params = [:id].each_with_object({}) do |variable, set_variables|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
- set_variables
end
request_opts[:defined_params] = defined_params unless defined_params.empty?
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]