Module: Elastic::AppSearch::Client::Curations

Included in:
Elastic::AppSearch::Client
Defined in:
lib/elastic/app-search/client/curations.rb

Instance Method Summary collapse

Instance Method Details

#create_curation(engine_name, options) ⇒ Object

Create a new curation.



13
14
15
# File 'lib/elastic/app-search/client/curations.rb', line 13

def create_curation(engine_name, options)
  post("engines/#{engine_name}/curations", options)
end

#destroy_curation(engine_name, id) ⇒ Object

Delete a curation by id.



28
29
30
# File 'lib/elastic/app-search/client/curations.rb', line 28

def destroy_curation(engine_name, id)
  delete("engines/#{engine_name}/curations/#{id}")
end

#get_curation(engine_name, id) ⇒ Object

Retrieve a curation by id.



18
19
20
# File 'lib/elastic/app-search/client/curations.rb', line 18

def get_curation(engine_name, id)
  get("engines/#{engine_name}/curations/#{id}")
end

#list_curations(engine_name, current: 1, size: 20) ⇒ Object

Retrieve available curations for the engine.



8
9
10
# File 'lib/elastic/app-search/client/curations.rb', line 8

def list_curations(engine_name, current: 1, size: 20)
  get("engines/#{engine_name}/curations", :page => { :current => current, :size => size })
end

#update_curation(engine_name, id, options) ⇒ Object

Update an existing curation.



23
24
25
# File 'lib/elastic/app-search/client/curations.rb', line 23

def update_curation(engine_name, id, options)
  put("engines/#{engine_name}/curations/#{id}", options)
end