class RecombeeApiClient::AddManualReqlSegment
Adds a new Segment into a Manual ReQL Segmentation.
The new Segment is defined by a [ReQL](docs.recombee.com/reql.html) filter that returns ‘true` for an item in case that this item belongs to the segment.
Attributes
Public Class Methods
Source
# File lib/recombee_api_client/api/add_manual_reql_segment.rb, line 30 def initialize(segmentation_id, segment_id, filter, optional = {}) @segmentation_id = segmentation_id @segment_id = segment_id @filter = filter optional = normalize_optional(optional) @title = optional['title'] @optional = optional @timeout = 10000 @ensure_https = false @optional.each do |par, _| fail UnknownOptionalParameter.new(par) unless ["title"].include? par end end
-
*Required arguments*
-
segmentation_id
-> ID of the Segmentation to which the new Segment should be added -
segment_id
-> ID of the newly created Segment -
filter
-> ReQL filter that returns ‘true` for items that belong to this Segment. Otherwise returns `false`.
-
-
*Optional arguments (given as hash optional)*
-
title
-> Human-readable name of the Segment that is shown in the Recombee Admin UI.
-
Public Instance Methods
Source
# File lib/recombee_api_client/api/add_manual_reql_segment.rb, line 50 def body_parameters p = Hash.new p['filter'] = @filter p['title'] = @optional['title'] if @optional.include? 'title' p end
Values of body parameters as a Hash
Source
# File lib/recombee_api_client/api/add_manual_reql_segment.rb, line 45 def method :put end
HTTP method
Source
# File lib/recombee_api_client/api/add_manual_reql_segment.rb, line 65 def path "/{databaseId}/segmentations/manual-reql/#{@segmentation_id}/segments/#{@segment_id}" end
Relative path to the endpoint
Source
# File lib/recombee_api_client/api/add_manual_reql_segment.rb, line 59 def query_parameters params = {} params end
Values of query parameters as a Hash. name of parameter => value of the parameter