Class: Elastic::WorkplaceSearch::Client
- Inherits:
-
Object
- Object
- Elastic::WorkplaceSearch::Client
- Includes:
- ContentSourceDocuments, Permissions, Request
- Defined in:
- lib/elastic/workplace-search/client.rb,
lib/elastic/workplace-search/client/permissions.rb,
lib/elastic/workplace-search/client/content_source_documents.rb
Overview
API client for the Elastic Workplace Search API.
Defined Under Namespace
Modules: ContentSourceDocuments, Permissions
Constant Summary collapse
- DEFAULT_TIMEOUT =
15
Class Method Summary collapse
Instance Method Summary collapse
- #access_token ⇒ Object
-
#initialize(options = {}) ⇒ Client
constructor
Create a new Elastic::WorkplaceSearch::Client client.
- #open_timeout ⇒ Object
- #overall_timeout ⇒ Object
- #proxy ⇒ Object
Methods included from Permissions
#add_user_permissions, #get_user_permissions, #list_all_permissions, #remove_user_permissions, #update_user_permissions
Methods included from ContentSourceDocuments
#destroy_documents, #index_documents
Methods included from Request
#delete, #get, #post, #put, #request
Constructor Details
#initialize(options = {}) ⇒ Client
Create a new Elastic::WorkplaceSearch::Client client
29 30 31 |
# File 'lib/elastic/workplace-search/client.rb', line 29 def initialize( = {}) @options = end |
Class Method Details
.configure(&block) ⇒ Object
17 18 19 |
# File 'lib/elastic/workplace-search/client.rb', line 17 def self.configure(&block) Elastic::WorkplaceSearch.configure &block end |
Instance Method Details
#access_token ⇒ Object
33 34 35 |
# File 'lib/elastic/workplace-search/client.rb', line 33 def access_token @options[:access_token] || Elastic::WorkplaceSearch.access_token end |
#open_timeout ⇒ Object
37 38 39 |
# File 'lib/elastic/workplace-search/client.rb', line 37 def open_timeout @options[:open_timeout] || DEFAULT_TIMEOUT end |
#overall_timeout ⇒ Object
45 46 47 |
# File 'lib/elastic/workplace-search/client.rb', line 45 def overall_timeout (@options[:overall_timeout] || DEFAULT_TIMEOUT).to_f end |
#proxy ⇒ Object
41 42 43 |
# File 'lib/elastic/workplace-search/client.rb', line 41 def proxy @options[:proxy] end |