Sha256: fe9ee83b0294375fc4c14f4f8d00984cc150540d8d22d2ee52d4ae06b5e0612c

Contents?: true

Size: 1.01 KB

Versions: 7

Compression:

Stored size: 1.01 KB

Contents

# Curations API - https://swiftype.com/documentation/app-search/api/curations
module Elastic
  module AppSearch
    class Client
      module Curations

        # Retrieve available curations for the engine.
        def list_curations(engine_name, current: 1, size: 20)
          get("engines/#{engine_name}/curations", :page => { :current => current, :size => size })
        end

        # Create a new curation.
        def create_curation(engine_name, options)
          post("engines/#{engine_name}/curations", options)
        end

        # Retrieve a curation by id.
        def get_curation(engine_name, id)
          get("engines/#{engine_name}/curations/#{id}")
        end

        # Update an existing curation.
        def update_curation(engine_name, id, options)
          put("engines/#{engine_name}/curations/#{id}", options)
        end

        # Delete a curation by id.
        def destroy_curation(engine_name, id)
          delete("engines/#{engine_name}/curations/#{id}")
        end

      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
elastic-app-search-7.10.0 lib/elastic/app-search/client/curations.rb
elastic-app-search-7.9.0 lib/elastic/app-search/client/curations.rb
elastic-app-search-7.8.0 lib/elastic/app-search/client/curations.rb
elastic-app-search-7.7.0 lib/elastic/app-search/client/curations.rb
elastic-app-search-7.6.0 lib/elastic/app-search/client/curations.rb
elastic-app-search-7.5.0 lib/elastic/app-search/client/curations.rb
elastic-app-search-7.4.1 lib/elastic/app-search/client/curations.rb