lib/elastic/workplace-search/api/synonym_set.rb in elastic-enterprise-search-7.17.1 vs lib/elastic/workplace-search/api/synonym_set.rb in elastic-enterprise-search-8.0.0.pre
- old
+ new
@@ -22,27 +22,25 @@
module WorkplaceSearch
module Actions
# Synonyms - Retrieve a synonym set by ID
# Retrieve a synonym set by ID
#
- # @param arguments [Hash] endpoint arguments
+ # @param [Hash] arguments endpoint arguments
# @option arguments [String] :synonym_set_id Synonym Set ID (*Required*)
# @option arguments [Hash] :headers optional HTTP headers to send with the request
#
# @see https://www.elastic.co/guide/en/workplace-search/current/workplace-synonyms-api.html#show-synonym
#
def synonym_set(arguments = {})
raise ArgumentError, "Required parameter 'synonym_set_id' missing" unless arguments[:synonym_set_id]
- synonym_set_id = arguments[:synonym_set_id]
-
+ synonym_set_id = arguments.delete(:synonym_set_id)
headers = arguments.delete(:headers) || {}
-
request(
:get,
"api/ws/v1/synonyms/#{synonym_set_id}/",
arguments,
- {},
+ nil,
headers
)
end
end
end