Class: RecombeeApiClient::DeleteMoreItems

Inherits:
ApiRequest
  • Object
show all
Defined in:
lib/recombee_api_client/api/delete_more_items.rb

Overview

Deletes all the items that pass the filter.

If an item becomes obsolete/no longer available, it is meaningful to keep it in the catalog (along with all the interaction data, which are very useful) and only exclude the item from recommendations. In such a case, use ReQL filter instead of deleting the item completely.#

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HashNormalizer

#camelize, #normalize_hash_to_camel_case

Constructor Details

#initialize(filter) ⇒ DeleteMoreItems

  • Required arguments
    • filter -> A ReQL expression, which returns true for the items that shall be updated.


21
22
23
24
25
# File 'lib/recombee_api_client/api/delete_more_items.rb', line 21

def initialize(filter)
  @filter = filter
  @timeout = 100_000
  @ensure_https = false
end

Instance Attribute Details

#ensure_httpsObject

Returns the value of attribute ensure_https.



15
16
17
# File 'lib/recombee_api_client/api/delete_more_items.rb', line 15

def ensure_https
  @ensure_https
end

#filterObject (readonly)

Returns the value of attribute filter.



14
15
16
# File 'lib/recombee_api_client/api/delete_more_items.rb', line 14

def filter
  @filter
end

#timeoutObject

Returns the value of attribute timeout.



15
16
17
# File 'lib/recombee_api_client/api/delete_more_items.rb', line 15

def timeout
  @timeout
end

Instance Method Details

#body_parametersObject

Values of body parameters as a Hash



33
34
35
36
37
38
# File 'lib/recombee_api_client/api/delete_more_items.rb', line 33

def body_parameters
  p = {}
  p['filter'] = @filter

  p
end

#methodObject

HTTP method



28
29
30
# File 'lib/recombee_api_client/api/delete_more_items.rb', line 28

def method
  :delete
end

#pathObject

Relative path to the endpoint



47
48
49
# File 'lib/recombee_api_client/api/delete_more_items.rb', line 47

def path
  '/{databaseId}/more-items/'
end

#query_parametersObject

Values of query parameters as a Hash. name of parameter => value of the parameter



42
43
44
# File 'lib/recombee_api_client/api/delete_more_items.rb', line 42

def query_parameters
  {}
end