Class: Elastic::AppSearch::Client
- Inherits:
-
Object
- Object
- Elastic::AppSearch::Client
- Includes:
- Analytics, Click, Credentials, Curations, Documents, Engines, Logs, MetaEngines, QuerySuggestion, Schema, Search, SearchSettings, SignedSearchOptions, Synonyms, Request
- Defined in:
- lib/elastic/app-search/client.rb,
lib/elastic/app-search/client/logs.rb,
lib/elastic/app-search/client/click.rb,
lib/elastic/app-search/client/schema.rb,
lib/elastic/app-search/client/search.rb,
lib/elastic/app-search/client/engines.rb,
lib/elastic/app-search/client/synonyms.rb,
lib/elastic/app-search/client/analytics.rb,
lib/elastic/app-search/client/curations.rb,
lib/elastic/app-search/client/documents.rb,
lib/elastic/app-search/client/credentials.rb,
lib/elastic/app-search/client/meta_engines.rb,
lib/elastic/app-search/client/search_settings.rb,
lib/elastic/app-search/client/query_suggestion.rb
Overview
API client for the Elastic App Search API.
Defined Under Namespace
Modules: Analytics, Click, Credentials, Curations, Documents, Engines, Logs, MetaEngines, QuerySuggestion, Schema, Search, SearchSettings, SignedSearchOptions, Synonyms
Constant Summary collapse
- DEFAULT_TIMEOUT =
15
Constants included from SignedSearchOptions
SignedSearchOptions::ALGORITHM
Constants included from MetaEngines
Instance Attribute Summary collapse
-
#api_endpoint ⇒ Object
readonly
Returns the value of attribute api_endpoint.
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#open_timeout ⇒ Object
readonly
Returns the value of attribute open_timeout.
-
#overall_timeout ⇒ Object
readonly
Returns the value of attribute overall_timeout.
Attributes included from Request
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
Create a new Elastic::AppSearch::Client client.
Methods included from QuerySuggestion
Methods included from Synonyms
#create_synonym_set, #destroy_synonym_set, #get_synonym_set, #list_synonym_sets, #update_synonym_set
Methods included from SignedSearchOptions
Methods included from SearchSettings
#reset_settings, #show_settings, #update_settings
Methods included from Search
Methods included from Schema
Methods included from Logs
Methods included from MetaEngines
#add_meta_engine_sources, #create_meta_engine, #delete_meta_engine_sources
Methods included from Engines
#create_engine, #destroy_engine, #get_engine, #list_engines
Methods included from Documents
#destroy_documents, #get_documents, #index_document, #index_documents, #list_documents, #update_documents
Methods included from Curations
#create_curation, #destroy_curation, #get_curation, #list_curations, #update_curation
Methods included from Credentials
#create_credential, #destroy_credential, #get_credential, #list_credentials, #update_credential
Methods included from Click
Methods included from Analytics
#get_count_analytics, #get_top_clicks_analytics, #get_top_queries_analytics
Methods included from Request
#delete, #get, #patch, #post, #put, #request
Constructor Details
#initialize(options = {}) ⇒ Client
Create a new Elastic::AppSearch::Client client
38 39 40 41 42 43 |
# File 'lib/elastic/app-search/client.rb', line 38 def initialize( = {}) @api_endpoint = .fetch(:api_endpoint) { "https://#{options.fetch(:account_host_key) { options.fetch(:host_identifier) }}.api.swiftype.com/api/as/v1/" } @api_key = .fetch(:api_key) @open_timeout = .fetch(:open_timeout, DEFAULT_TIMEOUT).to_f @overall_timeout = .fetch(:overall_timeout, DEFAULT_TIMEOUT).to_f end |
Instance Attribute Details
#api_endpoint ⇒ Object (readonly)
Returns the value of attribute api_endpoint.
28 29 30 |
# File 'lib/elastic/app-search/client.rb', line 28 def api_endpoint @api_endpoint end |
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
28 29 30 |
# File 'lib/elastic/app-search/client.rb', line 28 def api_key @api_key end |
#open_timeout ⇒ Object (readonly)
Returns the value of attribute open_timeout.
28 29 30 |
# File 'lib/elastic/app-search/client.rb', line 28 def open_timeout @open_timeout end |
#overall_timeout ⇒ Object (readonly)
Returns the value of attribute overall_timeout.
28 29 30 |
# File 'lib/elastic/app-search/client.rb', line 28 def overall_timeout @overall_timeout end |