recombee-api-client 4.0.0 → 4.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.
- package/doc/AddBookmark.html +506 -0
- package/doc/AddCartAddition.html +512 -0
- package/doc/AddDetailView.html +509 -0
- package/doc/AddGroup.html +447 -0
- package/doc/AddItem.html +448 -0
- package/doc/AddItemProperty.html +478 -0
- package/doc/AddPurchase.html +515 -0
- package/doc/AddRating.html +529 -0
- package/doc/AddSearchSynonym.html +501 -0
- package/doc/AddSeries.html +447 -0
- package/doc/AddUser.html +447 -0
- package/doc/AddUserProperty.html +476 -0
- package/doc/ApiClient.html +433 -0
- package/doc/ApiError.html +170 -0
- package/doc/Batch.html +476 -0
- package/doc/DeleteAllSearchSynonyms.html +398 -0
- package/doc/DeleteBookmark.html +497 -0
- package/doc/DeleteCartAddition.html +497 -0
- package/doc/DeleteDetailView.html +497 -0
- package/doc/DeleteGroup.html +448 -0
- package/doc/DeleteItem.html +449 -0
- package/doc/DeleteItemProperty.html +447 -0
- package/doc/DeleteMoreItems.html +448 -0
- package/doc/DeletePurchase.html +497 -0
- package/doc/DeleteRating.html +497 -0
- package/doc/DeleteSearchSynonym.html +447 -0
- package/doc/DeleteSeries.html +448 -0
- package/doc/DeleteUser.html +448 -0
- package/doc/DeleteUserProperty.html +447 -0
- package/doc/DeleteViewPortion.html +497 -0
- package/doc/GetItemPropertyInfo.html +447 -0
- package/doc/GetItemValues.html +447 -0
- package/doc/GetUserPropertyInfo.html +447 -0
- package/doc/GetUserValues.html +447 -0
- package/doc/InsertToGroup.html +520 -0
- package/doc/InsertToSeries.html +543 -0
- package/doc/ListGroupItems.html +447 -0
- package/doc/ListGroups.html +398 -0
- package/doc/ListItemBookmarks.html +447 -0
- package/doc/ListItemCartAdditions.html +447 -0
- package/doc/ListItemDetailViews.html +447 -0
- package/doc/ListItemProperties.html +398 -0
- package/doc/ListItemPurchases.html +447 -0
- package/doc/ListItemRatings.html +447 -0
- package/doc/ListItemViewPortions.html +447 -0
- package/doc/ListItems.html +497 -0
- package/doc/ListSearchSynonyms.html +454 -0
- package/doc/ListSeries.html +398 -0
- package/doc/ListSeriesItems.html +447 -0
- package/doc/ListUserBookmarks.html +447 -0
- package/doc/ListUserCartAdditions.html +447 -0
- package/doc/ListUserDetailViews.html +447 -0
- package/doc/ListUserProperties.html +398 -0
- package/doc/ListUserPurchases.html +447 -0
- package/doc/ListUserRatings.html +447 -0
- package/doc/ListUserViewPortions.html +447 -0
- package/doc/ListUsers.html +491 -0
- package/doc/MergeUsers.html +498 -0
- package/doc/RecommendItemsToItem.html +635 -0
- package/doc/RecommendItemsToUser.html +598 -0
- package/doc/RecommendNextItems.html +480 -0
- package/doc/RecommendUsersToItem.html +579 -0
- package/doc/RecommendUsersToUser.html +588 -0
- package/doc/RemoveFromGroup.html +493 -0
- package/doc/RemoveFromSeries.html +516 -0
- package/doc/Request.html +292 -0
- package/doc/ResetDatabase.html +398 -0
- package/doc/ResponseError.html +269 -0
- package/doc/SearchItems.html +610 -0
- package/doc/SetItemValues.html +279 -0
- package/doc/SetUserValues.html +277 -0
- package/doc/SetValues.html +480 -0
- package/doc/SetViewPortion.html +533 -0
- package/doc/TimeoutError.html +246 -0
- package/doc/UpdateMoreItems.html +472 -0
- package/doc/api-client.js.html +248 -0
- package/doc/errors_api-error.js.html +71 -0
- package/doc/errors_response-error.js.html +72 -0
- package/doc/errors_timeout-error.js.html +71 -0
- package/doc/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/doc/fonts/OpenSans-Bold-webfont.svg +1830 -0
- package/doc/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/doc/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/doc/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
- package/doc/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/doc/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/doc/fonts/OpenSans-Italic-webfont.svg +1830 -0
- package/doc/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/doc/fonts/OpenSans-Light-webfont.eot +0 -0
- package/doc/fonts/OpenSans-Light-webfont.svg +1831 -0
- package/doc/fonts/OpenSans-Light-webfont.woff +0 -0
- package/doc/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/doc/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
- package/doc/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/doc/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/doc/fonts/OpenSans-Regular-webfont.svg +1831 -0
- package/doc/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/doc/index.html +65 -0
- package/doc/requests_add-bookmark.js.html +128 -0
- package/doc/requests_add-cart-addition.js.html +142 -0
- package/doc/requests_add-detail-view.js.html +135 -0
- package/doc/requests_add-group.js.html +93 -0
- package/doc/requests_add-item-property.js.html +104 -0
- package/doc/requests_add-item.js.html +94 -0
- package/doc/requests_add-purchase.js.html +149 -0
- package/doc/requests_add-rating.js.html +131 -0
- package/doc/requests_add-search-synonym.js.html +111 -0
- package/doc/requests_add-series.js.html +93 -0
- package/doc/requests_add-user-property.js.html +102 -0
- package/doc/requests_add-user.js.html +93 -0
- package/doc/requests_batch.js.html +121 -0
- package/doc/requests_delete-all-search-synonyms.js.html +91 -0
- package/doc/requests_delete-bookmark.js.html +106 -0
- package/doc/requests_delete-cart-addition.js.html +106 -0
- package/doc/requests_delete-detail-view.js.html +106 -0
- package/doc/requests_delete-group.js.html +94 -0
- package/doc/requests_delete-item-property.js.html +93 -0
- package/doc/requests_delete-item.js.html +95 -0
- package/doc/requests_delete-more-items.js.html +95 -0
- package/doc/requests_delete-purchase.js.html +106 -0
- package/doc/requests_delete-rating.js.html +106 -0
- package/doc/requests_delete-search-synonym.js.html +93 -0
- package/doc/requests_delete-series.js.html +94 -0
- package/doc/requests_delete-user-property.js.html +93 -0
- package/doc/requests_delete-user.js.html +94 -0
- package/doc/requests_delete-view-portion.js.html +106 -0
- package/doc/requests_get-item-property-info.js.html +93 -0
- package/doc/requests_get-item-values.js.html +93 -0
- package/doc/requests_get-user-property-info.js.html +93 -0
- package/doc/requests_get-user-values.js.html +93 -0
- package/doc/requests_insert-to-group.js.html +109 -0
- package/doc/requests_insert-to-series.js.html +112 -0
- package/doc/requests_list-group-items.js.html +93 -0
- package/doc/requests_list-groups.js.html +91 -0
- package/doc/requests_list-item-bookmarks.js.html +93 -0
- package/doc/requests_list-item-cart-additions.js.html +93 -0
- package/doc/requests_list-item-detail-views.js.html +93 -0
- package/doc/requests_list-item-properties.js.html +91 -0
- package/doc/requests_list-item-purchases.js.html +93 -0
- package/doc/requests_list-item-ratings.js.html +93 -0
- package/doc/requests_list-item-view-portions.js.html +93 -0
- package/doc/requests_list-items.js.html +158 -0
- package/doc/requests_list-search-synonyms.js.html +106 -0
- package/doc/requests_list-series-items.js.html +93 -0
- package/doc/requests_list-series.js.html +91 -0
- package/doc/requests_list-user-bookmarks.js.html +93 -0
- package/doc/requests_list-user-cart-additions.js.html +93 -0
- package/doc/requests_list-user-detail-views.js.html +93 -0
- package/doc/requests_list-user-properties.js.html +91 -0
- package/doc/requests_list-user-purchases.js.html +93 -0
- package/doc/requests_list-user-ratings.js.html +93 -0
- package/doc/requests_list-user-view-portions.js.html +93 -0
- package/doc/requests_list-users.js.html +152 -0
- package/doc/requests_merge-users.js.html +105 -0
- package/doc/requests_recommend-items-to-item.js.html +276 -0
- package/doc/requests_recommend-items-to-user.js.html +255 -0
- package/doc/requests_recommend-next-items.js.html +106 -0
- package/doc/requests_recommend-users-to-item.js.html +224 -0
- package/doc/requests_recommend-users-to-user.js.html +245 -0
- package/doc/requests_remove-from-group.js.html +99 -0
- package/doc/requests_remove-from-series.js.html +102 -0
- package/doc/requests_request.js.html +73 -0
- package/doc/requests_reset-database.js.html +91 -0
- package/doc/requests_search-items.js.html +231 -0
- package/doc/requests_set-item-values.js.html +80 -0
- package/doc/requests_set-user-values.js.html +79 -0
- package/doc/requests_set-values.js.html +102 -0
- package/doc/requests_set-view-portion.js.html +139 -0
- package/doc/requests_update-more-items.js.html +104 -0
- package/doc/scripts/linenumber.js +25 -0
- package/doc/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/doc/scripts/prettify/lang-css.js +2 -0
- package/doc/scripts/prettify/prettify.js +28 -0
- package/doc/styles/jsdoc-default.css +358 -0
- package/doc/styles/prettify-jsdoc.css +111 -0
- package/doc/styles/prettify-tomorrow.css +132 -0
- package/lib/api-client.js +3 -2
- package/lib/requests/add-bookmark.js +1 -1
- package/lib/requests/add-cart-addition.js +3 -3
- package/lib/requests/add-detail-view.js +1 -1
- package/lib/requests/add-group.js +1 -1
- package/lib/requests/add-item-property.js +1 -1
- package/lib/requests/add-item.js +2 -2
- package/lib/requests/add-manual-reql-segment.js +58 -0
- package/lib/requests/add-purchase.js +4 -4
- package/lib/requests/add-rating.js +1 -1
- package/lib/requests/add-series.js +1 -1
- package/lib/requests/add-user-property.js +2 -2
- package/lib/requests/create-auto-reql-segmentation.js +66 -0
- package/lib/requests/create-manual-reql-segmentation.js +63 -0
- package/lib/requests/create-property-based-segmentation.js +67 -0
- package/lib/requests/delete-bookmark.js +3 -3
- package/lib/requests/delete-cart-addition.js +3 -3
- package/lib/requests/delete-detail-view.js +3 -3
- package/lib/requests/delete-group.js +2 -2
- package/lib/requests/delete-item.js +2 -2
- package/lib/requests/delete-manual-reql-segment.js +44 -0
- package/lib/requests/delete-more-items.js +3 -3
- package/lib/requests/delete-purchase.js +3 -3
- package/lib/requests/delete-rating.js +2 -2
- package/lib/requests/delete-search-synonym.js +1 -1
- package/lib/requests/delete-segmentation.js +42 -0
- package/lib/requests/delete-series.js +1 -1
- package/lib/requests/delete-user-property.js +1 -1
- package/lib/requests/delete-user.js +1 -1
- package/lib/requests/get-item-values.js +2 -2
- package/lib/requests/get-segmentation.js +42 -0
- package/lib/requests/get-user-values.js +2 -2
- package/lib/requests/index.js +16 -0
- package/lib/requests/insert-to-group.js +2 -2
- package/lib/requests/insert-to-series.js +2 -2
- package/lib/requests/list-group-items.js +1 -1
- package/lib/requests/list-item-bookmarks.js +2 -2
- package/lib/requests/list-item-cart-additions.js +2 -2
- package/lib/requests/list-item-detail-views.js +2 -2
- package/lib/requests/list-item-purchases.js +2 -2
- package/lib/requests/list-item-ratings.js +2 -2
- package/lib/requests/list-item-view-portions.js +2 -2
- package/lib/requests/list-items.js +1 -1
- package/lib/requests/list-segmentations.js +43 -0
- package/lib/requests/list-series-items.js +2 -2
- package/lib/requests/list-user-bookmarks.js +1 -1
- package/lib/requests/list-user-cart-additions.js +1 -1
- package/lib/requests/list-user-detail-views.js +1 -1
- package/lib/requests/list-user-purchases.js +1 -1
- package/lib/requests/list-user-ratings.js +1 -1
- package/lib/requests/list-user-view-portions.js +1 -1
- package/lib/requests/list-users.js +1 -1
- package/lib/requests/merge-users.js +2 -2
- package/lib/requests/recommend-item-segments-to-item-segment.js +125 -0
- package/lib/requests/recommend-item-segments-to-item.js +125 -0
- package/lib/requests/recommend-item-segments-to-user.js +110 -0
- package/lib/requests/recommend-items-to-item.js +26 -26
- package/lib/requests/recommend-items-to-user.js +23 -23
- package/lib/requests/recommend-next-items.js +2 -2
- package/lib/requests/recommend-users-to-item.js +18 -18
- package/lib/requests/recommend-users-to-user.js +21 -21
- package/lib/requests/reset-database.js +1 -1
- package/lib/requests/search-item-segments.js +112 -0
- package/lib/requests/search-items.js +17 -17
- package/lib/requests/set-view-portion.js +3 -3
- package/lib/requests/update-auto-reql-segmentation.js +66 -0
- package/lib/requests/update-manual-reql-segment.js +57 -0
- package/lib/requests/update-manual-reql-segmentation.js +59 -0
- package/lib/requests/update-more-items.js +3 -3
- package/lib/requests/update-property-based-segmentation.js +66 -0
- package/package.json +1 -1
- package/test/add-manual-reql-segment-batch_test.js +40 -0
- package/test/add-manual-reql-segment-callback_test.js +43 -0
- package/test/add-manual-reql-segment-test.js +35 -0
- package/test/create-auto-reql-segmentation-batch_test.js +35 -0
- package/test/create-auto-reql-segmentation-callback_test.js +45 -0
- package/test/create-auto-reql-segmentation-test.js +43 -0
- package/test/create-manual-reql-segmentation-batch_test.js +35 -0
- package/test/create-manual-reql-segmentation-callback_test.js +45 -0
- package/test/create-manual-reql-segmentation-test.js +43 -0
- package/test/create-property-based-segmentation-batch_test.js +35 -0
- package/test/create-property-based-segmentation-callback_test.js +45 -0
- package/test/create-property-based-segmentation-test.js +43 -0
- package/test/delete-manual-reql-segment-batch_test.js +47 -0
- package/test/delete-manual-reql-segment-callback_test.js +51 -0
- package/test/delete-manual-reql-segment-test.js +39 -0
- package/test/delete-segmentation-batch_test.js +42 -0
- package/test/delete-segmentation-callback_test.js +53 -0
- package/test/delete-segmentation-test.js +47 -0
- package/test/get-segmentation-batch_test.js +41 -0
- package/test/get-segmentation-callback_test.js +44 -0
- package/test/get-segmentation-test.js +36 -0
- package/test/list-segmentations-batch_test.js +41 -0
- package/test/list-segmentations-callback_test.js +44 -0
- package/test/list-segmentations-test.js +36 -0
- package/test/recommend-item-segments-to-item-batch_test.js +33 -0
- package/test/recommend-item-segments-to-item-callback_test.js +37 -0
- package/test/recommend-item-segments-to-item-segment-batch_test.js +33 -0
- package/test/recommend-item-segments-to-item-segment-callback_test.js +37 -0
- package/test/recommend-item-segments-to-item-segment-test.js +39 -0
- package/test/recommend-item-segments-to-item-test.js +39 -0
- package/test/recommend-item-segments-to-user-batch_test.js +33 -0
- package/test/recommend-item-segments-to-user-callback_test.js +37 -0
- package/test/recommend-item-segments-to-user-test.js +39 -0
- package/test/search-item-segments-batch_test.js +33 -0
- package/test/search-item-segments-callback_test.js +37 -0
- package/test/search-item-segments-test.js +39 -0
- package/test/update-auto-reql-segmentation-batch_test.js +40 -0
- package/test/update-auto-reql-segmentation-callback_test.js +43 -0
- package/test/update-auto-reql-segmentation-test.js +35 -0
- package/test/update-manual-reql-segment-batch_test.js +47 -0
- package/test/update-manual-reql-segment-callback_test.js +51 -0
- package/test/update-manual-reql-segment-test.js +39 -0
- package/test/update-manual-reql-segmentation-batch_test.js +40 -0
- package/test/update-manual-reql-segmentation-callback_test.js +43 -0
- package/test/update-manual-reql-segmentation-test.js +35 -0
- package/test/update-property-based-segmentation-batch_test.js +40 -0
- package/test/update-property-based-segmentation-callback_test.js +43 -0
- package/test/update-property-based-segmentation-test.js +35 -0
|
@@ -43,7 +43,7 @@ class ListUsers extends rqs.Request {
|
|
|
43
43
|
* ```
|
|
44
44
|
* - *includedProperties*
|
|
45
45
|
* - Type: string[]
|
|
46
|
-
* - Description: Allows
|
|
46
|
+
* - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
|
|
47
47
|
* Example response for `includedProperties=country`:
|
|
48
48
|
* ```
|
|
49
49
|
* [
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Merges interactions (purchases, ratings, bookmarks, detail views ...) of two different users under a single user ID. This is especially useful for online e-commerce applications working with anonymous users identified by unique tokens such as the session ID. In such applications, it may often happen that a user owns a persistent account, yet accesses the system anonymously while, e.g., putting items into a shopping cart. At some point in time, such as when the user wishes to confirm the purchase, (s)he logs into the system using his/her username and password. The interactions made under anonymous session ID then become connected with the persistent account, and merging these two
|
|
9
|
+
* Merges interactions (purchases, ratings, bookmarks, detail views ...) of two different users under a single user ID. This is especially useful for online e-commerce applications working with anonymous users identified by unique tokens such as the session ID. In such applications, it may often happen that a user owns a persistent account, yet accesses the system anonymously while, e.g., putting items into a shopping cart. At some point in time, such as when the user wishes to confirm the purchase, (s)he logs into the system using his/her username and password. The interactions made under anonymous session ID then become connected with the persistent account, and merging these two becomes desirable.
|
|
10
10
|
* Merging happens between two users referred to as the *target* and the *source*. After the merge, all the interactions of the source user are attributed to the target user, and the source user is **deleted**.
|
|
11
11
|
*/
|
|
12
12
|
class MergeUsers extends rqs.Request {
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Construct the request
|
|
16
|
-
* @param {string} targetUserId - ID of the
|
|
16
|
+
* @param {string} targetUserId - ID of the target user.
|
|
17
17
|
* @param {string} sourceUserId - ID of the source user.
|
|
18
18
|
* @param {Object} optional - Optional parameters given as an object with structure name of the parameter: value
|
|
19
19
|
* - Allowed parameters:
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*
|
|
2
|
+
This file is auto-generated, do not edit
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
'use strict';
|
|
6
|
+
const rqs = require("./request");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Recommends Segments from a result Segmentation that are the most relevant to a particular Segment from a context Segmentation.
|
|
10
|
+
* Based on the used Segmentations, this endpoint can be used for example for:
|
|
11
|
+
* - Recommending the related brands to particular brand
|
|
12
|
+
* - Recommending the related brands to particular category
|
|
13
|
+
* - Recommending the related artists to a particular genre (assuming songs are the Items)
|
|
14
|
+
* You need to set the used context and result Segmentation the Admin UI in the Scenario settings prior to using this endpoint.
|
|
15
|
+
* The returned segments are sorted by relevance (first segment being the most relevant).
|
|
16
|
+
* It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters.
|
|
17
|
+
*/
|
|
18
|
+
class RecommendItemSegmentsToItemSegment extends rqs.Request {
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Construct the request
|
|
22
|
+
* @param {string} contextSegmentId - ID of the segment from `contextSegmentationId` for which the recommendations are to be generated.
|
|
23
|
+
* @param {string} targetUserId - ID of the user who will see the recommendations.
|
|
24
|
+
* Specifying the *targetUserId* is beneficial because:
|
|
25
|
+
* * It makes the recommendations personalized
|
|
26
|
+
* * Allows the calculation of Actions and Conversions
|
|
27
|
+
* in the graphical user interface,
|
|
28
|
+
* as Recombee can pair the user who got recommendations
|
|
29
|
+
* and who afterward viewed/purchased an item.
|
|
30
|
+
* If you insist on not specifying the user, pass `null`
|
|
31
|
+
* (`None`, `nil`, `NULL` etc., depending on the language) to *targetUserId*.
|
|
32
|
+
* Do not create some special dummy user for getting recommendations,
|
|
33
|
+
* as it could mislead the recommendation models,
|
|
34
|
+
* and result in wrong recommendations.
|
|
35
|
+
* For anonymous/unregistered users, it is possible to use, for example, their session ID.
|
|
36
|
+
* @param {number} count - Number of item segments to be recommended (N for the top-N recommendation).
|
|
37
|
+
* @param {Object} optional - Optional parameters given as an object with structure name of the parameter: value
|
|
38
|
+
* - Allowed parameters:
|
|
39
|
+
* - *scenario*
|
|
40
|
+
* - Type: string
|
|
41
|
+
* - Description: Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
|
42
|
+
* 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.
|
|
43
|
+
* 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.
|
|
44
|
+
* - *cascadeCreate*
|
|
45
|
+
* - Type: boolean
|
|
46
|
+
* - Description: 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.
|
|
47
|
+
* - *filter*
|
|
48
|
+
* - Type: string
|
|
49
|
+
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended segments based on the `segmentationId`.
|
|
50
|
+
* - *booster*
|
|
51
|
+
* - Type: string
|
|
52
|
+
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`.
|
|
53
|
+
* - *logic*
|
|
54
|
+
* - Type: string|
|
|
55
|
+
* - Description: Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
|
56
|
+
* See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details.
|
|
57
|
+
* The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
|
|
58
|
+
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
|
|
59
|
+
* - *expertSettings*
|
|
60
|
+
* - Type:
|
|
61
|
+
* - Description: Dictionary of custom options.
|
|
62
|
+
* - *returnAbGroup*
|
|
63
|
+
* - Type: boolean
|
|
64
|
+
* - Description: If there is a custom AB-testing running, return the name of the group to which the request belongs.
|
|
65
|
+
*/
|
|
66
|
+
constructor(contextSegmentId, targetUserId, count, optional) {
|
|
67
|
+
super('POST', '/recomms/item-segments/item-segments/', 3000, false);
|
|
68
|
+
this.contextSegmentId = contextSegmentId;
|
|
69
|
+
this.targetUserId = targetUserId;
|
|
70
|
+
this.count = count;
|
|
71
|
+
optional = optional || {};
|
|
72
|
+
this.scenario = optional.scenario;
|
|
73
|
+
this.cascadeCreate = optional.cascadeCreate;
|
|
74
|
+
this.filter = optional.filter;
|
|
75
|
+
this.booster = optional.booster;
|
|
76
|
+
this.logic = optional.logic;
|
|
77
|
+
this.expertSettings = optional.expertSettings;
|
|
78
|
+
this.returnAbGroup = optional.returnAbGroup;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Get body parameters
|
|
83
|
+
* @return {Object} The values of body parameters (name of parameter: value of the parameter)
|
|
84
|
+
*/
|
|
85
|
+
bodyParameters() {
|
|
86
|
+
let params = {};
|
|
87
|
+
params.contextSegmentId = this.contextSegmentId;
|
|
88
|
+
params.targetUserId = this.targetUserId;
|
|
89
|
+
params.count = this.count;
|
|
90
|
+
|
|
91
|
+
if(this.scenario !== undefined)
|
|
92
|
+
params.scenario = this.scenario;
|
|
93
|
+
|
|
94
|
+
if(this.cascadeCreate !== undefined)
|
|
95
|
+
params.cascadeCreate = this.cascadeCreate;
|
|
96
|
+
|
|
97
|
+
if(this.filter !== undefined)
|
|
98
|
+
params.filter = this.filter;
|
|
99
|
+
|
|
100
|
+
if(this.booster !== undefined)
|
|
101
|
+
params.booster = this.booster;
|
|
102
|
+
|
|
103
|
+
if(this.logic !== undefined)
|
|
104
|
+
params.logic = this.logic;
|
|
105
|
+
|
|
106
|
+
if(this.expertSettings !== undefined)
|
|
107
|
+
params.expertSettings = this.expertSettings;
|
|
108
|
+
|
|
109
|
+
if(this.returnAbGroup !== undefined)
|
|
110
|
+
params.returnAbGroup = this.returnAbGroup;
|
|
111
|
+
|
|
112
|
+
return params;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Get query parameters
|
|
117
|
+
* @return {Object} The values of query parameters (name of parameter: value of the parameter)
|
|
118
|
+
*/
|
|
119
|
+
queryParameters() {
|
|
120
|
+
let params = {};
|
|
121
|
+
return params;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
exports.RecommendItemSegmentsToItemSegment = RecommendItemSegmentsToItemSegment
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*
|
|
2
|
+
This file is auto-generated, do not edit
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
'use strict';
|
|
6
|
+
const rqs = require("./request");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Recommends Segments from a Segmentation that are the most relevant to a particular item.
|
|
10
|
+
* Based on the used Segmentation, this endpoint can be used for example for:
|
|
11
|
+
* - Recommending the related categories
|
|
12
|
+
* - Recommending the related genres
|
|
13
|
+
* - Recommending the related brands
|
|
14
|
+
* - Recommending the related artists
|
|
15
|
+
* You need to set the used Segmentation the Admin UI in the Scenario settings prior to using this endpoint.
|
|
16
|
+
* The returned segments are sorted by relevance (first segment being the most relevant).
|
|
17
|
+
* It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters.
|
|
18
|
+
*/
|
|
19
|
+
class RecommendItemSegmentsToItem extends rqs.Request {
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Construct the request
|
|
23
|
+
* @param {string} itemId - ID of the item for which the recommendations are to be generated.
|
|
24
|
+
* @param {string} targetUserId - ID of the user who will see the recommendations.
|
|
25
|
+
* Specifying the *targetUserId* is beneficial because:
|
|
26
|
+
* * It makes the recommendations personalized
|
|
27
|
+
* * Allows the calculation of Actions and Conversions
|
|
28
|
+
* in the graphical user interface,
|
|
29
|
+
* as Recombee can pair the user who got recommendations
|
|
30
|
+
* and who afterward viewed/purchased an item.
|
|
31
|
+
* If you insist on not specifying the user, pass `null`
|
|
32
|
+
* (`None`, `nil`, `NULL` etc., depending on the language) to *targetUserId*.
|
|
33
|
+
* Do not create some special dummy user for getting recommendations,
|
|
34
|
+
* as it could mislead the recommendation models,
|
|
35
|
+
* and result in wrong recommendations.
|
|
36
|
+
* For anonymous/unregistered users, it is possible to use, for example, their session ID.
|
|
37
|
+
* @param {number} count - Number of item segments to be recommended (N for the top-N recommendation).
|
|
38
|
+
* @param {Object} optional - Optional parameters given as an object with structure name of the parameter: value
|
|
39
|
+
* - Allowed parameters:
|
|
40
|
+
* - *scenario*
|
|
41
|
+
* - Type: string
|
|
42
|
+
* - Description: Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
|
43
|
+
* 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.
|
|
44
|
+
* 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.
|
|
45
|
+
* - *cascadeCreate*
|
|
46
|
+
* - Type: boolean
|
|
47
|
+
* - Description: 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.
|
|
48
|
+
* - *filter*
|
|
49
|
+
* - Type: string
|
|
50
|
+
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended segments based on the `segmentationId`.
|
|
51
|
+
* - *booster*
|
|
52
|
+
* - Type: string
|
|
53
|
+
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`.
|
|
54
|
+
* - *logic*
|
|
55
|
+
* - Type: string|
|
|
56
|
+
* - Description: Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
|
57
|
+
* See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details.
|
|
58
|
+
* The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
|
|
59
|
+
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
|
|
60
|
+
* - *expertSettings*
|
|
61
|
+
* - Type:
|
|
62
|
+
* - Description: Dictionary of custom options.
|
|
63
|
+
* - *returnAbGroup*
|
|
64
|
+
* - Type: boolean
|
|
65
|
+
* - Description: If there is a custom AB-testing running, return the name of the group to which the request belongs.
|
|
66
|
+
*/
|
|
67
|
+
constructor(itemId, targetUserId, count, optional) {
|
|
68
|
+
super('POST', `/recomms/items/${itemId}/item-segments/`, 3000, false);
|
|
69
|
+
this.itemId = itemId;
|
|
70
|
+
this.targetUserId = targetUserId;
|
|
71
|
+
this.count = count;
|
|
72
|
+
optional = optional || {};
|
|
73
|
+
this.scenario = optional.scenario;
|
|
74
|
+
this.cascadeCreate = optional.cascadeCreate;
|
|
75
|
+
this.filter = optional.filter;
|
|
76
|
+
this.booster = optional.booster;
|
|
77
|
+
this.logic = optional.logic;
|
|
78
|
+
this.expertSettings = optional.expertSettings;
|
|
79
|
+
this.returnAbGroup = optional.returnAbGroup;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Get body parameters
|
|
84
|
+
* @return {Object} The values of body parameters (name of parameter: value of the parameter)
|
|
85
|
+
*/
|
|
86
|
+
bodyParameters() {
|
|
87
|
+
let params = {};
|
|
88
|
+
params.targetUserId = this.targetUserId;
|
|
89
|
+
params.count = this.count;
|
|
90
|
+
|
|
91
|
+
if(this.scenario !== undefined)
|
|
92
|
+
params.scenario = this.scenario;
|
|
93
|
+
|
|
94
|
+
if(this.cascadeCreate !== undefined)
|
|
95
|
+
params.cascadeCreate = this.cascadeCreate;
|
|
96
|
+
|
|
97
|
+
if(this.filter !== undefined)
|
|
98
|
+
params.filter = this.filter;
|
|
99
|
+
|
|
100
|
+
if(this.booster !== undefined)
|
|
101
|
+
params.booster = this.booster;
|
|
102
|
+
|
|
103
|
+
if(this.logic !== undefined)
|
|
104
|
+
params.logic = this.logic;
|
|
105
|
+
|
|
106
|
+
if(this.expertSettings !== undefined)
|
|
107
|
+
params.expertSettings = this.expertSettings;
|
|
108
|
+
|
|
109
|
+
if(this.returnAbGroup !== undefined)
|
|
110
|
+
params.returnAbGroup = this.returnAbGroup;
|
|
111
|
+
|
|
112
|
+
return params;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Get query parameters
|
|
117
|
+
* @return {Object} The values of query parameters (name of parameter: value of the parameter)
|
|
118
|
+
*/
|
|
119
|
+
queryParameters() {
|
|
120
|
+
let params = {};
|
|
121
|
+
return params;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
exports.RecommendItemSegmentsToItem = RecommendItemSegmentsToItem
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/*
|
|
2
|
+
This file is auto-generated, do not edit
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
'use strict';
|
|
6
|
+
const rqs = require("./request");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Recommends the top Segments from a Segmentation for a particular user, based on the user's past interactions.
|
|
10
|
+
* Based on the used Segmentation, this endpoint can be used for example for:
|
|
11
|
+
* - Recommending the top categories for the user
|
|
12
|
+
* - Recommending the top genres for the user
|
|
13
|
+
* - Recommending the top brands for the user
|
|
14
|
+
* - Recommending the top artists for the user
|
|
15
|
+
* You need to set the used Segmentation the Admin UI in the Scenario settings prior to using this endpoint.
|
|
16
|
+
* The returned segments are sorted by relevance (first segment being the most relevant).
|
|
17
|
+
* It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters.
|
|
18
|
+
*/
|
|
19
|
+
class RecommendItemSegmentsToUser extends rqs.Request {
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Construct the request
|
|
23
|
+
* @param {string} userId - ID of the user for whom personalized recommendations are to be generated.
|
|
24
|
+
* @param {number} count - Number of item segments to be recommended (N for the top-N recommendation).
|
|
25
|
+
* @param {Object} optional - Optional parameters given as an object with structure name of the parameter: value
|
|
26
|
+
* - Allowed parameters:
|
|
27
|
+
* - *scenario*
|
|
28
|
+
* - Type: string
|
|
29
|
+
* - Description: Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
|
30
|
+
* 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.
|
|
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
|
+
* - *cascadeCreate*
|
|
33
|
+
* - Type: boolean
|
|
34
|
+
* - Description: 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.
|
|
35
|
+
* - *filter*
|
|
36
|
+
* - Type: string
|
|
37
|
+
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended segments based on the `segmentationId`.
|
|
38
|
+
* - *booster*
|
|
39
|
+
* - Type: string
|
|
40
|
+
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`.
|
|
41
|
+
* - *logic*
|
|
42
|
+
* - Type: string|
|
|
43
|
+
* - Description: Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
|
44
|
+
* See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details.
|
|
45
|
+
* The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
|
|
46
|
+
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
|
|
47
|
+
* - *expertSettings*
|
|
48
|
+
* - Type:
|
|
49
|
+
* - Description: Dictionary of custom options.
|
|
50
|
+
* - *returnAbGroup*
|
|
51
|
+
* - Type: boolean
|
|
52
|
+
* - Description: If there is a custom AB-testing running, return the name of the group to which the request belongs.
|
|
53
|
+
*/
|
|
54
|
+
constructor(userId, count, optional) {
|
|
55
|
+
super('POST', `/recomms/users/${userId}/item-segments/`, 3000, false);
|
|
56
|
+
this.userId = userId;
|
|
57
|
+
this.count = count;
|
|
58
|
+
optional = optional || {};
|
|
59
|
+
this.scenario = optional.scenario;
|
|
60
|
+
this.cascadeCreate = optional.cascadeCreate;
|
|
61
|
+
this.filter = optional.filter;
|
|
62
|
+
this.booster = optional.booster;
|
|
63
|
+
this.logic = optional.logic;
|
|
64
|
+
this.expertSettings = optional.expertSettings;
|
|
65
|
+
this.returnAbGroup = optional.returnAbGroup;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Get body parameters
|
|
70
|
+
* @return {Object} The values of body parameters (name of parameter: value of the parameter)
|
|
71
|
+
*/
|
|
72
|
+
bodyParameters() {
|
|
73
|
+
let params = {};
|
|
74
|
+
params.count = this.count;
|
|
75
|
+
|
|
76
|
+
if(this.scenario !== undefined)
|
|
77
|
+
params.scenario = this.scenario;
|
|
78
|
+
|
|
79
|
+
if(this.cascadeCreate !== undefined)
|
|
80
|
+
params.cascadeCreate = this.cascadeCreate;
|
|
81
|
+
|
|
82
|
+
if(this.filter !== undefined)
|
|
83
|
+
params.filter = this.filter;
|
|
84
|
+
|
|
85
|
+
if(this.booster !== undefined)
|
|
86
|
+
params.booster = this.booster;
|
|
87
|
+
|
|
88
|
+
if(this.logic !== undefined)
|
|
89
|
+
params.logic = this.logic;
|
|
90
|
+
|
|
91
|
+
if(this.expertSettings !== undefined)
|
|
92
|
+
params.expertSettings = this.expertSettings;
|
|
93
|
+
|
|
94
|
+
if(this.returnAbGroup !== undefined)
|
|
95
|
+
params.returnAbGroup = this.returnAbGroup;
|
|
96
|
+
|
|
97
|
+
return params;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Get query parameters
|
|
102
|
+
* @return {Object} The values of query parameters (name of parameter: value of the parameter)
|
|
103
|
+
*/
|
|
104
|
+
queryParameters() {
|
|
105
|
+
let params = {};
|
|
106
|
+
return params;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
exports.RecommendItemSegmentsToUser = RecommendItemSegmentsToUser
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Recommends set of items that are somehow related to one given item, *X*.
|
|
10
|
-
* The returned items are sorted by relevance (first item being the most relevant).
|
|
9
|
+
* Recommends a set of items that are somehow related to one given item, *X*. A typical scenario is when the user *A* is viewing *X*. Then you may display items to the user that he might also be interested in. Recommend items to item request gives you Top-N such items, optionally taking the target user *A* into account.
|
|
10
|
+
* The returned items are sorted by relevance (the first item being the most relevant).
|
|
11
11
|
* Besides the recommended items, also a unique `recommId` is returned in the response. It can be used to:
|
|
12
|
-
* - Let Recombee know that this recommendation was successful (e.g
|
|
12
|
+
* - 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).
|
|
13
13
|
* - 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).
|
|
14
|
-
* It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters.
|
|
14
|
+
* 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.
|
|
15
15
|
*/
|
|
16
16
|
class RecommendItemsToItem extends rqs.Request {
|
|
17
17
|
|
|
@@ -24,27 +24,27 @@ class RecommendItemsToItem extends rqs.Request {
|
|
|
24
24
|
* * Allows the calculation of Actions and Conversions
|
|
25
25
|
* in the graphical user interface,
|
|
26
26
|
* as Recombee can pair the user who got recommendations
|
|
27
|
-
* and who
|
|
27
|
+
* and who afterward viewed/purchased an item.
|
|
28
28
|
* If you insist on not specifying the user, pass `null`
|
|
29
|
-
* (`None`, `nil`, `NULL` etc
|
|
29
|
+
* (`None`, `nil`, `NULL` etc., depending on the language) to *targetUserId*.
|
|
30
30
|
* Do not create some special dummy user for getting recommendations,
|
|
31
31
|
* as it could mislead the recommendation models,
|
|
32
32
|
* and result in wrong recommendations.
|
|
33
|
-
* For anonymous/unregistered users it is possible to use for example their session ID.
|
|
33
|
+
* For anonymous/unregistered users, it is possible to use, for example, their session ID.
|
|
34
34
|
* @param {number} count - Number of items to be recommended (N for the top-N recommendation).
|
|
35
35
|
* @param {Object} optional - Optional parameters given as an object with structure name of the parameter: value
|
|
36
36
|
* - Allowed parameters:
|
|
37
37
|
* - *scenario*
|
|
38
38
|
* - Type: string
|
|
39
|
-
* - Description: Scenario defines a particular application of recommendations. It can be for example "homepage", "cart" or "emailing".
|
|
40
|
-
* 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 performance of each scenario in the Admin UI separately, so you can check how well each application performs.
|
|
41
|
-
* The AI
|
|
39
|
+
* - Description: Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
|
40
|
+
* 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.
|
|
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
|
* - *cascadeCreate*
|
|
43
43
|
* - Type: boolean
|
|
44
|
-
* - Description: If item of given *itemId* or user of given *targetUserId* doesn't exist in the database, it creates the missing entity/entities and returns some (non-personalized) recommendations. This allows for example rotations in the following recommendations for the user of given *targetUserId*, as the user will be already known to the system.
|
|
44
|
+
* - Description: If an item of the given *itemId* or user of the given *targetUserId* doesn't exist in the database, it creates the missing entity/entities 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.
|
|
45
45
|
* - *returnProperties*
|
|
46
46
|
* - Type: boolean
|
|
47
|
-
* - 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
|
|
47
|
+
* - 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 to easily display the recommended items to the user.
|
|
48
48
|
* Example response:
|
|
49
49
|
* ```
|
|
50
50
|
* {
|
|
@@ -75,7 +75,7 @@ class RecommendItemsToItem extends rqs.Request {
|
|
|
75
75
|
* ```
|
|
76
76
|
* - *includedProperties*
|
|
77
77
|
* - Type: string[]
|
|
78
|
-
* - Description: Allows
|
|
78
|
+
* - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
|
|
79
79
|
* Example response for `includedProperties=description,price`:
|
|
80
80
|
* ```
|
|
81
81
|
* {
|
|
@@ -102,39 +102,39 @@ class RecommendItemsToItem extends rqs.Request {
|
|
|
102
102
|
* ```
|
|
103
103
|
* - *filter*
|
|
104
104
|
* - Type: string
|
|
105
|
-
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes.
|
|
106
|
-
* Filters can be
|
|
105
|
+
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes.
|
|
106
|
+
* Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
|
|
107
107
|
* - *booster*
|
|
108
108
|
* - Type: string
|
|
109
|
-
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes.
|
|
110
|
-
* Boosters can be
|
|
109
|
+
* - Description: 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.
|
|
110
|
+
* Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
|
|
111
111
|
* - *logic*
|
|
112
112
|
* - Type: string|
|
|
113
|
-
* - Description: Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
|
114
|
-
* See [this section](https://docs.recombee.com/recommendation_logics.html) for list of available logics and other details.
|
|
113
|
+
* - Description: Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
|
114
|
+
* See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details.
|
|
115
115
|
* The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
|
|
116
|
-
* Logic can be
|
|
116
|
+
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
|
|
117
117
|
* - *userImpact*
|
|
118
118
|
* - Type: number
|
|
119
|
-
* - Description: **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 user-based recommendation. The default value is `0`.
|
|
119
|
+
* - Description: **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`.
|
|
120
120
|
* - *diversity*
|
|
121
121
|
* - Type: number
|
|
122
|
-
* - Description: **Expert option** Real number from [0.0, 1.0] which determines how
|
|
122
|
+
* - Description: **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.
|
|
123
123
|
* - *minRelevance*
|
|
124
124
|
* - Type: string
|
|
125
|
-
* - Description: **Expert option** If the *targetUserId* is provided: Specifies the threshold of how
|
|
125
|
+
* - Description: **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.
|
|
126
126
|
* - *rotationRate*
|
|
127
127
|
* - Type: number
|
|
128
|
-
* - Description: **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
|
|
128
|
+
* - Description: **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.
|
|
129
129
|
* - *rotationTime*
|
|
130
130
|
* - Type: number
|
|
131
|
-
* - Description: **Expert option** If the *targetUserId* is provided: Taking *rotationRate* into account, specifies how long
|
|
131
|
+
* - Description: **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.
|
|
132
132
|
* - *expertSettings*
|
|
133
133
|
* - Type:
|
|
134
134
|
* - Description: Dictionary of custom options.
|
|
135
135
|
* - *returnAbGroup*
|
|
136
136
|
* - Type: boolean
|
|
137
|
-
* - Description: If there is a custom AB-testing running, return name of group to which the request belongs.
|
|
137
|
+
* - Description: If there is a custom AB-testing running, return the name of the group to which the request belongs.
|
|
138
138
|
*/
|
|
139
139
|
constructor(itemId, targetUserId, count, optional) {
|
|
140
140
|
super('POST', `/recomms/items/${itemId}/items/`, 3000, false);
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Based on user's past interactions (purchases, ratings, etc.) with the items, recommends top-N items that are most likely to be of high value for
|
|
10
|
-
* The most typical use cases are recommendations
|
|
11
|
-
* The returned items are sorted by relevance (first item being the most relevant).
|
|
9
|
+
* Based on the user's past interactions (purchases, ratings, etc.) with the items, recommends top-N items that are most likely to be of high value for the given user.
|
|
10
|
+
* The most typical use cases are recommendations on the homepage, in some "Picked just for you" section, or in email.
|
|
11
|
+
* The returned items are sorted by relevance (the first item being the most relevant).
|
|
12
12
|
* Besides the recommended items, also a unique `recommId` is returned in the response. It can be used to:
|
|
13
|
-
* - Let Recombee know that this recommendation was successful (e.g
|
|
13
|
+
* - 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).
|
|
14
14
|
* - 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).
|
|
15
|
-
* It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters.
|
|
15
|
+
* 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.
|
|
16
16
|
*/
|
|
17
17
|
class RecommendItemsToUser extends rqs.Request {
|
|
18
18
|
|
|
@@ -24,15 +24,15 @@ class RecommendItemsToUser extends rqs.Request {
|
|
|
24
24
|
* - Allowed parameters:
|
|
25
25
|
* - *scenario*
|
|
26
26
|
* - Type: string
|
|
27
|
-
* - Description: Scenario defines a particular application of recommendations. It can be for example "homepage", "cart" or "emailing".
|
|
28
|
-
* 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 performance of each scenario in the Admin UI separately, so you can check how well each application performs.
|
|
29
|
-
* The AI
|
|
27
|
+
* - Description: Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
|
28
|
+
* 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
|
+
* 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.
|
|
30
30
|
* - *cascadeCreate*
|
|
31
31
|
* - Type: boolean
|
|
32
|
-
* - Description: 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.
|
|
32
|
+
* - Description: 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.
|
|
33
33
|
* - *returnProperties*
|
|
34
34
|
* - Type: boolean
|
|
35
|
-
* - 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
|
|
35
|
+
* - 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 to easily display the recommended items to the user.
|
|
36
36
|
* Example response:
|
|
37
37
|
* ```
|
|
38
38
|
* {
|
|
@@ -63,7 +63,7 @@ class RecommendItemsToUser extends rqs.Request {
|
|
|
63
63
|
* ```
|
|
64
64
|
* - *includedProperties*
|
|
65
65
|
* - Type: string[]
|
|
66
|
-
* - Description: Allows
|
|
66
|
+
* - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
|
|
67
67
|
* Example response for `includedProperties=description,price`:
|
|
68
68
|
* ```
|
|
69
69
|
* {
|
|
@@ -90,36 +90,36 @@ class RecommendItemsToUser extends rqs.Request {
|
|
|
90
90
|
* ```
|
|
91
91
|
* - *filter*
|
|
92
92
|
* - Type: string
|
|
93
|
-
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes.
|
|
94
|
-
* Filters can be
|
|
93
|
+
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes.
|
|
94
|
+
* Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
|
|
95
95
|
* - *booster*
|
|
96
96
|
* - Type: string
|
|
97
|
-
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes.
|
|
98
|
-
* Boosters can be
|
|
97
|
+
* - Description: 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.
|
|
98
|
+
* Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
|
|
99
99
|
* - *logic*
|
|
100
100
|
* - Type: string|
|
|
101
|
-
* - Description: Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
|
102
|
-
* See [this section](https://docs.recombee.com/recommendation_logics.html) for list of available logics and other details.
|
|
101
|
+
* - Description: Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
|
102
|
+
* See [this section](https://docs.recombee.com/recommendation_logics.html) for a list of available logics and other details.
|
|
103
103
|
* The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
|
|
104
|
-
* Logic can be
|
|
104
|
+
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
|
|
105
105
|
* - *diversity*
|
|
106
106
|
* - Type: number
|
|
107
|
-
* - Description: **Expert option** Real number from [0.0, 1.0] which determines how
|
|
107
|
+
* - Description: **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.
|
|
108
108
|
* - *minRelevance*
|
|
109
109
|
* - Type: string
|
|
110
|
-
* - Description: **Expert option** Specifies the threshold of how
|
|
110
|
+
* - Description: **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.
|
|
111
111
|
* - *rotationRate*
|
|
112
112
|
* - Type: number
|
|
113
|
-
* - 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
|
|
113
|
+
* - 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 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`.
|
|
114
114
|
* - *rotationTime*
|
|
115
115
|
* - Type: number
|
|
116
|
-
* - Description: **Expert option** Taking *rotationRate* into account, specifies how long
|
|
116
|
+
* - Description: **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`.
|
|
117
117
|
* - *expertSettings*
|
|
118
118
|
* - Type:
|
|
119
119
|
* - Description: Dictionary of custom options.
|
|
120
120
|
* - *returnAbGroup*
|
|
121
121
|
* - Type: boolean
|
|
122
|
-
* - Description: If there is a custom AB-testing running, return name of group to which the request belongs.
|
|
122
|
+
* - Description: If there is a custom AB-testing running, return the name of the group to which the request belongs.
|
|
123
123
|
*/
|
|
124
124
|
constructor(userId, count, optional) {
|
|
125
125
|
super('POST', `/recomms/users/${userId}/items/`, 3000, false);
|