recombee_api_client 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/recombee_api_client/api/add_bookmark.rb +1 -1
- data/lib/recombee_api_client/api/add_cart_addition.rb +3 -3
- data/lib/recombee_api_client/api/add_detail_view.rb +1 -1
- data/lib/recombee_api_client/api/add_group.rb +1 -1
- data/lib/recombee_api_client/api/add_item.rb +2 -2
- data/lib/recombee_api_client/api/add_item_property.rb +1 -1
- data/lib/recombee_api_client/api/add_manual_reql_segment.rb +69 -0
- data/lib/recombee_api_client/api/add_purchase.rb +4 -4
- data/lib/recombee_api_client/api/add_rating.rb +1 -1
- data/lib/recombee_api_client/api/add_series.rb +1 -1
- data/lib/recombee_api_client/api/add_user_property.rb +2 -2
- data/lib/recombee_api_client/api/create_auto_reql_segmentation.rb +75 -0
- data/lib/recombee_api_client/api/create_manual_reql_segmentation.rb +71 -0
- data/lib/recombee_api_client/api/create_property_based_segmentation.rb +76 -0
- data/lib/recombee_api_client/api/delete_bookmark.rb +3 -3
- data/lib/recombee_api_client/api/delete_cart_addition.rb +3 -3
- data/lib/recombee_api_client/api/delete_detail_view.rb +3 -3
- data/lib/recombee_api_client/api/delete_group.rb +2 -2
- data/lib/recombee_api_client/api/delete_item.rb +2 -2
- data/lib/recombee_api_client/api/delete_manual_reql_segment.rb +52 -0
- data/lib/recombee_api_client/api/delete_more_items.rb +3 -3
- data/lib/recombee_api_client/api/delete_purchase.rb +3 -3
- data/lib/recombee_api_client/api/delete_rating.rb +2 -2
- data/lib/recombee_api_client/api/delete_search_synonym.rb +1 -1
- data/lib/recombee_api_client/api/delete_segmentation.rb +50 -0
- data/lib/recombee_api_client/api/delete_series.rb +1 -1
- data/lib/recombee_api_client/api/delete_user.rb +1 -1
- data/lib/recombee_api_client/api/delete_user_property.rb +1 -1
- data/lib/recombee_api_client/api/get_item_values.rb +2 -2
- data/lib/recombee_api_client/api/get_segmentation.rb +50 -0
- data/lib/recombee_api_client/api/get_user_values.rb +2 -2
- data/lib/recombee_api_client/api/insert_to_group.rb +2 -2
- data/lib/recombee_api_client/api/insert_to_series.rb +2 -2
- data/lib/recombee_api_client/api/list_group_items.rb +1 -1
- data/lib/recombee_api_client/api/list_item_bookmarks.rb +2 -2
- data/lib/recombee_api_client/api/list_item_cart_additions.rb +2 -2
- data/lib/recombee_api_client/api/list_item_detail_views.rb +2 -2
- data/lib/recombee_api_client/api/list_item_purchases.rb +2 -2
- data/lib/recombee_api_client/api/list_item_ratings.rb +2 -2
- data/lib/recombee_api_client/api/list_item_view_portions.rb +2 -2
- data/lib/recombee_api_client/api/list_items.rb +1 -1
- data/lib/recombee_api_client/api/list_segmentations.rb +51 -0
- data/lib/recombee_api_client/api/list_series_items.rb +2 -2
- data/lib/recombee_api_client/api/list_user_bookmarks.rb +1 -1
- data/lib/recombee_api_client/api/list_user_cart_additions.rb +1 -1
- data/lib/recombee_api_client/api/list_user_detail_views.rb +1 -1
- data/lib/recombee_api_client/api/list_user_purchases.rb +1 -1
- data/lib/recombee_api_client/api/list_user_ratings.rb +1 -1
- data/lib/recombee_api_client/api/list_user_view_portions.rb +1 -1
- data/lib/recombee_api_client/api/list_users.rb +1 -1
- data/lib/recombee_api_client/api/merge_users.rb +2 -2
- data/lib/recombee_api_client/api/recommend_item_segments_to_item.rb +131 -0
- data/lib/recombee_api_client/api/recommend_item_segments_to_item_segment.rb +131 -0
- data/lib/recombee_api_client/api/recommend_item_segments_to_user.rb +111 -0
- data/lib/recombee_api_client/api/recommend_items_to_item.rb +26 -26
- data/lib/recombee_api_client/api/recommend_items_to_user.rb +23 -23
- data/lib/recombee_api_client/api/recommend_next_items.rb +2 -2
- data/lib/recombee_api_client/api/recommend_users_to_item.rb +18 -18
- data/lib/recombee_api_client/api/recommend_users_to_user.rb +21 -21
- data/lib/recombee_api_client/api/reset_database.rb +1 -1
- data/lib/recombee_api_client/api/search_item_segments.rb +114 -0
- data/lib/recombee_api_client/api/search_items.rb +17 -17
- data/lib/recombee_api_client/api/set_view_portion.rb +3 -3
- data/lib/recombee_api_client/api/update_auto_reql_segmentation.rb +69 -0
- data/lib/recombee_api_client/api/update_manual_reql_segment.rb +67 -0
- data/lib/recombee_api_client/api/update_manual_reql_segmentation.rb +65 -0
- data/lib/recombee_api_client/api/update_more_items.rb +3 -3
- data/lib/recombee_api_client/api/update_property_based_segmentation.rb +69 -0
- data/lib/recombee_api_client/version.rb +1 -1
- data/lib/recombee_api_client.rb +1 -1
- metadata +18 -2
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Deletes synonym of given `id
|
10
|
+
#Deletes synonym of the given `id`. This synonym is no longer taken into account in the [Search items](https://docs.recombee.com/api.html#search-items).
|
11
11
|
#
|
12
12
|
class DeleteSearchSynonym < ApiRequest
|
13
13
|
attr_reader :id
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#
|
2
|
+
# This file is auto-generated, do not edit
|
3
|
+
#
|
4
|
+
|
5
|
+
module RecombeeApiClient
|
6
|
+
require_relative 'request'
|
7
|
+
require_relative '../errors'
|
8
|
+
|
9
|
+
##
|
10
|
+
#Delete existing Segmentation.
|
11
|
+
#
|
12
|
+
class DeleteSegmentation < ApiRequest
|
13
|
+
attr_reader :segmentation_id
|
14
|
+
attr_accessor :timeout
|
15
|
+
attr_accessor :ensure_https
|
16
|
+
|
17
|
+
##
|
18
|
+
# * *Required arguments*
|
19
|
+
# - +segmentation_id+ -> ID of the Segmentation that should be deleted
|
20
|
+
#
|
21
|
+
def initialize(segmentation_id)
|
22
|
+
@segmentation_id = segmentation_id
|
23
|
+
@timeout = 10000
|
24
|
+
@ensure_https = false
|
25
|
+
end
|
26
|
+
|
27
|
+
# HTTP method
|
28
|
+
def method
|
29
|
+
:delete
|
30
|
+
end
|
31
|
+
|
32
|
+
# Values of body parameters as a Hash
|
33
|
+
def body_parameters
|
34
|
+
p = Hash.new
|
35
|
+
p
|
36
|
+
end
|
37
|
+
|
38
|
+
# Values of query parameters as a Hash.
|
39
|
+
# name of parameter => value of the parameter
|
40
|
+
def query_parameters
|
41
|
+
params = {}
|
42
|
+
params
|
43
|
+
end
|
44
|
+
|
45
|
+
# Relative path to the endpoint
|
46
|
+
def path
|
47
|
+
"/{databaseId}/segmentations/#{@segmentation_id}"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Deletes the series of given `seriesId` from the database.
|
10
|
+
#Deletes the series of the given `seriesId` from the database.
|
11
11
|
#
|
12
12
|
#Deleting a series will only delete assignment of items to it, not the items themselves!
|
13
13
|
#
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Deletes a user of given *userId* from the database.
|
10
|
+
#Deletes a user of the given *userId* from the database.
|
11
11
|
#
|
12
12
|
#If there are any purchases, ratings, bookmarks, cart additions or detail views made by the user present in the database, they will be deleted in cascade as well.
|
13
13
|
#
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Deleting
|
10
|
+
#Deleting a user property is roughly equivalent to removing a column from the table of users.
|
11
11
|
#
|
12
12
|
class DeleteUserProperty < ApiRequest
|
13
13
|
attr_reader :property_name
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
10
|
+
#Gets all the current property values of the given item.
|
11
11
|
#
|
12
12
|
class GetItemValues < ApiRequest
|
13
13
|
attr_reader :item_id
|
@@ -16,7 +16,7 @@ module RecombeeApiClient
|
|
16
16
|
|
17
17
|
##
|
18
18
|
# * *Required arguments*
|
19
|
-
# - +item_id+ -> ID of the item properties
|
19
|
+
# - +item_id+ -> ID of the item whose properties are to be obtained.
|
20
20
|
#
|
21
21
|
#
|
22
22
|
def initialize(item_id)
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#
|
2
|
+
# This file is auto-generated, do not edit
|
3
|
+
#
|
4
|
+
|
5
|
+
module RecombeeApiClient
|
6
|
+
require_relative 'request'
|
7
|
+
require_relative '../errors'
|
8
|
+
|
9
|
+
##
|
10
|
+
#Get existing Segmentation.
|
11
|
+
#
|
12
|
+
class GetSegmentation < ApiRequest
|
13
|
+
attr_reader :segmentation_id
|
14
|
+
attr_accessor :timeout
|
15
|
+
attr_accessor :ensure_https
|
16
|
+
|
17
|
+
##
|
18
|
+
# * *Required arguments*
|
19
|
+
# - +segmentation_id+ -> ID of the Segmentation that should be returned
|
20
|
+
#
|
21
|
+
def initialize(segmentation_id)
|
22
|
+
@segmentation_id = segmentation_id
|
23
|
+
@timeout = 10000
|
24
|
+
@ensure_https = false
|
25
|
+
end
|
26
|
+
|
27
|
+
# HTTP method
|
28
|
+
def method
|
29
|
+
:get
|
30
|
+
end
|
31
|
+
|
32
|
+
# Values of body parameters as a Hash
|
33
|
+
def body_parameters
|
34
|
+
p = Hash.new
|
35
|
+
p
|
36
|
+
end
|
37
|
+
|
38
|
+
# Values of query parameters as a Hash.
|
39
|
+
# name of parameter => value of the parameter
|
40
|
+
def query_parameters
|
41
|
+
params = {}
|
42
|
+
params
|
43
|
+
end
|
44
|
+
|
45
|
+
# Relative path to the endpoint
|
46
|
+
def path
|
47
|
+
"/{databaseId}/segmentations/list/#{@segmentation_id}"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
10
|
+
#Gets all the current property values of the given user.
|
11
11
|
#
|
12
12
|
class GetUserValues < ApiRequest
|
13
13
|
attr_reader :user_id
|
@@ -16,7 +16,7 @@ module RecombeeApiClient
|
|
16
16
|
|
17
17
|
##
|
18
18
|
# * *Required arguments*
|
19
|
-
# - +user_id+ -> ID of the user properties
|
19
|
+
# - +user_id+ -> ID of the user whose properties are to be obtained.
|
20
20
|
#
|
21
21
|
#
|
22
22
|
def initialize(user_id)
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Inserts an existing item/group into group of given `groupId`.
|
10
|
+
#Inserts an existing item/group into a group of the given `groupId`.
|
11
11
|
#
|
12
12
|
class InsertToGroup < ApiRequest
|
13
13
|
attr_reader :group_id, :item_type, :item_id, :cascade_create
|
@@ -21,7 +21,7 @@ module RecombeeApiClient
|
|
21
21
|
# - +item_id+ -> ID of the item iff `itemType` is `item`. ID of the group iff `itemType` is `group`.
|
22
22
|
#
|
23
23
|
# * *Optional arguments (given as hash optional)*
|
24
|
-
# - +cascadeCreate+ -> Indicates that any non-existing entity specified within the request should be created (as
|
24
|
+
# - +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 `groupId` and the `groupId`. If `cascadeCreate` is set to true, the behavior also depends on the `itemType`. Either items or group may be created if not present in the database.
|
25
25
|
#
|
26
26
|
def initialize(group_id, item_type, item_id, optional = {})
|
27
27
|
@group_id = group_id
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Inserts an existing item/series into series of given seriesId at position determined by time.
|
10
|
+
#Inserts an existing item/series into a series of the given seriesId at a position determined by time.
|
11
11
|
#
|
12
12
|
class InsertToSeries < ApiRequest
|
13
13
|
attr_reader :series_id, :item_type, :item_id, :time, :cascade_create
|
@@ -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
|
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`. Either item or series may be created if not present in the database.
|
26
26
|
#
|
27
27
|
def initialize(series_id, item_type, item_id, time, optional = {})
|
28
28
|
@series_id = series_id
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
10
|
+
#Lists all the ever-made bookmarks of the given item.
|
11
11
|
class ListItemBookmarks < ApiRequest
|
12
12
|
attr_reader :item_id
|
13
13
|
attr_accessor :timeout
|
@@ -15,7 +15,7 @@ module RecombeeApiClient
|
|
15
15
|
|
16
16
|
##
|
17
17
|
# * *Required arguments*
|
18
|
-
# - +item_id+ -> ID of the item
|
18
|
+
# - +item_id+ -> ID of the item whose bookmarks are to be listed.
|
19
19
|
#
|
20
20
|
#
|
21
21
|
def initialize(item_id)
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
10
|
+
#Lists all the ever-made cart additions of the given item.
|
11
11
|
class ListItemCartAdditions < ApiRequest
|
12
12
|
attr_reader :item_id
|
13
13
|
attr_accessor :timeout
|
@@ -15,7 +15,7 @@ module RecombeeApiClient
|
|
15
15
|
|
16
16
|
##
|
17
17
|
# * *Required arguments*
|
18
|
-
# - +item_id+ -> ID of the item
|
18
|
+
# - +item_id+ -> ID of the item whose cart additions are to be listed.
|
19
19
|
#
|
20
20
|
#
|
21
21
|
def initialize(item_id)
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
10
|
+
#Lists all the detail views of the given item ever made by different users.
|
11
11
|
class ListItemDetailViews < ApiRequest
|
12
12
|
attr_reader :item_id
|
13
13
|
attr_accessor :timeout
|
@@ -15,7 +15,7 @@ module RecombeeApiClient
|
|
15
15
|
|
16
16
|
##
|
17
17
|
# * *Required arguments*
|
18
|
-
# - +item_id+ -> ID of the item
|
18
|
+
# - +item_id+ -> ID of the item whose detail views are to be listed.
|
19
19
|
#
|
20
20
|
#
|
21
21
|
def initialize(item_id)
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
10
|
+
#Lists all the ever-made purchases of the given item.
|
11
11
|
class ListItemPurchases < ApiRequest
|
12
12
|
attr_reader :item_id
|
13
13
|
attr_accessor :timeout
|
@@ -15,7 +15,7 @@ module RecombeeApiClient
|
|
15
15
|
|
16
16
|
##
|
17
17
|
# * *Required arguments*
|
18
|
-
# - +item_id+ -> ID of the item
|
18
|
+
# - +item_id+ -> ID of the item whose purchases are to be listed.
|
19
19
|
#
|
20
20
|
#
|
21
21
|
def initialize(item_id)
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
10
|
+
#Lists all the ratings of an item ever submitted by different users.
|
11
11
|
class ListItemRatings < ApiRequest
|
12
12
|
attr_reader :item_id
|
13
13
|
attr_accessor :timeout
|
@@ -15,7 +15,7 @@ module RecombeeApiClient
|
|
15
15
|
|
16
16
|
##
|
17
17
|
# * *Required arguments*
|
18
|
-
# - +item_id+ -> ID of the item
|
18
|
+
# - +item_id+ -> ID of the item whose ratings are to be listed.
|
19
19
|
#
|
20
20
|
#
|
21
21
|
def initialize(item_id)
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
10
|
+
#Lists all the view portions of an item ever submitted by different users.
|
11
11
|
#
|
12
12
|
class ListItemViewPortions < ApiRequest
|
13
13
|
attr_reader :item_id
|
@@ -16,7 +16,7 @@ module RecombeeApiClient
|
|
16
16
|
|
17
17
|
##
|
18
18
|
# * *Required arguments*
|
19
|
-
# - +item_id+ -> ID of the item
|
19
|
+
# - +item_id+ -> ID of the item whose view portions are to be listed.
|
20
20
|
#
|
21
21
|
#
|
22
22
|
def initialize(item_id)
|
@@ -41,7 +41,7 @@ module RecombeeApiClient
|
|
41
41
|
# ]
|
42
42
|
#```
|
43
43
|
#
|
44
|
-
# - +includedProperties+ -> Allows
|
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
|
#```
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#
|
2
|
+
# This file is auto-generated, do not edit
|
3
|
+
#
|
4
|
+
|
5
|
+
module RecombeeApiClient
|
6
|
+
require_relative 'request'
|
7
|
+
require_relative '../errors'
|
8
|
+
|
9
|
+
##
|
10
|
+
#Return all existing items Segmentations.
|
11
|
+
#
|
12
|
+
class ListSegmentations < ApiRequest
|
13
|
+
attr_reader :source_type
|
14
|
+
attr_accessor :timeout
|
15
|
+
attr_accessor :ensure_https
|
16
|
+
|
17
|
+
##
|
18
|
+
# * *Required arguments*
|
19
|
+
# - +source_type+ -> List Segmentations based on a particular type of data. Currently only `items` are supported.
|
20
|
+
#
|
21
|
+
def initialize(source_type)
|
22
|
+
@source_type = source_type
|
23
|
+
@timeout = 10000
|
24
|
+
@ensure_https = false
|
25
|
+
end
|
26
|
+
|
27
|
+
# HTTP method
|
28
|
+
def method
|
29
|
+
:get
|
30
|
+
end
|
31
|
+
|
32
|
+
# Values of body parameters as a Hash
|
33
|
+
def body_parameters
|
34
|
+
p = Hash.new
|
35
|
+
p
|
36
|
+
end
|
37
|
+
|
38
|
+
# Values of query parameters as a Hash.
|
39
|
+
# name of parameter => value of the parameter
|
40
|
+
def query_parameters
|
41
|
+
params = {}
|
42
|
+
params['sourceType'] = @source_type
|
43
|
+
params
|
44
|
+
end
|
45
|
+
|
46
|
+
# Relative path to the endpoint
|
47
|
+
def path
|
48
|
+
"/{databaseId}/segmentations/list/"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
10
|
+
#Lists all the items present in the given series, sorted according to their time index values.
|
11
11
|
class ListSeriesItems < ApiRequest
|
12
12
|
attr_reader :series_id
|
13
13
|
attr_accessor :timeout
|
@@ -15,7 +15,7 @@ module RecombeeApiClient
|
|
15
15
|
|
16
16
|
##
|
17
17
|
# * *Required arguments*
|
18
|
-
# - +series_id+ -> ID of the series items
|
18
|
+
# - +series_id+ -> ID of the series whose items are to be listed.
|
19
19
|
#
|
20
20
|
def initialize(series_id)
|
21
21
|
@series_id = series_id
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
10
|
+
#Lists all the cart additions ever made by the given user.
|
11
11
|
class ListUserCartAdditions < ApiRequest
|
12
12
|
attr_reader :user_id
|
13
13
|
attr_accessor :timeout
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Lists all the detail views of different items ever made by
|
10
|
+
#Lists all the detail views of different items ever made by the given user.
|
11
11
|
class ListUserDetailViews < ApiRequest
|
12
12
|
attr_reader :user_id
|
13
13
|
attr_accessor :timeout
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
10
|
+
#Lists all the ratings ever submitted by the given user.
|
11
11
|
class ListUserRatings < ApiRequest
|
12
12
|
attr_reader :user_id
|
13
13
|
attr_accessor :timeout
|
@@ -37,7 +37,7 @@ module RecombeeApiClient
|
|
37
37
|
# ]
|
38
38
|
#```
|
39
39
|
#
|
40
|
-
# - +includedProperties+ -> Allows
|
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
|
#```
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Merges interactions (purchases, ratings, bookmarks, detail views ...) of two different users under a single user ID. This is especially useful for online e-commerce applications working with anonymous users identified by unique tokens such as the session ID. In such applications, it may often happen that a user owns a persistent account, yet accesses the system anonymously while, e.g., putting items into a shopping cart. At some point in time, such as when the user wishes to confirm the purchase, (s)he logs into the system using his/her username and password. The interactions made under anonymous session ID then become connected with the persistent account, and merging these two
|
10
|
+
#Merges interactions (purchases, ratings, bookmarks, detail views ...) of two different users under a single user ID. This is especially useful for online e-commerce applications working with anonymous users identified by unique tokens such as the session ID. In such applications, it may often happen that a user owns a persistent account, yet accesses the system anonymously while, e.g., putting items into a shopping cart. At some point in time, such as when the user wishes to confirm the purchase, (s)he logs into the system using his/her username and password. The interactions made under anonymous session ID then become connected with the persistent account, and merging these two becomes desirable.
|
11
11
|
#
|
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**.
|
@@ -19,7 +19,7 @@ module RecombeeApiClient
|
|
19
19
|
|
20
20
|
##
|
21
21
|
# * *Required arguments*
|
22
|
-
# - +target_user_id+ -> ID of the
|
22
|
+
# - +target_user_id+ -> ID of the target user.
|
23
23
|
# - +source_user_id+ -> ID of the source user.
|
24
24
|
#
|
25
25
|
# * *Optional arguments (given as hash optional)*
|
@@ -0,0 +1,131 @@
|
|
1
|
+
#
|
2
|
+
# This file is auto-generated, do not edit
|
3
|
+
#
|
4
|
+
|
5
|
+
module RecombeeApiClient
|
6
|
+
require_relative 'request'
|
7
|
+
require_relative '../errors'
|
8
|
+
|
9
|
+
##
|
10
|
+
#Recommends Segments from a Segmentation that are the most relevant to a particular item.
|
11
|
+
#
|
12
|
+
#Based on the used Segmentation, this endpoint can be used for example for:
|
13
|
+
#
|
14
|
+
# - Recommending the related categories
|
15
|
+
# - Recommending the related genres
|
16
|
+
# - Recommending the related brands
|
17
|
+
# - Recommending the related artists
|
18
|
+
#
|
19
|
+
#You need to set the used Segmentation the Admin UI in the Scenario settings prior to using this endpoint.
|
20
|
+
#
|
21
|
+
#The returned segments are sorted by relevance (first segment being the most relevant).
|
22
|
+
#
|
23
|
+
#It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters.
|
24
|
+
#
|
25
|
+
class RecommendItemSegmentsToItem < ApiRequest
|
26
|
+
attr_reader :item_id, :target_user_id, :count, :scenario, :cascade_create, :filter, :booster, :logic, :expert_settings, :return_ab_group
|
27
|
+
attr_accessor :timeout
|
28
|
+
attr_accessor :ensure_https
|
29
|
+
|
30
|
+
##
|
31
|
+
# * *Required arguments*
|
32
|
+
# - +item_id+ -> ID of the item for which the recommendations are to be generated.
|
33
|
+
# - +target_user_id+ -> ID of the user who will see the recommendations.
|
34
|
+
#
|
35
|
+
#Specifying the *targetUserId* is beneficial because:
|
36
|
+
#
|
37
|
+
#* It makes the recommendations personalized
|
38
|
+
#* Allows the calculation of Actions and Conversions
|
39
|
+
# in the graphical user interface,
|
40
|
+
# as Recombee can pair the user who got recommendations
|
41
|
+
# and who afterward viewed/purchased an item.
|
42
|
+
#
|
43
|
+
#If you insist on not specifying the user, pass `null`
|
44
|
+
#(`None`, `nil`, `NULL` etc., depending on the language) to *targetUserId*.
|
45
|
+
#Do not create some special dummy user for getting recommendations,
|
46
|
+
#as it could mislead the recommendation models,
|
47
|
+
#and result in wrong recommendations.
|
48
|
+
#
|
49
|
+
#For anonymous/unregistered users, it is possible to use, for example, their session ID.
|
50
|
+
#
|
51
|
+
# - +count+ -> Number of item segments to be recommended (N for the top-N recommendation).
|
52
|
+
#
|
53
|
+
#
|
54
|
+
# * *Optional arguments (given as hash optional)*
|
55
|
+
# - +scenario+ -> Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
56
|
+
#
|
57
|
+
#You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) 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
|
+
#
|
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
|
+
#
|
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
|
+
#
|
63
|
+
# - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended segments based on the `segmentationId`.
|
64
|
+
#
|
65
|
+
# - +booster+ -> Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`.
|
66
|
+
#
|
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.html) for a list of available logics and other details.
|
69
|
+
#
|
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
|
+
#
|
72
|
+
#Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
|
73
|
+
#
|
74
|
+
# - +expertSettings+ -> Dictionary of custom options.
|
75
|
+
#
|
76
|
+
# - +returnAbGroup+ -> If there is a custom AB-testing running, return the name of the group to which the request belongs.
|
77
|
+
#
|
78
|
+
#
|
79
|
+
def initialize(item_id, target_user_id, count, optional = {})
|
80
|
+
@item_id = item_id
|
81
|
+
@target_user_id = target_user_id
|
82
|
+
@count = count
|
83
|
+
optional = normalize_optional(optional)
|
84
|
+
@scenario = optional['scenario']
|
85
|
+
@cascade_create = optional['cascadeCreate']
|
86
|
+
@filter = optional['filter']
|
87
|
+
@booster = optional['booster']
|
88
|
+
@logic = optional['logic']
|
89
|
+
@expert_settings = optional['expertSettings']
|
90
|
+
@return_ab_group = optional['returnAbGroup']
|
91
|
+
@optional = optional
|
92
|
+
@timeout = 3000
|
93
|
+
@ensure_https = false
|
94
|
+
@optional.each do |par, _|
|
95
|
+
fail UnknownOptionalParameter.new(par) unless ["scenario","cascadeCreate","filter","booster","logic","expertSettings","returnAbGroup"].include? par
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
# HTTP method
|
100
|
+
def method
|
101
|
+
:post
|
102
|
+
end
|
103
|
+
|
104
|
+
# Values of body parameters as a Hash
|
105
|
+
def body_parameters
|
106
|
+
p = Hash.new
|
107
|
+
p['targetUserId'] = @target_user_id
|
108
|
+
p['count'] = @count
|
109
|
+
p['scenario'] = @optional['scenario'] if @optional.include? 'scenario'
|
110
|
+
p['cascadeCreate'] = @optional['cascadeCreate'] if @optional.include? 'cascadeCreate'
|
111
|
+
p['filter'] = @optional['filter'] if @optional.include? 'filter'
|
112
|
+
p['booster'] = @optional['booster'] if @optional.include? 'booster'
|
113
|
+
p['logic'] = @optional['logic'] if @optional.include? 'logic'
|
114
|
+
p['expertSettings'] = @optional['expertSettings'] if @optional.include? 'expertSettings'
|
115
|
+
p['returnAbGroup'] = @optional['returnAbGroup'] if @optional.include? 'returnAbGroup'
|
116
|
+
p
|
117
|
+
end
|
118
|
+
|
119
|
+
# Values of query parameters as a Hash.
|
120
|
+
# name of parameter => value of the parameter
|
121
|
+
def query_parameters
|
122
|
+
params = {}
|
123
|
+
params
|
124
|
+
end
|
125
|
+
|
126
|
+
# Relative path to the endpoint
|
127
|
+
def path
|
128
|
+
"/{databaseId}/recomms/items/#{@item_id}/item-segments/"
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|