recombee_api_client 4.1.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +3 -3
- data/lib/recombee_api_client/api/add_bookmark.rb +1 -1
- data/lib/recombee_api_client/api/add_cart_addition.rb +1 -1
- data/lib/recombee_api_client/api/add_detail_view.rb +1 -1
- data/lib/recombee_api_client/api/add_item.rb +1 -1
- data/lib/recombee_api_client/api/add_item_property.rb +1 -1
- data/lib/recombee_api_client/api/add_manual_reql_segment.rb +1 -1
- data/lib/recombee_api_client/api/add_purchase.rb +1 -1
- data/lib/recombee_api_client/api/add_rating.rb +1 -1
- data/lib/recombee_api_client/api/add_search_synonym.rb +1 -1
- data/lib/recombee_api_client/api/add_series.rb +13 -3
- data/lib/recombee_api_client/api/add_user.rb +1 -1
- data/lib/recombee_api_client/api/add_user_property.rb +1 -1
- data/lib/recombee_api_client/api/create_auto_reql_segmentation.rb +1 -1
- data/lib/recombee_api_client/api/create_manual_reql_segmentation.rb +1 -1
- data/lib/recombee_api_client/api/delete_bookmark.rb +1 -1
- data/lib/recombee_api_client/api/delete_cart_addition.rb +1 -1
- data/lib/recombee_api_client/api/delete_detail_view.rb +1 -1
- data/lib/recombee_api_client/api/delete_item.rb +2 -2
- data/lib/recombee_api_client/api/delete_more_items.rb +3 -3
- data/lib/recombee_api_client/api/delete_purchase.rb +1 -1
- data/lib/recombee_api_client/api/delete_rating.rb +1 -1
- data/lib/recombee_api_client/api/delete_search_synonym.rb +1 -1
- data/lib/recombee_api_client/api/delete_series.rb +13 -3
- data/lib/recombee_api_client/api/delete_user.rb +1 -1
- data/lib/recombee_api_client/api/delete_view_portion.rb +1 -1
- data/lib/recombee_api_client/api/get_item_property_info.rb +1 -1
- data/lib/recombee_api_client/api/get_item_values.rb +1 -1
- data/lib/recombee_api_client/api/get_user_values.rb +1 -1
- data/lib/recombee_api_client/api/insert_to_series.rb +2 -2
- data/lib/recombee_api_client/api/list_items.rb +3 -3
- data/lib/recombee_api_client/api/{list_groups.rb → list_scenarios.rb} +5 -4
- data/lib/recombee_api_client/api/list_users.rb +3 -3
- data/lib/recombee_api_client/api/merge_users.rb +3 -0
- data/lib/recombee_api_client/api/recommend_item_segments_to_item.rb +7 -7
- data/lib/recombee_api_client/api/recommend_item_segments_to_item_segment.rb +7 -7
- data/lib/recombee_api_client/api/recommend_item_segments_to_user.rb +7 -7
- data/lib/recombee_api_client/api/recommend_items_to_item.rb +16 -16
- data/lib/recombee_api_client/api/recommend_items_to_item_segment.rb +207 -0
- data/lib/recombee_api_client/api/recommend_items_to_user.rb +15 -15
- data/lib/recombee_api_client/api/recommend_next_items.rb +4 -3
- data/lib/recombee_api_client/api/recommend_users_to_item.rb +10 -10
- data/lib/recombee_api_client/api/recommend_users_to_user.rb +13 -13
- data/lib/recombee_api_client/api/remove_from_series.rb +5 -8
- data/lib/recombee_api_client/api/search_item_segments.rb +5 -6
- data/lib/recombee_api_client/api/search_items.rb +11 -11
- data/lib/recombee_api_client/api/set_item_values.rb +1 -1
- data/lib/recombee_api_client/api/set_user_values.rb +1 -1
- data/lib/recombee_api_client/api/set_view_portion.rb +2 -2
- data/lib/recombee_api_client/api/update_more_items.rb +3 -3
- data/lib/recombee_api_client/version.rb +1 -1
- data/lib/recombee_api_client.rb +1 -1
- data/recombee_api_client.gemspec +10 -8
- metadata +25 -31
- data/lib/recombee_api_client/api/add_group.rb +0 -49
- data/lib/recombee_api_client/api/delete_group.rb +0 -52
- data/lib/recombee_api_client/api/insert_to_group.rb +0 -66
- data/lib/recombee_api_client/api/list_group_items.rb +0 -49
- data/lib/recombee_api_client/api/remove_from_group.rb +0 -55
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '01199f5f35eecc707fae959cf983926aeb1a27a0abbeba5c04d3aedacf1a750b'
|
4
|
+
data.tar.gz: 96df288201b167f39e340732398f1e084d9cf503b778b220e5fadc0638df4b76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d248ef770c97da18c94379e924ab57943dfea87b7a4f2483fc28f328623763281853362352321c8d5c25cb8b5556bbf82cf688574ded90da8e530bf611b9407c
|
7
|
+
data.tar.gz: 8c7748c00edff1a6e5459aa853d18cb743a96ec6e4b0d796ade5b6ec69cd0567fc8e3dfbda3b061141a069439e6011447e26540d41e527d1f67e6ef2104c2d02
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -29,7 +29,7 @@ Or install it yourself as:
|
|
29
29
|
require 'recombee_api_client'
|
30
30
|
include RecombeeApiClient
|
31
31
|
|
32
|
-
client = RecombeeClient('--my-database-id--', '--db-private-token--', {:region => 'us-west'})
|
32
|
+
client = RecombeeClient.new('--my-database-id--', '--db-private-token--', {:region => 'us-west'})
|
33
33
|
|
34
34
|
# Generate some random purchases of items by users
|
35
35
|
NUM = 100
|
@@ -76,7 +76,7 @@ include RecombeeApiClient
|
|
76
76
|
NUM = 100
|
77
77
|
PROBABILITY_PURCHASED = 0.1
|
78
78
|
|
79
|
-
client = RecombeeClient('--my-database-id--', '--db-private-token--', {:region => 'ap-se'})
|
79
|
+
client = RecombeeClient.new('--my-database-id--', '--db-private-token--', {:region => 'ap-se'})
|
80
80
|
client.send(ResetDatabase.new) # Clear everything from the database (asynchronous)
|
81
81
|
|
82
82
|
# We will use computers as items in this example
|
@@ -177,4 +177,4 @@ rescue ApiTimeout => e
|
|
177
177
|
rescue APIError => e
|
178
178
|
# APIError is parent of both ResponseError and ApiTimeout
|
179
179
|
end
|
180
|
-
```
|
180
|
+
```
|
@@ -34,7 +34,7 @@ module RecombeeApiClient
|
|
34
34
|
@recomm_id = optional['recommId']
|
35
35
|
@additional_data = optional['additionalData']
|
36
36
|
@optional = optional
|
37
|
-
@timeout =
|
37
|
+
@timeout = 3000
|
38
38
|
@ensure_https = false
|
39
39
|
@optional.each do |par, _|
|
40
40
|
fail UnknownOptionalParameter.new(par) unless ["timestamp","cascadeCreate","recommId","additionalData"].include? par
|
@@ -38,7 +38,7 @@ module RecombeeApiClient
|
|
38
38
|
@recomm_id = optional['recommId']
|
39
39
|
@additional_data = optional['additionalData']
|
40
40
|
@optional = optional
|
41
|
-
@timeout =
|
41
|
+
@timeout = 3000
|
42
42
|
@ensure_https = false
|
43
43
|
@optional.each do |par, _|
|
44
44
|
fail UnknownOptionalParameter.new(par) unless ["timestamp","cascadeCreate","amount","price","recommId","additionalData"].include? par
|
@@ -36,7 +36,7 @@ module RecombeeApiClient
|
|
36
36
|
@recomm_id = optional['recommId']
|
37
37
|
@additional_data = optional['additionalData']
|
38
38
|
@optional = optional
|
39
|
-
@timeout =
|
39
|
+
@timeout = 3000
|
40
40
|
@ensure_https = false
|
41
41
|
@optional.each do |par, _|
|
42
42
|
fail UnknownOptionalParameter.new(par) unless ["timestamp","duration","cascadeCreate","recommId","additionalData"].include? par
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Adding an item property is
|
10
|
+
#Adding an item property is somewhat equivalent to adding a column to the table of items. The items may be characterized by various properties of different types.
|
11
11
|
#
|
12
12
|
class AddItemProperty < ApiRequest
|
13
13
|
attr_reader :property_name, :type
|
@@ -9,7 +9,7 @@ module RecombeeApiClient
|
|
9
9
|
##
|
10
10
|
#Adds a new Segment into a Manual ReQL Segmentation.
|
11
11
|
#
|
12
|
-
#The new Segment is defined by a [ReQL](https://docs.recombee.com/reql
|
12
|
+
#The new Segment is defined by a [ReQL](https://docs.recombee.com/reql) filter that returns `true` for an item in case that this item belongs to the segment.
|
13
13
|
#
|
14
14
|
class AddManualReqlSegment < ApiRequest
|
15
15
|
attr_reader :segmentation_id, :segment_id, :filter, :title
|
@@ -40,7 +40,7 @@ module RecombeeApiClient
|
|
40
40
|
@recomm_id = optional['recommId']
|
41
41
|
@additional_data = optional['additionalData']
|
42
42
|
@optional = optional
|
43
|
-
@timeout =
|
43
|
+
@timeout = 3000
|
44
44
|
@ensure_https = false
|
45
45
|
@optional.each do |par, _|
|
46
46
|
fail UnknownOptionalParameter.new(par) unless ["timestamp","cascadeCreate","amount","price","profit","recommId","additionalData"].include? par
|
@@ -36,7 +36,7 @@ module RecombeeApiClient
|
|
36
36
|
@recomm_id = optional['recommId']
|
37
37
|
@additional_data = optional['additionalData']
|
38
38
|
@optional = optional
|
39
|
-
@timeout =
|
39
|
+
@timeout = 3000
|
40
40
|
@ensure_https = false
|
41
41
|
@optional.each do |par, _|
|
42
42
|
fail UnknownOptionalParameter.new(par) unless ["timestamp","cascadeCreate","recommId","additionalData"].include? par
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Adds a new synonym for the [Search items](https://docs.recombee.com/api
|
10
|
+
#Adds a new synonym for the [Search items](https://docs.recombee.com/api#search-items).
|
11
11
|
#
|
12
12
|
#When the `term` is used in the search query, the `synonym` is also used for the full-text search.
|
13
13
|
#Unless `oneWay=true`, it works also in the opposite way (`synonym` -> `term`).
|
@@ -9,7 +9,7 @@ module RecombeeApiClient
|
|
9
9
|
##
|
10
10
|
#Creates a new series in the database.
|
11
11
|
class AddSeries < ApiRequest
|
12
|
-
attr_reader :series_id
|
12
|
+
attr_reader :series_id, :cascade_create
|
13
13
|
attr_accessor :timeout
|
14
14
|
attr_accessor :ensure_https
|
15
15
|
|
@@ -17,10 +17,19 @@ module RecombeeApiClient
|
|
17
17
|
# * *Required arguments*
|
18
18
|
# - +series_id+ -> ID of the series to be created.
|
19
19
|
#
|
20
|
-
|
20
|
+
# * *Optional arguments (given as hash optional)*
|
21
|
+
# - +cascadeCreate+ -> If set to `true`, the item will be created with the same ID as the series. Default is `true`.
|
22
|
+
#
|
23
|
+
def initialize(series_id, optional = {})
|
21
24
|
@series_id = series_id
|
22
|
-
|
25
|
+
optional = normalize_optional(optional)
|
26
|
+
@cascade_create = optional['cascadeCreate']
|
27
|
+
@optional = optional
|
28
|
+
@timeout = 3000
|
23
29
|
@ensure_https = false
|
30
|
+
@optional.each do |par, _|
|
31
|
+
fail UnknownOptionalParameter.new(par) unless ["cascadeCreate"].include? par
|
32
|
+
end
|
24
33
|
end
|
25
34
|
|
26
35
|
# HTTP method
|
@@ -31,6 +40,7 @@ module RecombeeApiClient
|
|
31
40
|
# Values of body parameters as a Hash
|
32
41
|
def body_parameters
|
33
42
|
p = Hash.new
|
43
|
+
p['cascadeCreate'] = @optional['cascadeCreate'] if @optional.include? 'cascadeCreate'
|
34
44
|
p
|
35
45
|
end
|
36
46
|
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Adding a user property is
|
10
|
+
#Adding a user property is somewhat equivalent to adding a column to the table of users. The users may be characterized by various properties of different types.
|
11
11
|
#
|
12
12
|
class AddUserProperty < ApiRequest
|
13
13
|
attr_reader :property_name, :type
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Segment the items using a [ReQL](https://docs.recombee.com/reql
|
10
|
+
#Segment the items using a [ReQL](https://docs.recombee.com/reql) expression.
|
11
11
|
#
|
12
12
|
#For each item, the expression should return a set that contains IDs of segments to which the item belongs to.
|
13
13
|
#
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Segment the items using multiple [ReQL](https://docs.recombee.com/reql
|
10
|
+
#Segment the items using multiple [ReQL](https://docs.recombee.com/reql) filters.
|
11
11
|
#
|
12
12
|
#Use the Add Manual ReQL Items Segment endpoint to create the individual segments.
|
13
13
|
#
|
@@ -28,7 +28,7 @@ module RecombeeApiClient
|
|
28
28
|
optional = normalize_optional(optional)
|
29
29
|
@timestamp = optional['timestamp']
|
30
30
|
@optional = optional
|
31
|
-
@timeout =
|
31
|
+
@timeout = 3000
|
32
32
|
@ensure_https = false
|
33
33
|
@optional.each do |par, _|
|
34
34
|
fail UnknownOptionalParameter.new(par) unless ["timestamp"].include? par
|
@@ -28,7 +28,7 @@ module RecombeeApiClient
|
|
28
28
|
optional = normalize_optional(optional)
|
29
29
|
@timestamp = optional['timestamp']
|
30
30
|
@optional = optional
|
31
|
-
@timeout =
|
31
|
+
@timeout = 3000
|
32
32
|
@ensure_https = false
|
33
33
|
@optional.each do |par, _|
|
34
34
|
fail UnknownOptionalParameter.new(par) unless ["timestamp"].include? par
|
@@ -28,7 +28,7 @@ module RecombeeApiClient
|
|
28
28
|
optional = normalize_optional(optional)
|
29
29
|
@timestamp = optional['timestamp']
|
30
30
|
@optional = optional
|
31
|
-
@timeout =
|
31
|
+
@timeout = 3000
|
32
32
|
@ensure_https = false
|
33
33
|
@optional.each do |par, _|
|
34
34
|
fail UnknownOptionalParameter.new(par) unless ["timestamp"].include? par
|
@@ -11,7 +11,7 @@ module RecombeeApiClient
|
|
11
11
|
#
|
12
12
|
#If there are any *purchases*, *ratings*, *bookmarks*, *cart additions*, or *detail views* of the item present in the database, they will be deleted in cascade as well. Also, if the item is present in some *series*, it will be removed from all the *series* where present.
|
13
13
|
#
|
14
|
-
#If an item becomes obsolete/no longer available, it is meaningful to keep it in the catalog (along with all the interaction data, which are very useful), and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql
|
14
|
+
#If an item becomes obsolete/no longer available, it is meaningful to keep it in the catalog (along with all the interaction data, which are very useful), and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql) instead of deleting the item completely.
|
15
15
|
#
|
16
16
|
class DeleteItem < ApiRequest
|
17
17
|
attr_reader :item_id
|
@@ -24,7 +24,7 @@ module RecombeeApiClient
|
|
24
24
|
#
|
25
25
|
def initialize(item_id)
|
26
26
|
@item_id = item_id
|
27
|
-
@timeout =
|
27
|
+
@timeout = 3000
|
28
28
|
@ensure_https = false
|
29
29
|
end
|
30
30
|
|
@@ -9,7 +9,7 @@ module RecombeeApiClient
|
|
9
9
|
##
|
10
10
|
#Deletes all the items that pass the filter.
|
11
11
|
#
|
12
|
-
#If an item becomes obsolete/no longer available, it is meaningful to **keep it in the catalog** (along with all the interaction data, which are very useful) and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql
|
12
|
+
#If an item becomes obsolete/no longer available, it is meaningful to **keep it in the catalog** (along with all the interaction data, which are very useful) and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql) instead of deleting the item completely.
|
13
13
|
class DeleteMoreItems < ApiRequest
|
14
14
|
attr_reader :filter
|
15
15
|
attr_accessor :timeout
|
@@ -17,11 +17,11 @@ module RecombeeApiClient
|
|
17
17
|
|
18
18
|
##
|
19
19
|
# * *Required arguments*
|
20
|
-
# - +filter+ -> A [ReQL](https://docs.recombee.com/reql
|
20
|
+
# - +filter+ -> A [ReQL](https://docs.recombee.com/reql) expression, which returns `true` for the items that shall be updated.
|
21
21
|
#
|
22
22
|
def initialize(filter)
|
23
23
|
@filter = filter
|
24
|
-
@timeout =
|
24
|
+
@timeout = 100000
|
25
25
|
@ensure_https = false
|
26
26
|
end
|
27
27
|
|
@@ -28,7 +28,7 @@ module RecombeeApiClient
|
|
28
28
|
optional = normalize_optional(optional)
|
29
29
|
@timestamp = optional['timestamp']
|
30
30
|
@optional = optional
|
31
|
-
@timeout =
|
31
|
+
@timeout = 3000
|
32
32
|
@ensure_https = false
|
33
33
|
@optional.each do |par, _|
|
34
34
|
fail UnknownOptionalParameter.new(par) unless ["timestamp"].include? par
|
@@ -28,7 +28,7 @@ module RecombeeApiClient
|
|
28
28
|
optional = normalize_optional(optional)
|
29
29
|
@timestamp = optional['timestamp']
|
30
30
|
@optional = optional
|
31
|
-
@timeout =
|
31
|
+
@timeout = 3000
|
32
32
|
@ensure_https = false
|
33
33
|
@optional.each do |par, _|
|
34
34
|
fail UnknownOptionalParameter.new(par) unless ["timestamp"].include? par
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Deletes synonym of the given `id`. This synonym is no longer taken into account in the [Search items](https://docs.recombee.com/api
|
10
|
+
#Deletes synonym of the given `id`. This synonym is no longer taken into account in the [Search items](https://docs.recombee.com/api#search-items).
|
11
11
|
#
|
12
12
|
class DeleteSearchSynonym < ApiRequest
|
13
13
|
attr_reader :id
|
@@ -12,7 +12,7 @@ module RecombeeApiClient
|
|
12
12
|
#Deleting a series will only delete assignment of items to it, not the items themselves!
|
13
13
|
#
|
14
14
|
class DeleteSeries < ApiRequest
|
15
|
-
attr_reader :series_id
|
15
|
+
attr_reader :series_id, :cascade_delete
|
16
16
|
attr_accessor :timeout
|
17
17
|
attr_accessor :ensure_https
|
18
18
|
|
@@ -20,10 +20,19 @@ module RecombeeApiClient
|
|
20
20
|
# * *Required arguments*
|
21
21
|
# - +series_id+ -> ID of the series to be deleted.
|
22
22
|
#
|
23
|
-
|
23
|
+
# * *Optional arguments (given as hash optional)*
|
24
|
+
# - +cascadeDelete+ -> If set to `true`, item with the same ID as seriesId will be also deleted. Default is `false`.
|
25
|
+
#
|
26
|
+
def initialize(series_id, optional = {})
|
24
27
|
@series_id = series_id
|
25
|
-
|
28
|
+
optional = normalize_optional(optional)
|
29
|
+
@cascade_delete = optional['cascadeDelete']
|
30
|
+
@optional = optional
|
31
|
+
@timeout = 3000
|
26
32
|
@ensure_https = false
|
33
|
+
@optional.each do |par, _|
|
34
|
+
fail UnknownOptionalParameter.new(par) unless ["cascadeDelete"].include? par
|
35
|
+
end
|
27
36
|
end
|
28
37
|
|
29
38
|
# HTTP method
|
@@ -34,6 +43,7 @@ module RecombeeApiClient
|
|
34
43
|
# Values of body parameters as a Hash
|
35
44
|
def body_parameters
|
36
45
|
p = Hash.new
|
46
|
+
p['cascadeDelete'] = @optional['cascadeDelete'] if @optional.include? 'cascadeDelete'
|
37
47
|
p
|
38
48
|
end
|
39
49
|
|
@@ -28,7 +28,7 @@ module RecombeeApiClient
|
|
28
28
|
optional = normalize_optional(optional)
|
29
29
|
@session_id = optional['sessionId']
|
30
30
|
@optional = optional
|
31
|
-
@timeout =
|
31
|
+
@timeout = 3000
|
32
32
|
@ensure_https = false
|
33
33
|
@optional.each do |par, _|
|
34
34
|
fail UnknownOptionalParameter.new(par) unless ["sessionId"].include? par
|
@@ -22,7 +22,7 @@ module RecombeeApiClient
|
|
22
22
|
# - +time+ -> Time index used for sorting items in the series. According to time, items are sorted within series in ascending order. In the example of TV show episodes, the episode number is a natural choice to be passed as time.
|
23
23
|
#
|
24
24
|
# * *Optional arguments (given as hash optional)*
|
25
|
-
# - +cascadeCreate+ -> Indicates that any non-existing entity specified within the request should be created (as if corresponding PUT requests were invoked). This concerns both the `seriesId` and the `itemId`. If `cascadeCreate` is set to true, the behavior also depends on the `itemType`.
|
25
|
+
# - +cascadeCreate+ -> Indicates that any non-existing entity specified within the request should be created (as if corresponding PUT requests were invoked). This concerns both the `seriesId` and the `itemId`. If `cascadeCreate` is set to true, the behavior also depends on the `itemType`. In case of `item`, an item is created, in case of `series` a series + corresponding item with the same ID is created.
|
26
26
|
#
|
27
27
|
def initialize(series_id, item_type, item_id, time, optional = {})
|
28
28
|
@series_id = series_id
|
@@ -32,7 +32,7 @@ module RecombeeApiClient
|
|
32
32
|
optional = normalize_optional(optional)
|
33
33
|
@cascade_create = optional['cascadeCreate']
|
34
34
|
@optional = optional
|
35
|
-
@timeout =
|
35
|
+
@timeout = 3000
|
36
36
|
@ensure_https = false
|
37
37
|
@optional.each do |par, _|
|
38
38
|
fail UnknownOptionalParameter.new(par) unless ["cascadeCreate"].include? par
|
@@ -16,13 +16,13 @@ module RecombeeApiClient
|
|
16
16
|
##
|
17
17
|
#
|
18
18
|
# * *Optional arguments (given as hash optional)*
|
19
|
-
# - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql
|
19
|
+
# - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter items to be listed. Only the items for which the expression is *true* will be returned.
|
20
20
|
# - +count+ -> The number of items to be listed.
|
21
21
|
# - +offset+ -> Specifies the number of items to skip (ordered by `itemId`).
|
22
22
|
# - +returnProperties+ -> With `returnProperties=true`, property values of the listed items are returned along with their IDs in a JSON dictionary.
|
23
23
|
#
|
24
24
|
#Example response:
|
25
|
-
#```
|
25
|
+
#```json
|
26
26
|
# [
|
27
27
|
# {
|
28
28
|
# "itemId": "tv-178",
|
@@ -44,7 +44,7 @@ module RecombeeApiClient
|
|
44
44
|
# - +includedProperties+ -> Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
|
45
45
|
#
|
46
46
|
#Example response for `includedProperties=description,price`:
|
47
|
-
#```
|
47
|
+
#```json
|
48
48
|
# [
|
49
49
|
# {
|
50
50
|
# "itemId": "tv-178",
|
@@ -7,8 +7,9 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
11
|
-
|
10
|
+
#Get all [Scenarios](https://docs.recombee.com/scenarios) of the given database.
|
11
|
+
#
|
12
|
+
class ListScenarios < ApiRequest
|
12
13
|
|
13
14
|
attr_accessor :timeout
|
14
15
|
attr_accessor :ensure_https
|
@@ -16,7 +17,7 @@ module RecombeeApiClient
|
|
16
17
|
##
|
17
18
|
#
|
18
19
|
def initialize()
|
19
|
-
@timeout =
|
20
|
+
@timeout = 10000
|
20
21
|
@ensure_https = false
|
21
22
|
end
|
22
23
|
|
@@ -40,7 +41,7 @@ module RecombeeApiClient
|
|
40
41
|
|
41
42
|
# Relative path to the endpoint
|
42
43
|
def path
|
43
|
-
"/{databaseId}/
|
44
|
+
"/{databaseId}/scenarios/"
|
44
45
|
end
|
45
46
|
end
|
46
47
|
end
|
@@ -16,13 +16,13 @@ module RecombeeApiClient
|
|
16
16
|
##
|
17
17
|
#
|
18
18
|
# * *Optional arguments (given as hash optional)*
|
19
|
-
# - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql
|
19
|
+
# - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter users to be listed. Only the users for which the expression is *true* will be returned.
|
20
20
|
# - +count+ -> The number of users to be listed.
|
21
21
|
# - +offset+ -> Specifies the number of users to skip (ordered by `userId`).
|
22
22
|
# - +returnProperties+ -> With `returnProperties=true`, property values of the listed users are returned along with their IDs in a JSON dictionary.
|
23
23
|
#
|
24
24
|
#Example response:
|
25
|
-
#```
|
25
|
+
#```json
|
26
26
|
# [
|
27
27
|
# {
|
28
28
|
# "userId": "user-81",
|
@@ -40,7 +40,7 @@ module RecombeeApiClient
|
|
40
40
|
# - +includedProperties+ -> Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
|
41
41
|
#
|
42
42
|
#Example response for `includedProperties=country`:
|
43
|
-
#```
|
43
|
+
#```json
|
44
44
|
# [
|
45
45
|
# {
|
46
46
|
# "userId": "user-81",
|
@@ -12,6 +12,9 @@ module RecombeeApiClient
|
|
12
12
|
#
|
13
13
|
#Merging happens between two users referred to as the *target* and the *source*. After the merge, all the interactions of the source user are attributed to the target user, and the source user is **deleted**.
|
14
14
|
#
|
15
|
+
#By default, the *Merge Users* request is only available from server-side integrations for security reasons, to prevent potential abuse.
|
16
|
+
#If you need to call this request from a client-side environment (such as a web or mobile app), please contact our support and request access to enable this feature for your database.
|
17
|
+
#
|
15
18
|
class MergeUsers < ApiRequest
|
16
19
|
attr_reader :target_user_id, :source_user_id, :cascade_create
|
17
20
|
attr_accessor :timeout
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Recommends Segments from a Segmentation that are the most relevant to a particular item.
|
10
|
+
#Recommends Segments from a [Segmentation](https://docs.recombee.com/segmentations) that are the most relevant to a particular item.
|
11
11
|
#
|
12
12
|
#Based on the used Segmentation, this endpoint can be used for example for:
|
13
13
|
#
|
@@ -16,7 +16,7 @@ module RecombeeApiClient
|
|
16
16
|
# - Recommending the related brands
|
17
17
|
# - Recommending the related artists
|
18
18
|
#
|
19
|
-
#You need to set the used Segmentation the Admin UI in the Scenario settings prior to using this endpoint.
|
19
|
+
#You need to set the used Segmentation the Admin UI in the [Scenario settings](https://docs.recombee.com/scenarios) prior to using this endpoint.
|
20
20
|
#
|
21
21
|
#The returned segments are sorted by relevance (first segment being the most relevant).
|
22
22
|
#
|
@@ -54,22 +54,22 @@ module RecombeeApiClient
|
|
54
54
|
# * *Optional arguments (given as hash optional)*
|
55
55
|
# - +scenario+ -> Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
56
56
|
#
|
57
|
-
#You can set various settings to the [scenario](https://docs.recombee.com/scenarios
|
57
|
+
#You can set various settings to the [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs.
|
58
58
|
#
|
59
59
|
#The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios.
|
60
60
|
#
|
61
61
|
# - +cascadeCreate+ -> If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system.
|
62
62
|
#
|
63
|
-
# - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql
|
63
|
+
# - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql) expression which allows you to filter recommended segments based on the `segmentationId`.
|
64
64
|
#
|
65
|
-
# - +booster+ -> Number-returning [ReQL](https://docs.recombee.com/reql
|
65
|
+
# - +booster+ -> Number-returning [ReQL](https://docs.recombee.com/reql) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`.
|
66
66
|
#
|
67
67
|
# - +logic+ -> Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
68
|
-
#See [this section](https://docs.recombee.com/recommendation_logics
|
68
|
+
#See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
|
69
69
|
#
|
70
70
|
#The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
|
71
71
|
#
|
72
|
-
#Logic can also be set to a [scenario](https://docs.recombee.com/scenarios
|
72
|
+
#Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
73
73
|
#
|
74
74
|
# - +expertSettings+ -> Dictionary of custom options.
|
75
75
|
#
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Recommends Segments from a result Segmentation that are the most relevant to a particular Segment from a context Segmentation.
|
10
|
+
#Recommends Segments from a result [Segmentation](https://docs.recombee.com/segmentations) that are the most relevant to a particular Segment from a context Segmentation.
|
11
11
|
#
|
12
12
|
#Based on the used Segmentations, this endpoint can be used for example for:
|
13
13
|
#
|
@@ -15,7 +15,7 @@ module RecombeeApiClient
|
|
15
15
|
# - Recommending the related brands to particular category
|
16
16
|
# - Recommending the related artists to a particular genre (assuming songs are the Items)
|
17
17
|
#
|
18
|
-
#You need to set the used context and result Segmentation the Admin UI in the Scenario settings prior to using this endpoint.
|
18
|
+
#You need to set the used context and result Segmentation the Admin UI in the [Scenario settings](https://docs.recombee.com/scenarios) prior to using this endpoint.
|
19
19
|
#
|
20
20
|
#The returned segments are sorted by relevance (first segment being the most relevant).
|
21
21
|
#
|
@@ -53,22 +53,22 @@ module RecombeeApiClient
|
|
53
53
|
# * *Optional arguments (given as hash optional)*
|
54
54
|
# - +scenario+ -> Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
55
55
|
#
|
56
|
-
#You can set various settings to the [scenario](https://docs.recombee.com/scenarios
|
56
|
+
#You can set various settings to the [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs.
|
57
57
|
#
|
58
58
|
#The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios.
|
59
59
|
#
|
60
60
|
# - +cascadeCreate+ -> If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system.
|
61
61
|
#
|
62
|
-
# - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql
|
62
|
+
# - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql) expression which allows you to filter recommended segments based on the `segmentationId`.
|
63
63
|
#
|
64
|
-
# - +booster+ -> Number-returning [ReQL](https://docs.recombee.com/reql
|
64
|
+
# - +booster+ -> Number-returning [ReQL](https://docs.recombee.com/reql) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`.
|
65
65
|
#
|
66
66
|
# - +logic+ -> Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
67
|
-
#See [this section](https://docs.recombee.com/recommendation_logics
|
67
|
+
#See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
|
68
68
|
#
|
69
69
|
#The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
|
70
70
|
#
|
71
|
-
#Logic can also be set to a [scenario](https://docs.recombee.com/scenarios
|
71
|
+
#Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
72
72
|
#
|
73
73
|
# - +expertSettings+ -> Dictionary of custom options.
|
74
74
|
#
|