You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Deletes a bookmark uniquely specified by `userId`, `itemId`, and `timestamp`.
13
+
* Deletes a bookmark uniquely specified by `userId`, `itemId`, and `timestamp` or all the bookmarks with given `userId` and `itemId` if `timestamp` is omitted.
* Deletes an existing cart addition uniquely specified by `userId`, `itemId`, and `timestamp`.
13
+
* Deletes an existing cart addition uniquely specified by `userId`, `itemId`, and `timestamp` or all the cart additions with given `userId` and `itemId` if `timestamp` is omitted.
* Deletes an existing detail view uniquely specified by (`userId`, `itemId`, and `timestamp`).
13
+
* Deletes an existing detail view uniquely specified by (`userId`, `itemId`, and `timestamp`) or all the detail views with given `userId` and `itemId` if `timestamp` is omitted.
* Deletes an existing purchase uniquely specified by `userId`, `itemId`, and `timestamp`.
13
+
* Deletes an existing purchase uniquely specified by `userId`, `itemId`, and `timestamp` or all the purchases with given `userId` and `itemId` if `timestamp` is omitted.
* Deletes an existing rating specified by (`userId`, `itemId`, `timestamp`) from the database.
13
+
* 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.
Copy file name to clipboardExpand all lines: src/RecommApi/Requests/ItemBasedRecommendation.php
+91-3Lines changed: 91 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,48 @@ class ItemBasedRecommendation extends Request {
50
50
* @var string $scenario Scenario defines a particular application of recommendations. It can be for example "homepage" or "cart". The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios.
51
51
*/
52
52
protected$scenario;
53
+
/**
54
+
* @var bool $return_properties 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 for easy displaying of the recommended items to the user.
55
+
* Example response:
56
+
* ```
57
+
* [
58
+
* {
59
+
* "itemId": "tv-178",
60
+
* "description": "4K TV with 3D feature",
61
+
* "categories": ["Electronics", "Televisions"],
62
+
* "price": 342,
63
+
* "url": "myshop.com/tv-178"
64
+
* },
65
+
* {
66
+
* "itemId": "mixer-42",
67
+
* "description": "Stainless Steel Mixer",
68
+
* "categories": ["Home & Kitchen"],
69
+
* "price": 39,
70
+
* "url": "myshop.com/mixer-42"
71
+
* }
72
+
* ]
73
+
* ```
74
+
*/
75
+
protected$return_properties;
76
+
/**
77
+
* @var string $included_properties Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
78
+
* Example response for `includedProperties=description,price`:
79
+
* ```
80
+
* [
81
+
* {
82
+
* "itemId": "tv-178",
83
+
* "description": "4K TV with 3D feature",
84
+
* "price": 342
85
+
* },
86
+
* {
87
+
* "itemId": "mixer-42",
88
+
* "description": "Stainless Steel Mixer",
89
+
* "price": 39
90
+
* }
91
+
* ]
92
+
* ```
93
+
*/
94
+
protected$included_properties;
53
95
/**
54
96
* @var float $diversity **Expert option** Real number from [0.0, 1.0] which determines how much mutually dissimilar should the recommended items be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
55
97
*/
@@ -63,7 +105,7 @@ class ItemBasedRecommendation extends Request {
63
105
*/
64
106
protected$rotation_rate;
65
107
/**
66
-
* @var float $rotation_time **Expert option** Taking *rotationRate* into account, specifies how long time it takes to an item to fully recover from the penalization. By example, `rotationTime=7200.0` means that items recommended more than 2 hours ago are definitely not penalized anymore. Currently, the penalization is linear, so for `rotationTime=7200.0`, an item is still penalized by `0.5` to the user after 1 hour. |
108
+
* @var float $rotation_time **Expert option** Taking *rotationRate* into account, specifies how long time it takes to an item to fully recover from the penalization. By example, `rotationTime=7200.0` means that items recommended more than 2 hours ago are definitely not penalized anymore. Currently, the penalization is linear, so for `rotationTime=7200.0`, an item is still penalized by `0.5` to the user after 1 hour.
67
109
*/
68
110
protected$rotation_time;
69
111
/**
@@ -98,6 +140,46 @@ class ItemBasedRecommendation extends Request {
98
140
* - *scenario*
99
141
* - Type: string
100
142
* - Description: Scenario defines a particular application of recommendations. It can be for example "homepage" or "cart". The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios.
143
+
* - *returnProperties*
144
+
* - Type: bool
145
+
* - Description: 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 for easy displaying of the recommended items to the user.
146
+
* Example response:
147
+
* ```
148
+
* [
149
+
* {
150
+
* "itemId": "tv-178",
151
+
* "description": "4K TV with 3D feature",
152
+
* "categories": ["Electronics", "Televisions"],
153
+
* "price": 342,
154
+
* "url": "myshop.com/tv-178"
155
+
* },
156
+
* {
157
+
* "itemId": "mixer-42",
158
+
* "description": "Stainless Steel Mixer",
159
+
* "categories": ["Home & Kitchen"],
160
+
* "price": 39,
161
+
* "url": "myshop.com/mixer-42"
162
+
* }
163
+
* ]
164
+
* ```
165
+
* - *includedProperties*
166
+
* - Type: string
167
+
* - Description: Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
168
+
* Example response for `includedProperties=description,price`:
169
+
* ```
170
+
* [
171
+
* {
172
+
* "itemId": "tv-178",
173
+
* "description": "4K TV with 3D feature",
174
+
* "price": 342
175
+
* },
176
+
* {
177
+
* "itemId": "mixer-42",
178
+
* "description": "Stainless Steel Mixer",
179
+
* "price": 39
180
+
* }
181
+
* ]
182
+
* ```
101
183
* - *diversity*
102
184
* - Type: float
103
185
* - Description: **Expert option** Real number from [0.0, 1.0] which determines how much mutually dissimilar should the recommended items be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
@@ -109,7 +191,7 @@ class ItemBasedRecommendation extends Request {
109
191
* - Description: **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 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.
110
192
* - *rotationTime*
111
193
* - Type: float
112
-
* - Description: **Expert option** Taking *rotationRate* into account, specifies how long time it takes to an item to fully recover from the penalization. By example, `rotationTime=7200.0` means that items recommended more than 2 hours ago are definitely not penalized anymore. Currently, the penalization is linear, so for `rotationTime=7200.0`, an item is still penalized by `0.5` to the user after 1 hour. |
194
+
* - Description: **Expert option** Taking *rotationRate* into account, specifies how long time it takes to an item to fully recover from the penalization. By example, `rotationTime=7200.0` means that items recommended more than 2 hours ago are definitely not penalized anymore. Currently, the penalization is linear, so for `rotationTime=7200.0`, an item is still penalized by `0.5` to the user after 1 hour.
113
195
* @throws Exceptions\UnknownOptionalParameterException UnknownOptionalParameterException if an unknown optional parameter is given in $optional
* Set/update (some) property values of a given item.
13
+
* 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.html#add-item-property).
14
14
*/
15
15
class SetItemValues extends Request {
16
16
@@ -23,8 +23,9 @@ class SetItemValues extends Request {
23
23
* Example of body:
24
24
* ```
25
25
* {
26
-
* "string_property": "strvalue",
27
-
* "integer_property": 42,
26
+
* "product_description": "4K TV with 3D feature",
27
+
* "categories": ["Electronics", "Televisions"],
28
+
* "price_usd": 342,
28
29
* "!cascadeCreate": true
29
30
* }
30
31
* ```
@@ -39,8 +40,9 @@ class SetItemValues extends Request {
0 commit comments