Class: Typesense::Operations

Inherits:
Object
  • Object
show all
Defined in:
lib/typesense/operations.rb

Constant Summary collapse

RESOURCE_PATH =
'/operations'

Instance Method Summary collapse

Constructor Details

#initialize(api_call) ⇒ Operations

Returns a new instance of Operations.



7
8
9
# File 'lib/typesense/operations.rb', line 7

def initialize(api_call)
  @api_call = api_call
end

Instance Method Details

#perform(operation_name, query_params = {}) ⇒ Object



11
12
13
# File 'lib/typesense/operations.rb', line 11

def perform(operation_name, query_params = {})
  @api_call.post("#{RESOURCE_PATH}/#{operation_name}", {}, query_params)
end