recombee_api_client 4.0.0 → 5.0.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/README.md +3 -3
- data/lib/recombee_api_client/api/add_bookmark.rb +2 -2
- data/lib/recombee_api_client/api/add_cart_addition.rb +4 -4
- data/lib/recombee_api_client/api/add_detail_view.rb +2 -2
- data/lib/recombee_api_client/api/add_item.rb +3 -3
- data/lib/recombee_api_client/api/add_item_property.rb +2 -2
- data/lib/recombee_api_client/api/add_manual_reql_segment.rb +69 -0
- data/lib/recombee_api_client/api/add_purchase.rb +5 -5
- data/lib/recombee_api_client/api/add_rating.rb +2 -2
- data/lib/recombee_api_client/api/add_series.rb +14 -4
- data/lib/recombee_api_client/api/add_user.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 +4 -4
- data/lib/recombee_api_client/api/delete_cart_addition.rb +4 -4
- data/lib/recombee_api_client/api/delete_detail_view.rb +4 -4
- data/lib/recombee_api_client/api/delete_item.rb +3 -3
- data/lib/recombee_api_client/api/{list_groups.rb → delete_manual_reql_segment.rb} +13 -7
- data/lib/recombee_api_client/api/delete_more_items.rb +4 -4
- data/lib/recombee_api_client/api/delete_purchase.rb +4 -4
- data/lib/recombee_api_client/api/delete_rating.rb +3 -3
- data/lib/recombee_api_client/api/delete_search_synonym.rb +1 -1
- data/lib/recombee_api_client/api/{add_group.rb → delete_segmentation.rb} +10 -9
- data/lib/recombee_api_client/api/delete_series.rb +14 -4
- data/lib/recombee_api_client/api/delete_user.rb +2 -2
- data/lib/recombee_api_client/api/delete_user_property.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 +3 -3
- data/lib/recombee_api_client/api/{list_group_items.rb → get_segmentation.rb} +9 -8
- data/lib/recombee_api_client/api/get_user_values.rb +3 -3
- data/lib/recombee_api_client/api/insert_to_series.rb +3 -3
- 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/{delete_group.rb → list_segmentations.rb} +10 -11
- 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_item_segment.rb +207 -0
- 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/remove_from_series.rb +5 -8
- 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 +4 -4
- 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 +4 -4
- 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
- data/recombee_api_client.gemspec +10 -8
- metadata +40 -31
- data/lib/recombee_api_client/api/insert_to_group.rb +0 -66
- data/lib/recombee_api_client/api/remove_from_group.rb +0 -55
@@ -7,9 +7,9 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Deletes an item of given `itemId` from the catalog.
|
10
|
+
#Deletes an item of the given `itemId` from the catalog.
|
11
11
|
#
|
12
|
-
#If there are any *purchases*, *ratings*, *bookmarks*, *cart additions
|
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
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.html) instead of deleting the item completely.
|
15
15
|
#
|
@@ -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
|
|
@@ -7,22 +7,28 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
11
|
-
|
12
|
-
|
10
|
+
#Delete a Segment from a Manual ReQL Segmentation.
|
11
|
+
#
|
12
|
+
class DeleteManualReqlSegment < ApiRequest
|
13
|
+
attr_reader :segmentation_id, :segment_id
|
13
14
|
attr_accessor :timeout
|
14
15
|
attr_accessor :ensure_https
|
15
16
|
|
16
17
|
##
|
18
|
+
# * *Required arguments*
|
19
|
+
# - +segmentation_id+ -> ID of the Segmentation from which the Segment should be deleted
|
20
|
+
# - +segment_id+ -> ID of the Segment that should be deleted
|
17
21
|
#
|
18
|
-
def initialize()
|
19
|
-
@
|
22
|
+
def initialize(segmentation_id, segment_id)
|
23
|
+
@segmentation_id = segmentation_id
|
24
|
+
@segment_id = segment_id
|
25
|
+
@timeout = 10000
|
20
26
|
@ensure_https = false
|
21
27
|
end
|
22
28
|
|
23
29
|
# HTTP method
|
24
30
|
def method
|
25
|
-
:
|
31
|
+
:delete
|
26
32
|
end
|
27
33
|
|
28
34
|
# Values of body parameters as a Hash
|
@@ -40,7 +46,7 @@ module RecombeeApiClient
|
|
40
46
|
|
41
47
|
# Relative path to the endpoint
|
42
48
|
def path
|
43
|
-
"/{databaseId}/
|
49
|
+
"/{databaseId}/segmentations/manual-reql/#{@segmentation_id}/segments/#{@segment_id}"
|
44
50
|
end
|
45
51
|
end
|
46
52
|
end
|
@@ -7,9 +7,9 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
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)
|
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.html) 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.html) expression, which
|
20
|
+
# - +filter+ -> A [ReQL](https://docs.recombee.com/reql.html) 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
|
|
@@ -7,7 +7,7 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#Deletes an existing purchase uniquely specified by `userId`, `itemId`, and `timestamp` or all the purchases with given `userId` and `itemId` if `timestamp` is omitted.
|
10
|
+
#Deletes an existing purchase uniquely specified by `userId`, `itemId`, and `timestamp` or all the purchases with the given `userId` and `itemId` if `timestamp` is omitted.
|
11
11
|
#
|
12
12
|
class DeletePurchase < ApiRequest
|
13
13
|
attr_reader :user_id, :item_id, :timestamp
|
@@ -17,10 +17,10 @@ module RecombeeApiClient
|
|
17
17
|
##
|
18
18
|
# * *Required arguments*
|
19
19
|
# - +user_id+ -> ID of the user who made the purchase.
|
20
|
-
# - +item_id+ -> ID of the item
|
20
|
+
# - +item_id+ -> ID of the item which was purchased.
|
21
21
|
#
|
22
22
|
# * *Optional arguments (given as hash optional)*
|
23
|
-
# - +timestamp+ -> Unix timestamp of the purchase. If the `timestamp` is omitted, then all the purchases with given `userId` and `itemId` are deleted.
|
23
|
+
# - +timestamp+ -> Unix timestamp of the purchase. If the `timestamp` is omitted, then all the purchases with the given `userId` and `itemId` are deleted.
|
24
24
|
#
|
25
25
|
def initialize(user_id, item_id, optional = {})
|
26
26
|
@user_id = user_id
|
@@ -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 an existing rating specified by (`userId`, `itemId`, `timestamp`) from the database or all the ratings with given `userId` and `itemId` if `timestamp` is omitted.
|
10
|
+
#Deletes an existing rating specified by (`userId`, `itemId`, `timestamp`) from the database or all the ratings with the given `userId` and `itemId` if `timestamp` is omitted.
|
11
11
|
#
|
12
12
|
class DeleteRating < ApiRequest
|
13
13
|
attr_reader :user_id, :item_id, :timestamp
|
@@ -20,7 +20,7 @@ module RecombeeApiClient
|
|
20
20
|
# - +item_id+ -> ID of the item which was rated.
|
21
21
|
#
|
22
22
|
# * *Optional arguments (given as hash optional)*
|
23
|
-
# - +timestamp+ -> Unix timestamp of the rating. If the `timestamp` is omitted, then all the ratings with given `userId` and `itemId` are deleted.
|
23
|
+
# - +timestamp+ -> Unix timestamp of the rating. If the `timestamp` is omitted, then all the ratings with the given `userId` and `itemId` are deleted.
|
24
24
|
#
|
25
25
|
def initialize(user_id, item_id, optional = {})
|
26
26
|
@user_id = user_id
|
@@ -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 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
|
@@ -7,25 +7,26 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
11
|
-
|
12
|
-
|
10
|
+
#Delete existing Segmentation.
|
11
|
+
#
|
12
|
+
class DeleteSegmentation < ApiRequest
|
13
|
+
attr_reader :segmentation_id
|
13
14
|
attr_accessor :timeout
|
14
15
|
attr_accessor :ensure_https
|
15
16
|
|
16
17
|
##
|
17
18
|
# * *Required arguments*
|
18
|
-
# - +
|
19
|
+
# - +segmentation_id+ -> ID of the Segmentation that should be deleted
|
19
20
|
#
|
20
|
-
def initialize(
|
21
|
-
@
|
22
|
-
@timeout =
|
21
|
+
def initialize(segmentation_id)
|
22
|
+
@segmentation_id = segmentation_id
|
23
|
+
@timeout = 10000
|
23
24
|
@ensure_https = false
|
24
25
|
end
|
25
26
|
|
26
27
|
# HTTP method
|
27
28
|
def method
|
28
|
-
:
|
29
|
+
:delete
|
29
30
|
end
|
30
31
|
|
31
32
|
# Values of body parameters as a Hash
|
@@ -43,7 +44,7 @@ module RecombeeApiClient
|
|
43
44
|
|
44
45
|
# Relative path to the endpoint
|
45
46
|
def path
|
46
|
-
"/{databaseId}/
|
47
|
+
"/{databaseId}/segmentations/#{@segmentation_id}"
|
47
48
|
end
|
48
49
|
end
|
49
50
|
end
|
@@ -7,12 +7,12 @@ 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
|
#
|
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
|
|
@@ -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
|
#
|
@@ -22,7 +22,7 @@ module RecombeeApiClient
|
|
22
22
|
#
|
23
23
|
def initialize(user_id)
|
24
24
|
@user_id = user_id
|
25
|
-
@timeout =
|
25
|
+
@timeout = 3000
|
26
26
|
@ensure_https = false
|
27
27
|
end
|
28
28
|
|
@@ -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
|
@@ -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
|
@@ -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,12 +16,12 @@ 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)
|
23
23
|
@item_id = item_id
|
24
|
-
@timeout =
|
24
|
+
@timeout = 3000
|
25
25
|
@ensure_https = false
|
26
26
|
end
|
27
27
|
|
@@ -7,19 +7,20 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
11
|
-
|
12
|
-
|
10
|
+
#Get existing Segmentation.
|
11
|
+
#
|
12
|
+
class GetSegmentation < ApiRequest
|
13
|
+
attr_reader :segmentation_id
|
13
14
|
attr_accessor :timeout
|
14
15
|
attr_accessor :ensure_https
|
15
16
|
|
16
17
|
##
|
17
18
|
# * *Required arguments*
|
18
|
-
# - +
|
19
|
+
# - +segmentation_id+ -> ID of the Segmentation that should be returned
|
19
20
|
#
|
20
|
-
def initialize(
|
21
|
-
@
|
22
|
-
@timeout =
|
21
|
+
def initialize(segmentation_id)
|
22
|
+
@segmentation_id = segmentation_id
|
23
|
+
@timeout = 10000
|
23
24
|
@ensure_https = false
|
24
25
|
end
|
25
26
|
|
@@ -43,7 +44,7 @@ module RecombeeApiClient
|
|
43
44
|
|
44
45
|
# Relative path to the endpoint
|
45
46
|
def path
|
46
|
-
"/{databaseId}/
|
47
|
+
"/{databaseId}/segmentations/list/#{@segmentation_id}"
|
47
48
|
end
|
48
49
|
end
|
49
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,12 +16,12 @@ 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)
|
23
23
|
@user_id = user_id
|
24
|
-
@timeout =
|
24
|
+
@timeout = 3000
|
25
25
|
@ensure_https = false
|
26
26
|
end
|
27
27
|
|
@@ -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`. 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
|
@@ -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
|
#```
|
@@ -7,28 +7,26 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
10
|
+
#Return all existing items Segmentations.
|
11
11
|
#
|
12
|
-
|
13
|
-
|
14
|
-
class DeleteGroup < ApiRequest
|
15
|
-
attr_reader :group_id
|
12
|
+
class ListSegmentations < ApiRequest
|
13
|
+
attr_reader :source_type
|
16
14
|
attr_accessor :timeout
|
17
15
|
attr_accessor :ensure_https
|
18
16
|
|
19
17
|
##
|
20
18
|
# * *Required arguments*
|
21
|
-
# - +
|
19
|
+
# - +source_type+ -> List Segmentations based on a particular type of data. Currently only `items` are supported.
|
22
20
|
#
|
23
|
-
def initialize(
|
24
|
-
@
|
25
|
-
@timeout =
|
21
|
+
def initialize(source_type)
|
22
|
+
@source_type = source_type
|
23
|
+
@timeout = 10000
|
26
24
|
@ensure_https = false
|
27
25
|
end
|
28
26
|
|
29
27
|
# HTTP method
|
30
28
|
def method
|
31
|
-
:
|
29
|
+
:get
|
32
30
|
end
|
33
31
|
|
34
32
|
# Values of body parameters as a Hash
|
@@ -41,12 +39,13 @@ module RecombeeApiClient
|
|
41
39
|
# name of parameter => value of the parameter
|
42
40
|
def query_parameters
|
43
41
|
params = {}
|
42
|
+
params['sourceType'] = @source_type
|
44
43
|
params
|
45
44
|
end
|
46
45
|
|
47
46
|
# Relative path to the endpoint
|
48
47
|
def path
|
49
|
-
"/{databaseId}/
|
48
|
+
"/{databaseId}/segmentations/list/"
|
50
49
|
end
|
51
50
|
end
|
52
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
|