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.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +3 -3
  4. data/lib/recombee_api_client/api/add_bookmark.rb +1 -1
  5. data/lib/recombee_api_client/api/add_cart_addition.rb +1 -1
  6. data/lib/recombee_api_client/api/add_detail_view.rb +1 -1
  7. data/lib/recombee_api_client/api/add_item.rb +1 -1
  8. data/lib/recombee_api_client/api/add_item_property.rb +1 -1
  9. data/lib/recombee_api_client/api/add_manual_reql_segment.rb +1 -1
  10. data/lib/recombee_api_client/api/add_purchase.rb +1 -1
  11. data/lib/recombee_api_client/api/add_rating.rb +1 -1
  12. data/lib/recombee_api_client/api/add_search_synonym.rb +1 -1
  13. data/lib/recombee_api_client/api/add_series.rb +13 -3
  14. data/lib/recombee_api_client/api/add_user.rb +1 -1
  15. data/lib/recombee_api_client/api/add_user_property.rb +1 -1
  16. data/lib/recombee_api_client/api/create_auto_reql_segmentation.rb +1 -1
  17. data/lib/recombee_api_client/api/create_manual_reql_segmentation.rb +1 -1
  18. data/lib/recombee_api_client/api/delete_bookmark.rb +1 -1
  19. data/lib/recombee_api_client/api/delete_cart_addition.rb +1 -1
  20. data/lib/recombee_api_client/api/delete_detail_view.rb +1 -1
  21. data/lib/recombee_api_client/api/delete_item.rb +2 -2
  22. data/lib/recombee_api_client/api/delete_more_items.rb +3 -3
  23. data/lib/recombee_api_client/api/delete_purchase.rb +1 -1
  24. data/lib/recombee_api_client/api/delete_rating.rb +1 -1
  25. data/lib/recombee_api_client/api/delete_search_synonym.rb +1 -1
  26. data/lib/recombee_api_client/api/delete_series.rb +13 -3
  27. data/lib/recombee_api_client/api/delete_user.rb +1 -1
  28. data/lib/recombee_api_client/api/delete_view_portion.rb +1 -1
  29. data/lib/recombee_api_client/api/get_item_property_info.rb +1 -1
  30. data/lib/recombee_api_client/api/get_item_values.rb +1 -1
  31. data/lib/recombee_api_client/api/get_user_values.rb +1 -1
  32. data/lib/recombee_api_client/api/insert_to_series.rb +2 -2
  33. data/lib/recombee_api_client/api/list_items.rb +3 -3
  34. data/lib/recombee_api_client/api/{list_groups.rb → list_scenarios.rb} +5 -4
  35. data/lib/recombee_api_client/api/list_users.rb +3 -3
  36. data/lib/recombee_api_client/api/merge_users.rb +3 -0
  37. data/lib/recombee_api_client/api/recommend_item_segments_to_item.rb +7 -7
  38. data/lib/recombee_api_client/api/recommend_item_segments_to_item_segment.rb +7 -7
  39. data/lib/recombee_api_client/api/recommend_item_segments_to_user.rb +7 -7
  40. data/lib/recombee_api_client/api/recommend_items_to_item.rb +16 -16
  41. data/lib/recombee_api_client/api/recommend_items_to_item_segment.rb +207 -0
  42. data/lib/recombee_api_client/api/recommend_items_to_user.rb +15 -15
  43. data/lib/recombee_api_client/api/recommend_next_items.rb +4 -3
  44. data/lib/recombee_api_client/api/recommend_users_to_item.rb +10 -10
  45. data/lib/recombee_api_client/api/recommend_users_to_user.rb +13 -13
  46. data/lib/recombee_api_client/api/remove_from_series.rb +5 -8
  47. data/lib/recombee_api_client/api/search_item_segments.rb +5 -6
  48. data/lib/recombee_api_client/api/search_items.rb +11 -11
  49. data/lib/recombee_api_client/api/set_item_values.rb +1 -1
  50. data/lib/recombee_api_client/api/set_user_values.rb +1 -1
  51. data/lib/recombee_api_client/api/set_view_portion.rb +2 -2
  52. data/lib/recombee_api_client/api/update_more_items.rb +3 -3
  53. data/lib/recombee_api_client/version.rb +1 -1
  54. data/lib/recombee_api_client.rb +1 -1
  55. data/recombee_api_client.gemspec +10 -8
  56. metadata +25 -31
  57. data/lib/recombee_api_client/api/add_group.rb +0 -49
  58. data/lib/recombee_api_client/api/delete_group.rb +0 -52
  59. data/lib/recombee_api_client/api/insert_to_group.rb +0 -66
  60. data/lib/recombee_api_client/api/list_group_items.rb +0 -49
  61. data/lib/recombee_api_client/api/remove_from_group.rb +0 -55
@@ -7,7 +7,7 @@ module RecombeeApiClient
7
7
  require_relative '../errors'
8
8
 
9
9
  ##
10
- #Recommends the top Segments from a Segmentation for a particular user, based on the user's past interactions.
10
+ #Recommends the top Segments from a [Segmentation](https://docs.recombee.com/segmentations) for a particular user, based on the user's past interactions.
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 top brands for the user
17
17
  # - Recommending the top artists for the user
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
  #
@@ -36,22 +36,22 @@ module RecombeeApiClient
36
36
  # * *Optional arguments (given as hash optional)*
37
37
  # - +scenario+ -> Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
38
38
  #
39
- #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.
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.
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
  #
43
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.
44
44
  #
45
- # - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended segments based on the `segmentationId`.
45
+ # - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql) expression which allows you to filter recommended segments based on the `segmentationId`.
46
46
  #
47
- # - +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`.
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`.
48
48
  #
49
49
  # - +logic+ -> Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
50
- #See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details.
50
+ #See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
51
51
  #
52
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.
53
53
  #
54
- #Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
54
+ #Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
55
55
  #
56
56
  # - +expertSettings+ -> Dictionary of custom options.
57
57
  #
@@ -13,8 +13,8 @@ module RecombeeApiClient
13
13
  #
14
14
  #Besides the recommended items, also a unique `recommId` is returned in the response. It can be used to:
15
15
  #
16
- #- Let Recombee know that this recommendation was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui.html#reported-metrics).
17
- #- Get subsequent recommended items when the user scrolls down (*infinite scroll*) or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api.html#recommend-next-items).
16
+ #- Let Recombee know that this recommendation was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui#reported-metrics).
17
+ #- Get subsequent recommended items when the user scrolls down (*infinite scroll*) or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api#recommend-next-items).
18
18
  #
19
19
  #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.
20
20
  #
@@ -49,7 +49,7 @@ module RecombeeApiClient
49
49
  # * *Optional arguments (given as hash optional)*
50
50
  # - +scenario+ -> Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
51
51
  #
52
- #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.
52
+ #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.
53
53
  #
54
54
  #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.
55
55
  #
@@ -57,7 +57,7 @@ module RecombeeApiClient
57
57
  # - +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.
58
58
  #
59
59
  #Example response:
60
- #```
60
+ #```json
61
61
  # {
62
62
  # "recommId": "0c6189e7-dc1a-429a-b613-192696309361",
63
63
  # "recomms":
@@ -88,7 +88,7 @@ module RecombeeApiClient
88
88
  # - +includedProperties+ -> Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
89
89
  #
90
90
  #Example response for `includedProperties=description,price`:
91
- #```
91
+ #```json
92
92
  # {
93
93
  # "recommId": "6842c725-a79f-4537-a02c-f34d668a3f80",
94
94
  # "recomms":
@@ -112,30 +112,30 @@ module RecombeeApiClient
112
112
  # }
113
113
  #```
114
114
  #
115
- # - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes.
115
+ # - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter recommended items based on the values of their attributes.
116
116
  #
117
- #Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
117
+ #Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
118
118
  #
119
- # - +booster+ -> Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes.
119
+ # - +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.
120
120
  #
121
- #Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
121
+ #Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
122
122
  #
123
123
  # - +logic+ -> Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
124
- #See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details.
124
+ #See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
125
125
  #
126
126
  #The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
127
127
  #
128
- #Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
128
+ #Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
129
129
  #
130
- # - +userImpact+ -> **Expert option** If *targetUserId* parameter is present, the recommendations are biased towards the given user. Using *userImpact*, you may control this bias. For an extreme case of `userImpact=0.0`, the interactions made by the user are not taken into account at all (with the exception of history-based blacklisting), for `userImpact=1.0`, you'll get a user-based recommendation. The default value is `0`.
130
+ # - +userImpact+ -> **Expert option:** If *targetUserId* parameter is present, the recommendations are biased towards the given user. Using *userImpact*, you may control this bias. For an extreme case of `userImpact=0.0`, the interactions made by the user are not taken into account at all (with the exception of history-based blacklisting), for `userImpact=1.0`, you'll get a user-based recommendation. The default value is `0`.
131
131
  #
132
- # - +diversity+ -> **Expert option** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended items should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
132
+ # - +diversity+ -> **Expert option:** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended items should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
133
133
  #
134
- # - +minRelevance+ -> **Expert option** If the *targetUserId* is provided: Specifies the threshold of how relevant must the recommended items be to the user. Possible values one of: "low", "medium", "high". The default value is "low", meaning that the system attempts to recommend a number of items equal to *count* at any cost. If there is not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations being appended to reach the full *count*. This behavior may be suppressed by using "medium" or "high" values. In such case, the system only recommends items of at least the requested relevance and may return less than *count* items when there is not enough data to fulfill it.
134
+ # - +minRelevance+ -> **Expert option:** If the *targetUserId* is provided: Specifies the threshold of how relevant must the recommended items be to the user. Possible values one of: "low", "medium", "high". The default value is "low", meaning that the system attempts to recommend a number of items equal to *count* at any cost. If there is not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations being appended to reach the full *count*. This behavior may be suppressed by using "medium" or "high" values. In such case, the system only recommends items of at least the requested relevance and may return less than *count* items when there is not enough data to fulfill it.
135
135
  #
136
- # - +rotationRate+ -> **Expert option** If the *targetUserId* is provided: If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended items.
136
+ # - +rotationRate+ -> **Expert option:** If the *targetUserId* is provided: If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended items.
137
137
  #
138
- # - +rotationTime+ -> **Expert option** If the *targetUserId* is provided: Taking *rotationRate* into account, specifies how long it takes for an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized.
138
+ # - +rotationTime+ -> **Expert option:** If the *targetUserId* is provided: Taking *rotationRate* into account, specifies how long it takes for an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized.
139
139
  #
140
140
  # - +expertSettings+ -> Dictionary of custom options.
141
141
  #
@@ -0,0 +1,207 @@
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 Items that are the most relevant to a particular Segment from a context [Segmentation](https://docs.recombee.com/segmentations).
11
+ #
12
+ #Based on the used Segmentation, this endpoint can be used for example for:
13
+ #
14
+ #- Recommending articles related to a particular topic
15
+ #- Recommending songs belonging to a particular genre
16
+ #- Recommending products produced by a particular brand
17
+ #
18
+ #You need to set the used context Segmentation in the Admin UI in the [Scenario settings](https://docs.recombee.com/scenarios) prior to using this endpoint.
19
+ #
20
+ #The returned items are sorted by relevance (the first item being the most relevant).
21
+ #
22
+ #It is also possible to use the POST HTTP method (for example, in the case of a very long ReQL filter) — query parameters then become body parameters.
23
+ #
24
+ class RecommendItemsToItemSegment < ApiRequest
25
+ attr_reader :context_segment_id, :target_user_id, :count, :scenario, :cascade_create, :return_properties, :included_properties, :filter, :booster, :logic, :min_relevance, :rotation_rate, :rotation_time, :expert_settings, :return_ab_group
26
+ attr_accessor :timeout
27
+ attr_accessor :ensure_https
28
+
29
+ ##
30
+ # * *Required arguments*
31
+ # - +context_segment_id+ -> ID of the segment from `contextSegmentationId` for which the recommendations are to be generated.
32
+ # - +target_user_id+ -> ID of the user who will see the recommendations.
33
+ #
34
+ #Specifying the *targetUserId* is beneficial because:
35
+ #
36
+ #* It makes the recommendations personalized
37
+ #* Allows the calculation of Actions and Conversions
38
+ # in the graphical user interface,
39
+ # as Recombee can pair the user who got recommendations
40
+ # and who afterward viewed/purchased an item.
41
+ #
42
+ #If you insist on not specifying the user, pass `null`
43
+ #(`None`, `nil`, `NULL` etc., depending on the language) to *targetUserId*.
44
+ #Do not create some special dummy user for getting recommendations,
45
+ #as it could mislead the recommendation models,
46
+ #and result in wrong recommendations.
47
+ #
48
+ #For anonymous/unregistered users, it is possible to use, for example, their session ID.
49
+ #
50
+ # - +count+ -> Number of items to be recommended (N for the top-N recommendation).
51
+ #
52
+ # * *Optional arguments (given as hash optional)*
53
+ # - +scenario+ -> Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
54
+ #
55
+ #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.
56
+ #
57
+ #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.
58
+ #
59
+ # - +cascadeCreate+ -> If a user of the given *targetUserId* doesn't exist in the database, it creates this user and returns some (non-personalized) recommendations. This allows, for example, rotations in the following recommendations for the user of the given *targetUserId*, as the user will be already known to the system.
60
+ # - +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.
61
+ #
62
+ #Example response:
63
+ #```json
64
+ # {
65
+ # "recommId": "0c6189e7-dc1a-429a-b613-192696309361",
66
+ # "recomms":
67
+ # [
68
+ # {
69
+ # "id": "tv-178",
70
+ # "values": {
71
+ # "description": "4K TV with 3D feature",
72
+ # "categories": ["Electronics", "Televisions"],
73
+ # "price": 342,
74
+ # "url": "myshop.com/tv-178"
75
+ # }
76
+ # },
77
+ # {
78
+ # "id": "mixer-42",
79
+ # "values": {
80
+ # "description": "Stainless Steel Mixer",
81
+ # "categories": ["Home & Kitchen"],
82
+ # "price": 39,
83
+ # "url": "myshop.com/mixer-42"
84
+ # }
85
+ # }
86
+ # ],
87
+ # "numberNextRecommsCalls": 0
88
+ # }
89
+ #```
90
+ #
91
+ # - +includedProperties+ -> Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
92
+ #
93
+ #Example response for `includedProperties=description,price`:
94
+ #```json
95
+ # {
96
+ # "recommId": "6842c725-a79f-4537-a02c-f34d668a3f80",
97
+ # "recomms":
98
+ # [
99
+ # {
100
+ # "id": "tv-178",
101
+ # "values": {
102
+ # "description": "4K TV with 3D feature",
103
+ # "price": 342
104
+ # }
105
+ # },
106
+ # {
107
+ # "id": "mixer-42",
108
+ # "values": {
109
+ # "description": "Stainless Steel Mixer",
110
+ # "price": 39
111
+ # }
112
+ # }
113
+ # ],
114
+ # "numberNextRecommsCalls": 0
115
+ # }
116
+ #```
117
+ #
118
+ # - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter recommended items based on the values of their attributes.
119
+ #
120
+ #Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
121
+ #
122
+ # - +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.
123
+ #
124
+ #Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
125
+ #
126
+ # - +logic+ -> Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
127
+ #See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
128
+ #
129
+ #The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
130
+ #
131
+ #Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
132
+ #
133
+ # - +minRelevance+ -> **Expert option:** If the *targetUserId* is provided: Specifies the threshold of how relevant must the recommended items be to the user. Possible values one of: "low", "medium", "high". The default value is "low", meaning that the system attempts to recommend a number of items equal to *count* at any cost. If there is not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations being appended to reach the full *count*. This behavior may be suppressed by using "medium" or "high" values. In such case, the system only recommends items of at least the requested relevance and may return less than *count* items when there is not enough data to fulfill it.
134
+ #
135
+ # - +rotationRate+ -> **Expert option:** If the *targetUserId* is provided: If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended items.
136
+ #
137
+ # - +rotationTime+ -> **Expert option:** If the *targetUserId* is provided: Taking *rotationRate* into account, specifies how long it takes for an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized.
138
+ #
139
+ # - +expertSettings+ -> Dictionary of custom options.
140
+ #
141
+ # - +returnAbGroup+ -> If there is a custom AB-testing running, return the name of the group to which the request belongs.
142
+ #
143
+ #
144
+ def initialize(context_segment_id, target_user_id, count, optional = {})
145
+ @context_segment_id = context_segment_id
146
+ @target_user_id = target_user_id
147
+ @count = count
148
+ optional = normalize_optional(optional)
149
+ @scenario = optional['scenario']
150
+ @cascade_create = optional['cascadeCreate']
151
+ @return_properties = optional['returnProperties']
152
+ @included_properties = optional['includedProperties']
153
+ @filter = optional['filter']
154
+ @booster = optional['booster']
155
+ @logic = optional['logic']
156
+ @min_relevance = optional['minRelevance']
157
+ @rotation_rate = optional['rotationRate']
158
+ @rotation_time = optional['rotationTime']
159
+ @expert_settings = optional['expertSettings']
160
+ @return_ab_group = optional['returnAbGroup']
161
+ @optional = optional
162
+ @timeout = 3000
163
+ @ensure_https = false
164
+ @optional.each do |par, _|
165
+ fail UnknownOptionalParameter.new(par) unless ["scenario","cascadeCreate","returnProperties","includedProperties","filter","booster","logic","minRelevance","rotationRate","rotationTime","expertSettings","returnAbGroup"].include? par
166
+ end
167
+ end
168
+
169
+ # HTTP method
170
+ def method
171
+ :post
172
+ end
173
+
174
+ # Values of body parameters as a Hash
175
+ def body_parameters
176
+ p = Hash.new
177
+ p['contextSegmentId'] = @context_segment_id
178
+ p['targetUserId'] = @target_user_id
179
+ p['count'] = @count
180
+ p['scenario'] = @optional['scenario'] if @optional.include? 'scenario'
181
+ p['cascadeCreate'] = @optional['cascadeCreate'] if @optional.include? 'cascadeCreate'
182
+ p['returnProperties'] = @optional['returnProperties'] if @optional.include? 'returnProperties'
183
+ p['includedProperties'] = @optional['includedProperties'] if @optional.include? 'includedProperties'
184
+ p['filter'] = @optional['filter'] if @optional.include? 'filter'
185
+ p['booster'] = @optional['booster'] if @optional.include? 'booster'
186
+ p['logic'] = @optional['logic'] if @optional.include? 'logic'
187
+ p['minRelevance'] = @optional['minRelevance'] if @optional.include? 'minRelevance'
188
+ p['rotationRate'] = @optional['rotationRate'] if @optional.include? 'rotationRate'
189
+ p['rotationTime'] = @optional['rotationTime'] if @optional.include? 'rotationTime'
190
+ p['expertSettings'] = @optional['expertSettings'] if @optional.include? 'expertSettings'
191
+ p['returnAbGroup'] = @optional['returnAbGroup'] if @optional.include? 'returnAbGroup'
192
+ p
193
+ end
194
+
195
+ # Values of query parameters as a Hash.
196
+ # name of parameter => value of the parameter
197
+ def query_parameters
198
+ params = {}
199
+ params
200
+ end
201
+
202
+ # Relative path to the endpoint
203
+ def path
204
+ "/{databaseId}/recomms/item-segments/items/"
205
+ end
206
+ end
207
+ end
@@ -15,8 +15,8 @@ module RecombeeApiClient
15
15
  #
16
16
  #Besides the recommended items, also a unique `recommId` is returned in the response. It can be used to:
17
17
  #
18
- #- Let Recombee know that this recommendation was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui.html#reported-metrics).
19
- #- Get subsequent recommended items when the user scrolls down (*infinite scroll*) or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api.html#recommend-next-items).
18
+ #- Let Recombee know that this recommendation was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui#reported-metrics).
19
+ #- Get subsequent recommended items when the user scrolls down (*infinite scroll*) or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api#recommend-next-items).
20
20
  #
21
21
  #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.
22
22
  #
@@ -34,7 +34,7 @@ module RecombeeApiClient
34
34
  # * *Optional arguments (given as hash optional)*
35
35
  # - +scenario+ -> Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
36
36
  #
37
- #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.
37
+ #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.
38
38
  #
39
39
  #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.
40
40
  #
@@ -43,7 +43,7 @@ module RecombeeApiClient
43
43
  # - +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.
44
44
  #
45
45
  #Example response:
46
- #```
46
+ #```json
47
47
  # {
48
48
  # "recommId": "ce52ada4-e4d9-4885-943c-407db2dee837",
49
49
  # "recomms":
@@ -74,7 +74,7 @@ module RecombeeApiClient
74
74
  # - +includedProperties+ -> Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
75
75
  #
76
76
  #Example response for `includedProperties=description,price`:
77
- #```
77
+ #```json
78
78
  # {
79
79
  # "recommId": "a86ee8d5-cd8e-46d1-886c-8b3771d0520b",
80
80
  # "recomms":
@@ -98,28 +98,28 @@ module RecombeeApiClient
98
98
  # }
99
99
  #```
100
100
  #
101
- # - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes.
101
+ # - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter recommended items based on the values of their attributes.
102
102
  #
103
- #Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
103
+ #Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
104
104
  #
105
- # - +booster+ -> Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes.
105
+ # - +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.
106
106
  #
107
- #Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
107
+ #Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
108
108
  #
109
109
  # - +logic+ -> Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
110
- #See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details.
110
+ #See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
111
111
  #
112
112
  #The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
113
113
  #
114
- #Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
114
+ #Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
115
115
  #
116
- # - +diversity+ -> **Expert option** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended items should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
116
+ # - +diversity+ -> **Expert option:** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended items should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
117
117
  #
118
- # - +minRelevance+ -> **Expert option** Specifies the threshold of how relevant must the recommended items be to the user. Possible values one of: "low", "medium", "high". The default value is "low", meaning that the system attempts to recommend a number of items equal to *count* at any cost. If there is not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations to be appended to reach the full *count*. This behavior may be suppressed by using "medium" or "high" values. In such a case, the system only recommends items of at least the requested relevance and may return less than *count* items when there is not enough data to fulfill it.
118
+ # - +minRelevance+ -> **Expert option:** Specifies the threshold of how relevant must the recommended items be to the user. Possible values one of: "low", "medium", "high". The default value is "low", meaning that the system attempts to recommend a number of items equal to *count* at any cost. If there is not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations to be appended to reach the full *count*. This behavior may be suppressed by using "medium" or "high" values. In such a case, the system only recommends items of at least the requested relevance and may return less than *count* items when there is not enough data to fulfill it.
119
119
  #
120
- # - +rotationRate+ -> **Expert option** If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended items. Default: `0`.
120
+ # - +rotationRate+ -> **Expert option:** If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended items. Default: `0`.
121
121
  #
122
- # - +rotationTime+ -> **Expert option** Taking *rotationRate* into account, specifies how long it takes for an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized. Default: `7200.0`.
122
+ # - +rotationTime+ -> **Expert option:** Taking *rotationRate* into account, specifies how long it takes for an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized. Default: `7200.0`.
123
123
  #
124
124
  # - +expertSettings+ -> Dictionary of custom options.
125
125
  #
@@ -11,9 +11,10 @@ module RecombeeApiClient
11
11
  #
12
12
  #It accepts `recommId` of a base recommendation request (e.g., request from the first page) and the number of items that shall be returned (`count`).
13
13
  #The base request can be one of:
14
- # - [Recommend items to item](https://docs.recombee.com/api.html#recommend-items-to-item)
15
- # - [Recommend items to user](https://docs.recombee.com/api.html#recommend-items-to-user)
16
- # - [Search items](https://docs.recombee.com/api.html#search-items)
14
+ # - [Recommend Items to Item](https://docs.recombee.com/api#recommend-items-to-item)
15
+ # - [Recommend Items to User](https://docs.recombee.com/api#recommend-items-to-user)
16
+ # - [Recommend Items to Item Segment](https://docs.recombee.com/api#recommend-items-to-item-segment)
17
+ # - [Search Items](https://docs.recombee.com/api#search-items)
17
18
  #
18
19
  #All the other parameters are inherited from the base request.
19
20
  #
@@ -26,7 +26,7 @@ module RecombeeApiClient
26
26
  # * *Optional arguments (given as hash optional)*
27
27
  # - +scenario+ -> Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
28
28
  #
29
- #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.
29
+ #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.
30
30
  #
31
31
  #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.
32
32
  #
@@ -34,7 +34,7 @@ module RecombeeApiClient
34
34
  # - +returnProperties+ -> With `returnProperties=true`, property values of the recommended users are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended users.
35
35
  #
36
36
  #Example response:
37
- #```
37
+ #```json
38
38
  # {
39
39
  # "recommId": "039b71dc-b9cc-4645-a84f-62b841eecfce",
40
40
  # "recomms":
@@ -61,7 +61,7 @@ module RecombeeApiClient
61
61
  # - +includedProperties+ -> Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
62
62
  #
63
63
  #Example response for `includedProperties=country`:
64
- #```
64
+ #```json
65
65
  # {
66
66
  # "recommId": "b2b355dd-972a-4728-9c6b-2dc229db0678",
67
67
  # "recomms":
@@ -83,22 +83,22 @@ module RecombeeApiClient
83
83
  # }
84
84
  #```
85
85
  #
86
- # - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes.
86
+ # - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter recommended items based on the values of their attributes.
87
87
  #
88
- #Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
88
+ #Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
89
89
  #
90
- # - +booster+ -> Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes.
90
+ # - +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.
91
91
  #
92
- #Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
92
+ #Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
93
93
  #
94
94
  # - +logic+ -> Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
95
- #See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details.
95
+ #See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
96
96
  #
97
97
  #The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
98
98
  #
99
- #Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
99
+ #Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
100
100
  #
101
- # - +diversity+ -> **Expert option** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended items should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
101
+ # - +diversity+ -> **Expert option:** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended items should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
102
102
  #
103
103
  # - +expertSettings+ -> Dictionary of custom options.
104
104
  #
@@ -26,7 +26,7 @@ module RecombeeApiClient
26
26
  # * *Optional arguments (given as hash optional)*
27
27
  # - +scenario+ -> Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
28
28
  #
29
- #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.
29
+ #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.
30
30
  #
31
31
  #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.
32
32
  #
@@ -34,7 +34,7 @@ module RecombeeApiClient
34
34
  # - +returnProperties+ -> With `returnProperties=true`, property values of the recommended users are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended users.
35
35
  #
36
36
  #Example response:
37
- #```
37
+ #```json
38
38
  # {
39
39
  # "recommId": "9cb9c55d-50ba-4478-84fd-ab456136156e",
40
40
  # "recomms":
@@ -61,7 +61,7 @@ module RecombeeApiClient
61
61
  # - +includedProperties+ -> Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
62
62
  #
63
63
  #Example response for `includedProperties=country`:
64
- #```
64
+ #```json
65
65
  # {
66
66
  # "recommId": "b326d82d-5d57-4b45-b362-c9d6f0895855",
67
67
  # "recomms":
@@ -83,28 +83,28 @@ module RecombeeApiClient
83
83
  # }
84
84
  #```
85
85
  #
86
- # - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes.
86
+ # - +filter+ -> Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter recommended items based on the values of their attributes.
87
87
  #
88
- #Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
88
+ #Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
89
89
  #
90
- # - +booster+ -> Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes.
90
+ # - +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.
91
91
  #
92
- #Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
92
+ #Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
93
93
  #
94
94
  # - +logic+ -> Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
95
- #See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details.
95
+ #See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
96
96
  #
97
97
  #The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
98
98
  #
99
- #Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
99
+ #Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
100
100
  #
101
- # - +diversity+ -> **Expert option** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended users should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
101
+ # - +diversity+ -> **Expert option:** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended users should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
102
102
  #
103
- # - +minRelevance+ -> **Expert option** Specifies the threshold of how relevant must the recommended users be. Possible values one of: "low", "medium", "high".
103
+ # - +minRelevance+ -> **Expert option:** Specifies the threshold of how relevant must the recommended users be. Possible values one of: "low", "medium", "high".
104
104
  #
105
- # - +rotationRate+ -> **Expert option** If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. You may penalize a user for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended users.
105
+ # - +rotationRate+ -> **Expert option:** If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. You may penalize a user for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended users.
106
106
  #
107
- # - +rotationTime+ -> **Expert option** Taking *rotationRate* into account, specifies how long it takes for a user to recover from the penalization. For example, `rotationTime=7200.0` means that users recommended less than 2 hours ago are penalized.
107
+ # - +rotationTime+ -> **Expert option:** Taking *rotationRate* into account, specifies how long it takes for a user to recover from the penalization. For example, `rotationTime=7200.0` means that users recommended less than 2 hours ago are penalized.
108
108
  #
109
109
  # - +expertSettings+ -> Dictionary of custom options.
110
110
  #
@@ -9,7 +9,7 @@ module RecombeeApiClient
9
9
  ##
10
10
  #Removes an existing series item from the series.
11
11
  class RemoveFromSeries < ApiRequest
12
- attr_reader :series_id, :item_type, :item_id, :time
12
+ attr_reader :series_id, :item_type, :item_id
13
13
  attr_accessor :timeout
14
14
  attr_accessor :ensure_https
15
15
 
@@ -18,14 +18,12 @@ module RecombeeApiClient
18
18
  # - +series_id+ -> ID of the series from which a series item is to be removed.
19
19
  # - +item_type+ -> Type of the item to be removed.
20
20
  # - +item_id+ -> ID of the item iff `itemType` is `item`. ID of the series iff `itemType` is `series`.
21
- # - +time+ -> Time index of the item to be removed.
22
21
  #
23
- def initialize(series_id, item_type, item_id, time)
22
+ def initialize(series_id, item_type, item_id)
24
23
  @series_id = series_id
25
24
  @item_type = item_type
26
25
  @item_id = item_id
27
- @time = time
28
- @timeout = 1000
26
+ @timeout = 3000
29
27
  @ensure_https = false
30
28
  end
31
29
 
@@ -37,6 +35,8 @@ module RecombeeApiClient
37
35
  # Values of body parameters as a Hash
38
36
  def body_parameters
39
37
  p = Hash.new
38
+ p['itemType'] = @item_type
39
+ p['itemId'] = @item_id
40
40
  p
41
41
  end
42
42
 
@@ -44,9 +44,6 @@ module RecombeeApiClient
44
44
  # name of parameter => value of the parameter
45
45
  def query_parameters
46
46
  params = {}
47
- params['itemType'] = @item_type
48
- params['itemId'] = @item_id
49
- params['time'] = @time
50
47
  params
51
48
  end
52
49