class RecombeeApiClient::AddItemProperty

Adding an item property is somehow equivalent to adding a column to the table of items. The items may be characterized by various properties of different types.

Attributes

ensure_https[RW]
property_name[R]
timeout[RW]
type[R]

Public Class Methods

new(property_name, type) click to toggle source
* *Required arguments*
  - +property_name+ -> Name of the item property to be created. Currently, the following names are reserved:`id`, `itemid`, case insensitively. Also, the length of the property name must not exceed 63 characters.

  - +type+ -> Value type of the item property to be created. One of: `int`, `double`, `string`, `boolean`, `timestamp`, `set`, `image` or `imageList`.
  • `int`- Signed integer number.

  • `double` - Floating point number. It uses 64-bit base-2 format (IEEE 754 standard).

  • `string` - UTF-8 string.

  • `boolean` - true / false

  • `timestamp` - Value representing date and time.

  • `set` - Set of strings.

  • `image` - URL of an image (`jpeg`, `png` or `gif`).

  • `imageList` - List of URLs that refer to images.

# File lib/recombee_api_client/api/add_item_property.rb, line 40
def initialize(property_name, type)
  @property_name = property_name
  @type = type
  @timeout = 100000
  @ensure_https = false
end

Public Instance Methods

body_parameters() click to toggle source

Values of body parameters as a Hash

# File lib/recombee_api_client/api/add_item_property.rb, line 53
def body_parameters
  p = Hash.new
  p
end
method() click to toggle source

HTTP method

# File lib/recombee_api_client/api/add_item_property.rb, line 48
def method
  :put
end
path() click to toggle source

Relative path to the endpoint

# File lib/recombee_api_client/api/add_item_property.rb, line 67
def path
  "/{databaseId}/items/properties/#{@property_name}"
end
query_parameters() click to toggle source

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

# File lib/recombee_api_client/api/add_item_property.rb, line 60
def query_parameters
  params = {}
  params['type'] = @type
  params
end