recombee-api-client
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -47,3 +47,3 @@ 'use strict'; | ||
'Content-Type': 'application/json', | ||
'User-Agent': 'recombee-node-api-client/2.0.0'}, | ||
'User-Agent': 'recombee-node-api-client/2.1.0'}, | ||
timeout: request.timeout, | ||
@@ -50,0 +50,0 @@ resolveWithFullResponse: true, |
@@ -16,3 +16,3 @@ /* | ||
* @param {string} propertyName - Name of the item property to be created. Currently, the following names are reserved:`id`, `itemid`, case insensitively. Also, the length of the property name must not exceed 63 characters. | ||
* @param {string} type - Value type of the item property to be created. One of: `int`, `double`, `string`, `boolean`, `timestamp`, `set` | ||
* @param {string} type - Value type of the item property to be created. One of: `int`, `double`, `string`, `boolean`, `timestamp`, `set`, `image` or `imageList`. | ||
*/ | ||
@@ -19,0 +19,0 @@ constructor(propertyName, type) { |
@@ -9,3 +9,2 @@ /* | ||
/** | ||
* The view portions feature is currently experimental. | ||
* Deletes an existing view portion specified by (`userId`, `itemId`, `sessionId`) from the database. | ||
@@ -12,0 +11,0 @@ */ |
@@ -95,6 +95,6 @@ /* | ||
* - Type: number | ||
* - 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 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. | ||
* - 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 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.01`. | ||
* - *rotationTime* | ||
* - Type: number | ||
* - Description: **Expert option** If the *targetUserId* is provided: Taking *rotationRate* into account, specifies how long time it takes to an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized. | ||
* - Description: **Expert option** If the *targetUserId* is provided: Taking *rotationRate* into account, specifies how long time it takes to 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`. | ||
* - *expertSettings* | ||
@@ -101,0 +101,0 @@ * - Type: |
@@ -9,3 +9,2 @@ /* | ||
/** | ||
* The view portions feature is currently experimental. | ||
* List all the view portions of an item ever submitted by different users. | ||
@@ -12,0 +11,0 @@ */ |
@@ -9,3 +9,2 @@ /* | ||
/** | ||
* The view portions feature is currently experimental. | ||
* List all the view portions ever submitted by a given user. | ||
@@ -12,0 +11,0 @@ */ |
@@ -16,4 +16,4 @@ /* | ||
* Construct the request | ||
* @param {string} targetUserId - ID of the source user. | ||
* @param {string} sourceUserId - ID of the target user. | ||
* @param {string} targetUserId - ID of the targer user. | ||
* @param {string} sourceUserId - ID of the source user. | ||
* @param {Object} optional - Optional parameters given as an object with structure name of the parameter: value | ||
@@ -20,0 +20,0 @@ * - Allowed parameters: |
@@ -96,6 +96,6 @@ /* | ||
* - Type: number | ||
* - 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. | ||
* - 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. Default: `0.1`. | ||
* - *rotationTime* | ||
* - Type: number | ||
* - Description: **Expert option** Taking *rotationRate* into account, specifies how long time it takes to an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized. | ||
* - Description: **Expert option** Taking *rotationRate* into account, specifies how long time it takes to 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`. | ||
* - *expertSettings* | ||
@@ -102,0 +102,0 @@ * - Type: |
@@ -10,3 +10,3 @@ 'use strict'; | ||
* Construct the basis of request | ||
* @param {string} method - HTTP or HTTPS | ||
* @param {string} method - GET/PUT/POST/DELETE | ||
* @param {string} path - Path to the endpoint | ||
@@ -13,0 +13,0 @@ * @param {number} timeout - Timeout in milliseconds |
@@ -9,3 +9,2 @@ /* | ||
/** | ||
* The view portions feature is currently experimental. | ||
* Sets viewed portion of an item (for example a video or article) by a user (at a session). | ||
@@ -20,3 +19,3 @@ * If you send new request with the same (`userId`, `itemId`, `sessionId`), the portion gets updated. | ||
* @param {string} itemId - Viewed item | ||
* @param {number} portion - Viewed portion of the item (number between 0.0 (viewed nothing) and 1.0 (viewed full item) ). | ||
* @param {number} portion - Viewed portion of the item (number between 0.0 (viewed nothing) and 1.0 (viewed full item) ). It should be the really viewed part of the item, no matter seeking, so for example if the user seeked immediately to half of the item and then viewed 10% of the item, the `portion` should still be `0.1`. | ||
* @param {Object} optional - Optional parameters given as an object with structure name of the parameter: value | ||
@@ -26,3 +25,3 @@ * - Allowed parameters: | ||
* - Type: string | ||
* - Description: Id of session in which the user viewed the item | ||
* - Description: ID of session in which the user viewed the item. Default is `null` (`None`, `nil`, `NULL` etc. depending on language). | ||
* - *timestamp* | ||
@@ -29,0 +28,0 @@ * - Type: string|number |
@@ -84,6 +84,6 @@ /* | ||
* - Type: number | ||
* - 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. | ||
* - 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. Default: `0.1`. | ||
* - *rotationTime* | ||
* - Type: number | ||
* - Description: **Expert option** Taking *rotationRate* into account, specifies how long time it takes to an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized. | ||
* - Description: **Expert option** Taking *rotationRate* into account, specifies how long time it takes to 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`. | ||
* - *expertSettings* | ||
@@ -90,0 +90,0 @@ * - Type: |
{ | ||
"name": "recombee-api-client", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Node.js client (SDK) for easy use of the Recombee recommendation API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -96,13 +96,15 @@ # Recombee API Client | ||
// We will use computers as items in this example | ||
// Computers have three properties | ||
// Computers have four properties | ||
// - price (floating point number) | ||
// - number of processor cores (integer number) | ||
// - description (string) | ||
// - image (url of computer's photo) | ||
// Add properties of items | ||
client.send(new rqs.Batch([new rqs.ResetDatabase(), //TODO | ||
client.send(new rqs.Batch([ | ||
new rqs.AddItemProperty('price', 'double'), | ||
new rqs.AddItemProperty('num-cores', 'int'), | ||
new rqs.AddItemProperty('description', 'string'), | ||
new rqs.AddItemProperty('time', 'timestamp') | ||
new rqs.AddItemProperty('time', 'timestamp'), | ||
new rqs.AddItemProperty('image', 'image') | ||
])) | ||
@@ -120,3 +122,4 @@ .then((responses) => { | ||
'description': 'Great computer', | ||
'time': new Date().toISOString() | ||
'time': new Date().toISOString(), | ||
'image': `http://examplesite.com/products/computer-${i}.jpg` | ||
}, | ||
@@ -123,0 +126,0 @@ //optional parameters: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
363874
188
11922