lib/elastic/app-search/api/crawler_domain.rb in elastic-enterprise-search-7.17.1 vs lib/elastic/app-search/api/crawler_domain.rb in elastic-enterprise-search-8.0.0.pre
- old
+ new
@@ -22,30 +22,28 @@
module AppSearch
module Actions
# Crawler - Get domain configuration
# Returns crawler domain configuration details
#
- # @param engine_name [String] Name of the engine (*Required*)
- # @param arguments [Hash] endpoint arguments
+ # @param [String] engine_name Name of the engine (*Required*)
+ # @param [Hash] arguments endpoint arguments
# @option arguments [String] :domain_id Crawler Domain ID (*Required*)
- # @option arguments [Hash] :body The request body
# @option arguments [Hash] :headers optional HTTP headers to send with the request
#
# @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-get-crawler-domain
#
def crawler_domain(engine_name, arguments = {})
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
raise ArgumentError, "Required parameter 'domain_id' missing" unless arguments[:domain_id]
- domain_id = arguments[:domain_id]
- body = arguments.delete(:body) || {}
- headers = arguments.delete(:headers) || {}
+ domain_id = arguments.delete(:domain_id)
+ headers = arguments.delete(:headers) || {}
request(
:get,
- "api/as/v0/engines/#{engine_name}/crawler/domains/#{domain_id}/",
+ "api/as/v1/engines/#{engine_name}/crawler/domains/#{domain_id}/",
arguments,
- body,
+ nil,
headers
)
end
end
end