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
ensure_https[RW]
filter[R]
segment_id[R]
segmentation_id[R]
timeout[RW]
title[R]
Public Class Methods
new(segmentation_id, segment_id, filter, optional = {})
click to toggle source
-
*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.
-
# 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
Public Instance Methods
body_parameters()
click to toggle source
Values of body parameters as a Hash
# 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
method()
click to toggle source
HTTP method
# File lib/recombee_api_client/api/add_manual_reql_segment.rb, line 45 def method :put end
path()
click to toggle source
Relative path to the endpoint
# 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
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_manual_reql_segment.rb, line 59 def query_parameters params = {} params end