Class: RecombeeApiClient::ListSearchSynonyms

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

Overview

Gives the list of synonyms defined in the database.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HashNormalizer

#camelize, #normalize_optional

Constructor Details

#initialize(optional = {}) ⇒ ListSearchSynonyms

  • *Optional arguments (given as hash optional)*

    • count -> The number of synonyms to be listed.

    • offset -> Specifies the number of synonyms to skip (ordered by ‘term`).



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/recombee_api_client/api/list_search_synonyms.rb', line 22

def initialize(optional = {})
  optional = normalize_optional(optional)
  @count = optional['count']
  @offset = optional['offset']
  @optional = optional
  @timeout = 100000
  @ensure_https = false
  @optional.each do |par, _|
    fail UnknownOptionalParameter.new(par) unless ["count","offset"].include? par
  end
end

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



12
13
14
# File 'lib/recombee_api_client/api/list_search_synonyms.rb', line 12

def count
  @count
end

#ensure_httpsObject

Returns the value of attribute ensure_https.



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

def ensure_https
  @ensure_https
end

#offsetObject (readonly)

Returns the value of attribute offset.



12
13
14
# File 'lib/recombee_api_client/api/list_search_synonyms.rb', line 12

def offset
  @offset
end

#timeoutObject

Returns the value of attribute timeout.



13
14
15
# File 'lib/recombee_api_client/api/list_search_synonyms.rb', line 13

def timeout
  @timeout
end

Instance Method Details

#body_parametersObject

Values of body parameters as a Hash



40
41
42
43
# File 'lib/recombee_api_client/api/list_search_synonyms.rb', line 40

def body_parameters
  p = Hash.new
  p
end

#methodObject

HTTP method



35
36
37
# File 'lib/recombee_api_client/api/list_search_synonyms.rb', line 35

def method
  :get
end

#pathObject

Relative path to the endpoint



55
56
57
# File 'lib/recombee_api_client/api/list_search_synonyms.rb', line 55

def path
  "/{databaseId}/synonyms/items/"
end

#query_parametersObject

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



47
48
49
50
51
52
# File 'lib/recombee_api_client/api/list_search_synonyms.rb', line 47

def query_parameters
  params = {}
  params['count'] = @optional['count'] if @optional['count']
  params['offset'] = @optional['offset'] if @optional['offset']
  params
end