-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
12b77c9
commit a5fe6d9
Showing
102 changed files
with
1,898 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# | ||
# This file is auto-generated, do not edit | ||
# | ||
|
||
module RecombeeApiClient | ||
require_relative 'request' | ||
require_relative '../errors' | ||
|
||
## | ||
#Adds a new Segment into a Manual ReQL Segmentation. | ||
# | ||
#The new Segment is defined by a [ReQL](https://docs.recombee.com/reql.html) filter that returns `true` for an item in case that this item belongs to the segment. | ||
# | ||
class AddManualReqlSegment < ApiRequest | ||
attr_reader :segmentation_id, :segment_id, :filter, :title | ||
attr_accessor :timeout | ||
attr_accessor :ensure_https | ||
|
||
## | ||
# * *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. | ||
# | ||
# | ||
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 | ||
|
||
# HTTP method | ||
def method | ||
:put | ||
end | ||
|
||
# Values of body parameters as a Hash | ||
def body_parameters | ||
p = Hash.new | ||
p['filter'] = @filter | ||
p['title'] = @optional['title'] if @optional.include? 'title' | ||
p | ||
end | ||
|
||
# Values of query parameters as a Hash. | ||
# name of parameter => value of the parameter | ||
def query_parameters | ||
params = {} | ||
params | ||
end | ||
|
||
# Relative path to the endpoint | ||
def path | ||
"/{databaseId}/segmentations/manual-reql/#{@segmentation_id}/segments/#{@segment_id}" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
lib/recombee_api_client/api/create_auto_reql_segmentation.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# | ||
# This file is auto-generated, do not edit | ||
# | ||
|
||
module RecombeeApiClient | ||
require_relative 'request' | ||
require_relative '../errors' | ||
|
||
## | ||
#Segment the items using a [ReQL](https://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. | ||
# | ||
class CreateAutoReqlSegmentation < ApiRequest | ||
attr_reader :segmentation_id, :source_type, :expression, :title, :description | ||
attr_accessor :timeout | ||
attr_accessor :ensure_https | ||
|
||
## | ||
# * *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. | ||
# | ||
# | ||
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 | ||
|
||
# HTTP method | ||
def method | ||
:put | ||
end | ||
|
||
# Values of body parameters as a Hash | ||
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 | ||
|
||
# Values of query parameters as a Hash. | ||
# name of parameter => value of the parameter | ||
def query_parameters | ||
params = {} | ||
params | ||
end | ||
|
||
# Relative path to the endpoint | ||
def path | ||
"/{databaseId}/segmentations/auto-reql/#{@segmentation_id}" | ||
end | ||
end | ||
end |
71 changes: 71 additions & 0 deletions
71
lib/recombee_api_client/api/create_manual_reql_segmentation.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# | ||
# This file is auto-generated, do not edit | ||
# | ||
|
||
module RecombeeApiClient | ||
require_relative 'request' | ||
require_relative '../errors' | ||
|
||
## | ||
#Segment the items using multiple [ReQL](https://docs.recombee.com/reql.html) filters. | ||
# | ||
#Use the Add Manual ReQL Items Segment endpoint to create the individual segments. | ||
# | ||
class CreateManualReqlSegmentation < ApiRequest | ||
attr_reader :segmentation_id, :source_type, :title, :description | ||
attr_accessor :timeout | ||
attr_accessor :ensure_https | ||
|
||
## | ||
# * *Required arguments* | ||
# - +segmentation_id+ -> ID of the newly created Segmentation | ||
# - +source_type+ -> What type of data should be segmented. Currently only `items` are supported. | ||
# | ||
# | ||
# * *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. | ||
# | ||
# | ||
def initialize(segmentation_id, source_type, optional = {}) | ||
@segmentation_id = segmentation_id | ||
@source_type = source_type | ||
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 | ||
|
||
# HTTP method | ||
def method | ||
:put | ||
end | ||
|
||
# Values of body parameters as a Hash | ||
def body_parameters | ||
p = Hash.new | ||
p['sourceType'] = @source_type | ||
p['title'] = @optional['title'] if @optional.include? 'title' | ||
p['description'] = @optional['description'] if @optional.include? 'description' | ||
p | ||
end | ||
|
||
# Values of query parameters as a Hash. | ||
# name of parameter => value of the parameter | ||
def query_parameters | ||
params = {} | ||
params | ||
end | ||
|
||
# Relative path to the endpoint | ||
def path | ||
"/{databaseId}/segmentations/manual-reql/#{@segmentation_id}" | ||
end | ||
end | ||
end |
Oops, something went wrong.