class RecombeeApiClient::CreateAutoReqlSegmentation
Segment the items using a [ReQL](docs.recombee.com/reql.html) expression.
For each item, the expression should return a set that contains IDs of segments to which the item belongs to.
Attributes
Public Class Methods
-
*Required arguments*
-
segmentation_id
-> ID of the newly created Segmentation -
source_type
-> What type of data should be segmented. Currently only ‘items` are supported. -
expression
-> ReQL expression that returns for each item a set with IDs of segments to which the item belongs
-
-
*Optional arguments (given as hash optional)*
-
title
-> Human-readable name that is shown in the Recombee Admin UI. -
description
-> Description that is shown in the Recombee Admin UI.
-
# File lib/recombee_api_client/api/create_auto_reql_segmentation.rb, line 33 def initialize(segmentation_id, source_type, expression, optional = {}) @segmentation_id = segmentation_id @source_type = source_type @expression = expression optional = normalize_optional(optional) @title = optional['title'] @description = optional['description'] @optional = optional @timeout = 10000 @ensure_https = false @optional.each do |par, _| fail UnknownOptionalParameter.new(par) unless ["title","description"].include? par end end
Public Instance Methods
Values of body parameters as a Hash
# File lib/recombee_api_client/api/create_auto_reql_segmentation.rb, line 54 def body_parameters p = Hash.new p['sourceType'] = @source_type p['expression'] = @expression p['title'] = @optional['title'] if @optional.include? 'title' p['description'] = @optional['description'] if @optional.include? 'description' p end
HTTP method
# File lib/recombee_api_client/api/create_auto_reql_segmentation.rb, line 49 def method :put end
Relative path to the endpoint
# File lib/recombee_api_client/api/create_auto_reql_segmentation.rb, line 71 def path "/{databaseId}/segmentations/auto-reql/#{@segmentation_id}" end
Values of query parameters as a Hash. name of parameter => value of the parameter
# File lib/recombee_api_client/api/create_auto_reql_segmentation.rb, line 65 def query_parameters params = {} params end