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](docs.recombee.com/reql) instead of deleting the item completely.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HashNormalizer

#camelize, #normalize_optional

Constructor Details

#initialize(filter) ⇒ DeleteMoreItems

  • *Required arguments*

    • filter -> A [ReQL](docs.recombee.com/reql) expression, which returns ‘true` for the items that shall be updated.



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

def initialize(filter)
  @filter = filter
  @timeout = 100000
  @ensure_https = false
end

Instance Attribute Details

#ensure_httpsObject

Returns the value of attribute ensure_https.



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

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



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

def body_parameters
  p = Hash.new
  p['filter'] = @filter
  p
end

#methodObject

HTTP method



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

def method
  :delete
end

#pathObject

Relative path to the endpoint



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

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
45
# File 'lib/recombee_api_client/api/delete_more_items.rb', line 42

def query_parameters
  params = {}
  params
end