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
@@ -7,7 +7,6 @@ module RecombeeApiClient
|
|
7
7
|
require_relative '../errors'
|
8
8
|
|
9
9
|
##
|
10
|
-
#
|
11
10
|
#Full-text personalized search that returns Segments from a Segmentation. The results are based on the provided `searchQuery` and also on the user's past interactions (purchases, ratings, etc.).
|
12
11
|
#
|
13
12
|
#Based on the used Segmentation, this endpoint can be used for example for:
|
@@ -37,22 +36,22 @@ module RecombeeApiClient
|
|
37
36
|
# * *Optional arguments (given as hash optional)*
|
38
37
|
# - +scenario+ -> Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
39
38
|
#
|
40
|
-
#You can set various settings to the [scenario](https://docs.recombee.com/scenarios
|
39
|
+
#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.
|
41
40
|
#
|
42
41
|
#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.
|
43
42
|
#
|
44
43
|
# - +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.
|
45
44
|
#
|
46
|
-
# - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql
|
45
|
+
# - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql) expression which allows you to filter recommended segments based on the `segmentationId`.
|
47
46
|
#
|
48
|
-
# - +booster+ -> Number-returning [ReQL](https://docs.recombee.com/reql
|
47
|
+
# - +booster+ -> Number-returning [ReQL](https://docs.recombee.com/reql) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`.
|
49
48
|
#
|
50
49
|
# - +logic+ -> Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
51
|
-
#See [this section](https://docs.recombee.com/recommendation_logics
|
50
|
+
#See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
|
52
51
|
#
|
53
52
|
#The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
|
54
53
|
#
|
55
|
-
#Logic can also be set to a [scenario](https://docs.recombee.com/scenarios
|
54
|
+
#Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
56
55
|
#
|
57
56
|
# - +expertSettings+ -> Dictionary of custom options.
|
58
57
|
#
|
@@ -17,8 +17,8 @@ module RecombeeApiClient
|
|
17
17
|
#
|
18
18
|
#Besides the recommended items, also a unique `recommId` is returned in the response. It can be used to:
|
19
19
|
#
|
20
|
-
#- Let Recombee know that this search was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui
|
21
|
-
#- Get subsequent search results when the user scrolls down or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api
|
20
|
+
#- Let Recombee know that this search was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui#reported-metrics).
|
21
|
+
#- Get subsequent search results when the user scrolls down or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api#recommend-next-items).
|
22
22
|
#
|
23
23
|
#It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters.
|
24
24
|
#
|
@@ -36,7 +36,7 @@ module RecombeeApiClient
|
|
36
36
|
# * *Optional arguments (given as hash optional)*
|
37
37
|
# - +scenario+ -> Scenario defines a particular search field in your user interface.
|
38
38
|
#
|
39
|
-
#You can set various settings to the [scenario](https://docs.recombee.com/scenarios
|
39
|
+
#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 field performs.
|
40
40
|
#
|
41
41
|
#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.
|
42
42
|
#
|
@@ -44,7 +44,7 @@ module RecombeeApiClient
|
|
44
44
|
# - +returnProperties+ -> With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user.
|
45
45
|
#
|
46
46
|
#Example response:
|
47
|
-
#```
|
47
|
+
#```json
|
48
48
|
# {
|
49
49
|
# "recommId": "ce52ada4-e4d9-4885-943c-407db2dee837",
|
50
50
|
# "recomms":
|
@@ -75,7 +75,7 @@ module RecombeeApiClient
|
|
75
75
|
# - +includedProperties+ -> Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
|
76
76
|
#
|
77
77
|
#Example response for `includedProperties=description,price`:
|
78
|
-
#```
|
78
|
+
#```json
|
79
79
|
# {
|
80
80
|
# "recommId": "a86ee8d5-cd8e-46d1-886c-8b3771d0520b",
|
81
81
|
# "recomms":
|
@@ -99,20 +99,20 @@ module RecombeeApiClient
|
|
99
99
|
# }
|
100
100
|
#```
|
101
101
|
#
|
102
|
-
# - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql
|
102
|
+
# - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter recommended items based on the values of their attributes.
|
103
103
|
#
|
104
|
-
#Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios
|
104
|
+
#Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
105
105
|
#
|
106
|
-
# - +booster+ -> Number-returning [ReQL](https://docs.recombee.com/reql
|
106
|
+
# - +booster+ -> Number-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes.
|
107
107
|
#
|
108
|
-
#Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios
|
108
|
+
#Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
109
109
|
#
|
110
110
|
# - +logic+ -> Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
111
|
-
#See [this section](https://docs.recombee.com/recommendation_logics
|
111
|
+
#See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
|
112
112
|
#
|
113
113
|
#The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
|
114
114
|
#
|
115
|
-
#Logic can also be set to a [scenario](https://docs.recombee.com/scenarios
|
115
|
+
#Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
116
116
|
#
|
117
117
|
# - +expertSettings+ -> Dictionary of custom options.
|
118
118
|
#
|
@@ -3,7 +3,7 @@ module RecombeeApiClient
|
|
3
3
|
require_relative '../errors'
|
4
4
|
|
5
5
|
##
|
6
|
-
#Set/update (some) property values of a given item. The properties (columns) must be previously created by [Add item property](https://docs.recombee.com/api
|
6
|
+
#Set/update (some) property values of a given item. The properties (columns) must be previously created by [Add item property](https://docs.recombee.com/api#add-item-property).
|
7
7
|
#
|
8
8
|
class SetItemValues < SetValues
|
9
9
|
attr_reader :item_id
|
@@ -3,7 +3,7 @@ module RecombeeApiClient
|
|
3
3
|
require_relative '../errors'
|
4
4
|
|
5
5
|
##
|
6
|
-
#Set/update (some) property values of a given user. The properties (columns) must be previously created by [Add user property](https://docs.recombee.com/api
|
6
|
+
#Set/update (some) property values of a given user. The properties (columns) must be previously created by [Add user property](https://docs.recombee.com/api#add-user-property).
|
7
7
|
#
|
8
8
|
class SetUserValues < SetValues
|
9
9
|
attr_reader :user_id
|
@@ -23,7 +23,7 @@ module RecombeeApiClient
|
|
23
23
|
#
|
24
24
|
# * *Optional arguments (given as hash optional)*
|
25
25
|
# - +sessionId+ -> ID of the session in which the user viewed the item. Default is `null` (`None`, `nil`, `NULL` etc., depending on the language).
|
26
|
-
# - +timestamp+ -> UTC timestamp of the
|
26
|
+
# - +timestamp+ -> UTC timestamp of the view portion as ISO8601-1 pattern or UTC epoch time. The default value is the current time.
|
27
27
|
# - +cascadeCreate+ -> Sets whether the given user/item should be created if not present in the database.
|
28
28
|
# - +recommId+ -> If this view portion is based on a recommendation request, `recommId` is the id of the clicked recommendation.
|
29
29
|
# - +additionalData+ -> A dictionary of additional data for the interaction.
|
@@ -39,7 +39,7 @@ module RecombeeApiClient
|
|
39
39
|
@recomm_id = optional['recommId']
|
40
40
|
@additional_data = optional['additionalData']
|
41
41
|
@optional = optional
|
42
|
-
@timeout =
|
42
|
+
@timeout = 3000
|
43
43
|
@ensure_https = false
|
44
44
|
@optional.each do |par, _|
|
45
45
|
fail UnknownOptionalParameter.new(par) unless ["sessionId","timestamp","cascadeCreate","recommId","additionalData"].include? par
|
@@ -11,7 +11,7 @@ module RecombeeApiClient
|
|
11
11
|
#
|
12
12
|
#Example: *Setting all the items that are older than a week as unavailable*
|
13
13
|
#
|
14
|
-
# ```
|
14
|
+
# ```json
|
15
15
|
# {
|
16
16
|
# "filter": "'releaseDate' < now() - 7*24*3600",
|
17
17
|
# "changes": {"available": false}
|
@@ -25,13 +25,13 @@ module RecombeeApiClient
|
|
25
25
|
|
26
26
|
##
|
27
27
|
# * *Required arguments*
|
28
|
-
# - +filter+ -> A [ReQL](https://docs.recombee.com/reql
|
28
|
+
# - +filter+ -> A [ReQL](https://docs.recombee.com/reql) expression, which returns `true` for the items that shall be updated.
|
29
29
|
# - +changes+ -> A dictionary where the keys are properties that shall be updated.
|
30
30
|
#
|
31
31
|
def initialize(filter, changes)
|
32
32
|
@filter = filter
|
33
33
|
@changes = changes
|
34
|
-
@timeout =
|
34
|
+
@timeout = 100000
|
35
35
|
@ensure_https = false
|
36
36
|
end
|
37
37
|
|
data/lib/recombee_api_client.rb
CHANGED
@@ -18,7 +18,7 @@ module RecombeeApiClient
|
|
18
18
|
include HTTParty
|
19
19
|
|
20
20
|
BATCH_MAX_SIZE = 10000
|
21
|
-
USER_AGENT = {'User-Agent' => 'recombee-ruby-api-client/
|
21
|
+
USER_AGENT = {'User-Agent' => 'recombee-ruby-api-client/5.1.0'}
|
22
22
|
|
23
23
|
##
|
24
24
|
# - +account+ -> Name of your account at Recombee
|
data/recombee_api_client.gemspec
CHANGED
@@ -10,17 +10,19 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ['ondrej.fiedler@recombee.com']
|
11
11
|
|
12
12
|
spec.summary = 'Client for Recombee recommendation API'
|
13
|
-
spec.
|
13
|
+
spec.description = 'A Ruby client for accessing the Recombee recommendation API. Supports personalization and search capabilities with ease.'
|
14
|
+
spec.homepage = 'https://recombee.com'
|
14
15
|
spec.license = 'MIT'
|
15
|
-
|
16
|
+
|
17
|
+
spec.required_ruby_version = '>= 2.5.0'
|
16
18
|
|
17
19
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
20
|
spec.require_paths = ['lib']
|
19
21
|
|
20
|
-
spec.add_dependency 'multi_json'
|
21
|
-
spec.add_dependency 'httparty'
|
22
|
+
spec.add_dependency 'multi_json', '~> 1.15'
|
23
|
+
spec.add_dependency 'httparty', '~> 0.18'
|
22
24
|
|
23
|
-
spec.add_development_dependency 'bundler', '~> 2.2
|
24
|
-
spec.add_development_dependency 'rake', '~>
|
25
|
-
spec.add_development_dependency 'rspec'
|
26
|
-
end
|
25
|
+
spec.add_development_dependency 'bundler', '~> 2.6.2'
|
26
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
27
|
+
spec.add_development_dependency 'rspec', '~> 3.11'
|
28
|
+
end
|
metadata
CHANGED
@@ -1,86 +1,86 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recombee_api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Fiedler
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-07-24 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: multi_json
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
|
-
- - "
|
16
|
+
- - "~>"
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
18
|
+
version: '1.15'
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
|
-
- - "
|
23
|
+
- - "~>"
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
25
|
+
version: '1.15'
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
27
|
name: httparty
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
|
-
- - "
|
30
|
+
- - "~>"
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
32
|
+
version: '0.18'
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
37
36
|
requirements:
|
38
|
-
- - "
|
37
|
+
- - "~>"
|
39
38
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
39
|
+
version: '0.18'
|
41
40
|
- !ruby/object:Gem::Dependency
|
42
41
|
name: bundler
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
44
43
|
requirements:
|
45
44
|
- - "~>"
|
46
45
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.2
|
46
|
+
version: 2.6.2
|
48
47
|
type: :development
|
49
48
|
prerelease: false
|
50
49
|
version_requirements: !ruby/object:Gem::Requirement
|
51
50
|
requirements:
|
52
51
|
- - "~>"
|
53
52
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.2
|
53
|
+
version: 2.6.2
|
55
54
|
- !ruby/object:Gem::Dependency
|
56
55
|
name: rake
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
58
57
|
requirements:
|
59
58
|
- - "~>"
|
60
59
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
60
|
+
version: '13.0'
|
62
61
|
type: :development
|
63
62
|
prerelease: false
|
64
63
|
version_requirements: !ruby/object:Gem::Requirement
|
65
64
|
requirements:
|
66
65
|
- - "~>"
|
67
66
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
67
|
+
version: '13.0'
|
69
68
|
- !ruby/object:Gem::Dependency
|
70
69
|
name: rspec
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
72
71
|
requirements:
|
73
|
-
- - "
|
72
|
+
- - "~>"
|
74
73
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
74
|
+
version: '3.11'
|
76
75
|
type: :development
|
77
76
|
prerelease: false
|
78
77
|
version_requirements: !ruby/object:Gem::Requirement
|
79
78
|
requirements:
|
80
|
-
- - "
|
79
|
+
- - "~>"
|
81
80
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
83
|
-
description:
|
81
|
+
version: '3.11'
|
82
|
+
description: A Ruby client for accessing the Recombee recommendation API. Supports
|
83
|
+
personalization and search capabilities with ease.
|
84
84
|
email:
|
85
85
|
- ondrej.fiedler@recombee.com
|
86
86
|
executables: []
|
@@ -95,7 +95,6 @@ files:
|
|
95
95
|
- lib/recombee_api_client/api/add_bookmark.rb
|
96
96
|
- lib/recombee_api_client/api/add_cart_addition.rb
|
97
97
|
- lib/recombee_api_client/api/add_detail_view.rb
|
98
|
-
- lib/recombee_api_client/api/add_group.rb
|
99
98
|
- lib/recombee_api_client/api/add_item.rb
|
100
99
|
- lib/recombee_api_client/api/add_item_property.rb
|
101
100
|
- lib/recombee_api_client/api/add_manual_reql_segment.rb
|
@@ -113,7 +112,6 @@ files:
|
|
113
112
|
- lib/recombee_api_client/api/delete_bookmark.rb
|
114
113
|
- lib/recombee_api_client/api/delete_cart_addition.rb
|
115
114
|
- lib/recombee_api_client/api/delete_detail_view.rb
|
116
|
-
- lib/recombee_api_client/api/delete_group.rb
|
117
115
|
- lib/recombee_api_client/api/delete_item.rb
|
118
116
|
- lib/recombee_api_client/api/delete_item_property.rb
|
119
117
|
- lib/recombee_api_client/api/delete_manual_reql_segment.rb
|
@@ -132,10 +130,7 @@ files:
|
|
132
130
|
- lib/recombee_api_client/api/get_user_property_info.rb
|
133
131
|
- lib/recombee_api_client/api/get_user_values.rb
|
134
132
|
- lib/recombee_api_client/api/hash_normalizer.rb
|
135
|
-
- lib/recombee_api_client/api/insert_to_group.rb
|
136
133
|
- lib/recombee_api_client/api/insert_to_series.rb
|
137
|
-
- lib/recombee_api_client/api/list_group_items.rb
|
138
|
-
- lib/recombee_api_client/api/list_groups.rb
|
139
134
|
- lib/recombee_api_client/api/list_item_bookmarks.rb
|
140
135
|
- lib/recombee_api_client/api/list_item_cart_additions.rb
|
141
136
|
- lib/recombee_api_client/api/list_item_detail_views.rb
|
@@ -144,6 +139,7 @@ files:
|
|
144
139
|
- lib/recombee_api_client/api/list_item_ratings.rb
|
145
140
|
- lib/recombee_api_client/api/list_item_view_portions.rb
|
146
141
|
- lib/recombee_api_client/api/list_items.rb
|
142
|
+
- lib/recombee_api_client/api/list_scenarios.rb
|
147
143
|
- lib/recombee_api_client/api/list_search_synonyms.rb
|
148
144
|
- lib/recombee_api_client/api/list_segmentations.rb
|
149
145
|
- lib/recombee_api_client/api/list_series.rb
|
@@ -161,11 +157,11 @@ files:
|
|
161
157
|
- lib/recombee_api_client/api/recommend_item_segments_to_item_segment.rb
|
162
158
|
- lib/recombee_api_client/api/recommend_item_segments_to_user.rb
|
163
159
|
- lib/recombee_api_client/api/recommend_items_to_item.rb
|
160
|
+
- lib/recombee_api_client/api/recommend_items_to_item_segment.rb
|
164
161
|
- lib/recombee_api_client/api/recommend_items_to_user.rb
|
165
162
|
- lib/recombee_api_client/api/recommend_next_items.rb
|
166
163
|
- lib/recombee_api_client/api/recommend_users_to_item.rb
|
167
164
|
- lib/recombee_api_client/api/recommend_users_to_user.rb
|
168
|
-
- lib/recombee_api_client/api/remove_from_group.rb
|
169
165
|
- lib/recombee_api_client/api/remove_from_series.rb
|
170
166
|
- lib/recombee_api_client/api/request.rb
|
171
167
|
- lib/recombee_api_client/api/reset_database.rb
|
@@ -183,11 +179,10 @@ files:
|
|
183
179
|
- lib/recombee_api_client/errors.rb
|
184
180
|
- lib/recombee_api_client/version.rb
|
185
181
|
- recombee_api_client.gemspec
|
186
|
-
homepage:
|
182
|
+
homepage: https://recombee.com
|
187
183
|
licenses:
|
188
184
|
- MIT
|
189
185
|
metadata: {}
|
190
|
-
post_install_message:
|
191
186
|
rdoc_options: []
|
192
187
|
require_paths:
|
193
188
|
- lib
|
@@ -195,15 +190,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
195
190
|
requirements:
|
196
191
|
- - ">="
|
197
192
|
- !ruby/object:Gem::Version
|
198
|
-
version:
|
193
|
+
version: 2.5.0
|
199
194
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
200
195
|
requirements:
|
201
196
|
- - ">="
|
202
197
|
- !ruby/object:Gem::Version
|
203
198
|
version: '0'
|
204
199
|
requirements: []
|
205
|
-
rubygems_version: 3.
|
206
|
-
signing_key:
|
200
|
+
rubygems_version: 3.6.2
|
207
201
|
specification_version: 4
|
208
202
|
summary: Client for Recombee recommendation API
|
209
203
|
test_files: []
|
@@ -1,49 +0,0 @@
|
|
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
|
-
#Creates a new group in the database.
|
11
|
-
class AddGroup < ApiRequest
|
12
|
-
attr_reader :group_id
|
13
|
-
attr_accessor :timeout
|
14
|
-
attr_accessor :ensure_https
|
15
|
-
|
16
|
-
##
|
17
|
-
# * *Required arguments*
|
18
|
-
# - +group_id+ -> ID of the group to be created.
|
19
|
-
#
|
20
|
-
def initialize(group_id)
|
21
|
-
@group_id = group_id
|
22
|
-
@timeout = 1000
|
23
|
-
@ensure_https = false
|
24
|
-
end
|
25
|
-
|
26
|
-
# HTTP method
|
27
|
-
def method
|
28
|
-
:put
|
29
|
-
end
|
30
|
-
|
31
|
-
# Values of body parameters as a Hash
|
32
|
-
def body_parameters
|
33
|
-
p = Hash.new
|
34
|
-
p
|
35
|
-
end
|
36
|
-
|
37
|
-
# Values of query parameters as a Hash.
|
38
|
-
# name of parameter => value of the parameter
|
39
|
-
def query_parameters
|
40
|
-
params = {}
|
41
|
-
params
|
42
|
-
end
|
43
|
-
|
44
|
-
# Relative path to the endpoint
|
45
|
-
def path
|
46
|
-
"/{databaseId}/groups/#{@group_id}"
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
@@ -1,52 +0,0 @@
|
|
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
|
-
#Deletes the group of the given `groupId` from the database.
|
11
|
-
#
|
12
|
-
#Deleting a group will only delete the assignment of items to it, not the items themselves!
|
13
|
-
#
|
14
|
-
class DeleteGroup < ApiRequest
|
15
|
-
attr_reader :group_id
|
16
|
-
attr_accessor :timeout
|
17
|
-
attr_accessor :ensure_https
|
18
|
-
|
19
|
-
##
|
20
|
-
# * *Required arguments*
|
21
|
-
# - +group_id+ -> ID of the group to be deleted.
|
22
|
-
#
|
23
|
-
def initialize(group_id)
|
24
|
-
@group_id = group_id
|
25
|
-
@timeout = 1000
|
26
|
-
@ensure_https = false
|
27
|
-
end
|
28
|
-
|
29
|
-
# HTTP method
|
30
|
-
def method
|
31
|
-
:delete
|
32
|
-
end
|
33
|
-
|
34
|
-
# Values of body parameters as a Hash
|
35
|
-
def body_parameters
|
36
|
-
p = Hash.new
|
37
|
-
p
|
38
|
-
end
|
39
|
-
|
40
|
-
# Values of query parameters as a Hash.
|
41
|
-
# name of parameter => value of the parameter
|
42
|
-
def query_parameters
|
43
|
-
params = {}
|
44
|
-
params
|
45
|
-
end
|
46
|
-
|
47
|
-
# Relative path to the endpoint
|
48
|
-
def path
|
49
|
-
"/{databaseId}/groups/#{@group_id}"
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
@@ -1,66 +0,0 @@
|
|
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
|
-
#Inserts an existing item/group into a group of the given `groupId`.
|
11
|
-
#
|
12
|
-
class InsertToGroup < ApiRequest
|
13
|
-
attr_reader :group_id, :item_type, :item_id, :cascade_create
|
14
|
-
attr_accessor :timeout
|
15
|
-
attr_accessor :ensure_https
|
16
|
-
|
17
|
-
##
|
18
|
-
# * *Required arguments*
|
19
|
-
# - +group_id+ -> ID of the group to be inserted into.
|
20
|
-
# - +item_type+ -> `item` iff the regular item from the catalog is to be inserted, `group` iff group is inserted as the item.
|
21
|
-
# - +item_id+ -> ID of the item iff `itemType` is `item`. ID of the group iff `itemType` is `group`.
|
22
|
-
#
|
23
|
-
# * *Optional arguments (given as hash optional)*
|
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
|
-
#
|
26
|
-
def initialize(group_id, item_type, item_id, optional = {})
|
27
|
-
@group_id = group_id
|
28
|
-
@item_type = item_type
|
29
|
-
@item_id = item_id
|
30
|
-
optional = normalize_optional(optional)
|
31
|
-
@cascade_create = optional['cascadeCreate']
|
32
|
-
@optional = optional
|
33
|
-
@timeout = 1000
|
34
|
-
@ensure_https = false
|
35
|
-
@optional.each do |par, _|
|
36
|
-
fail UnknownOptionalParameter.new(par) unless ["cascadeCreate"].include? par
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
# HTTP method
|
41
|
-
def method
|
42
|
-
:post
|
43
|
-
end
|
44
|
-
|
45
|
-
# Values of body parameters as a Hash
|
46
|
-
def body_parameters
|
47
|
-
p = Hash.new
|
48
|
-
p['itemType'] = @item_type
|
49
|
-
p['itemId'] = @item_id
|
50
|
-
p['cascadeCreate'] = @optional['cascadeCreate'] if @optional.include? 'cascadeCreate'
|
51
|
-
p
|
52
|
-
end
|
53
|
-
|
54
|
-
# Values of query parameters as a Hash.
|
55
|
-
# name of parameter => value of the parameter
|
56
|
-
def query_parameters
|
57
|
-
params = {}
|
58
|
-
params
|
59
|
-
end
|
60
|
-
|
61
|
-
# Relative path to the endpoint
|
62
|
-
def path
|
63
|
-
"/{databaseId}/groups/#{@group_id}/items/"
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
@@ -1,49 +0,0 @@
|
|
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
|
-
#List all the items present in the given group.
|
11
|
-
class ListGroupItems < ApiRequest
|
12
|
-
attr_reader :group_id
|
13
|
-
attr_accessor :timeout
|
14
|
-
attr_accessor :ensure_https
|
15
|
-
|
16
|
-
##
|
17
|
-
# * *Required arguments*
|
18
|
-
# - +group_id+ -> ID of the group whose items are to be listed.
|
19
|
-
#
|
20
|
-
def initialize(group_id)
|
21
|
-
@group_id = group_id
|
22
|
-
@timeout = 100000
|
23
|
-
@ensure_https = false
|
24
|
-
end
|
25
|
-
|
26
|
-
# HTTP method
|
27
|
-
def method
|
28
|
-
:get
|
29
|
-
end
|
30
|
-
|
31
|
-
# Values of body parameters as a Hash
|
32
|
-
def body_parameters
|
33
|
-
p = Hash.new
|
34
|
-
p
|
35
|
-
end
|
36
|
-
|
37
|
-
# Values of query parameters as a Hash.
|
38
|
-
# name of parameter => value of the parameter
|
39
|
-
def query_parameters
|
40
|
-
params = {}
|
41
|
-
params
|
42
|
-
end
|
43
|
-
|
44
|
-
# Relative path to the endpoint
|
45
|
-
def path
|
46
|
-
"/{databaseId}/groups/#{@group_id}/items/"
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
@@ -1,55 +0,0 @@
|
|
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
|
-
#Removes an existing group item from the group.
|
11
|
-
class RemoveFromGroup < ApiRequest
|
12
|
-
attr_reader :group_id, :item_type, :item_id
|
13
|
-
attr_accessor :timeout
|
14
|
-
attr_accessor :ensure_https
|
15
|
-
|
16
|
-
##
|
17
|
-
# * *Required arguments*
|
18
|
-
# - +group_id+ -> ID of the group from which a group item is to be removed.
|
19
|
-
# - +item_type+ -> Type of the item to be removed.
|
20
|
-
# - +item_id+ -> ID of the item iff `itemType` is `item`. ID of the group iff `itemType` is `group`.
|
21
|
-
#
|
22
|
-
def initialize(group_id, item_type, item_id)
|
23
|
-
@group_id = group_id
|
24
|
-
@item_type = item_type
|
25
|
-
@item_id = item_id
|
26
|
-
@timeout = 1000
|
27
|
-
@ensure_https = false
|
28
|
-
end
|
29
|
-
|
30
|
-
# HTTP method
|
31
|
-
def method
|
32
|
-
:delete
|
33
|
-
end
|
34
|
-
|
35
|
-
# Values of body parameters as a Hash
|
36
|
-
def body_parameters
|
37
|
-
p = Hash.new
|
38
|
-
p
|
39
|
-
end
|
40
|
-
|
41
|
-
# Values of query parameters as a Hash.
|
42
|
-
# name of parameter => value of the parameter
|
43
|
-
def query_parameters
|
44
|
-
params = {}
|
45
|
-
params['itemType'] = @item_type
|
46
|
-
params['itemId'] = @item_id
|
47
|
-
params
|
48
|
-
end
|
49
|
-
|
50
|
-
# Relative path to the endpoint
|
51
|
-
def path
|
52
|
-
"/{databaseId}/groups/#{@group_id}/items/"
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|