Sha256: 3758104634947481a115e042b718da8947fc04a6a2b86e32f7223a6fb92a2e33

Contents?: true

Size: 885 Bytes

Versions: 7

Compression:

Stored size: 885 Bytes

Contents

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

        # Retrieve available credentials
        def list_credentials(current: 1, size: 20)
          get("credentials", :page => { :current => current, :size => size })
        end

        # Retrieve a credential
        def get_credential(name)
          get("credentials/#{name}")
        end

        # Create a new credential
        def create_credential(options)
          post("credentials", options)
        end

        # Update an existing credential
        def update_credential(name, options)
          put("credentials/#{name}", options)
        end

        # Destroy an existing credential
        def destroy_credential(name)
          delete("credentials/#{name}")
        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/credentials.rb
elastic-app-search-7.9.0 lib/elastic/app-search/client/credentials.rb
elastic-app-search-7.8.0 lib/elastic/app-search/client/credentials.rb
elastic-app-search-7.7.0 lib/elastic/app-search/client/credentials.rb
elastic-app-search-7.6.0 lib/elastic/app-search/client/credentials.rb
elastic-app-search-7.5.0 lib/elastic/app-search/client/credentials.rb
elastic-app-search-7.4.1 lib/elastic/app-search/client/credentials.rb