Module: Elasticsearch::API::Tasks::Actions
- Included in:
- TasksClient
- Defined in:
- lib/elasticsearch/api/namespace/tasks.rb,
lib/elasticsearch/api/actions/tasks/get.rb,
lib/elasticsearch/api/actions/tasks/list.rb,
lib/elasticsearch/api/actions/tasks/cancel.rb,
lib/elasticsearch/api/actions/tasks/params_registry.rb
Defined Under Namespace
Modules: ParamsRegistry
Instance Method Summary collapse
Instance Method Details
#cancel(arguments = {}) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/elasticsearch/api/actions/tasks/cancel.rb', line 19 def cancel(arguments = {}) arguments = arguments.clone _task_id = arguments.delete(:task_id) method = Elasticsearch::API::HTTP_POST path = if _task_id "_tasks/#{Utils.__listify(_task_id)}/_cancel" else "_tasks/_cancel" end params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body).body end |
#get(arguments = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/elasticsearch/api/actions/tasks/get.rb', line 18 def get(arguments = {}) arguments = arguments.clone _task_id = arguments.delete(:task_id) method = Elasticsearch::API::HTTP_GET path = "_tasks/#{Utils.__listify(_task_id)}" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body).body end |
#list(arguments = {}) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/elasticsearch/api/actions/tasks/list.rb', line 24 def list(arguments = {}) arguments = arguments.clone method = Elasticsearch::API::HTTP_GET path = "_tasks" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body).body end |