Class: AddRating

AddRating(userId, itemId, rating, optional)

Adds a rating of given item made by a given user.

Constructor

new AddRating(userId, itemId, rating, optional)

Construct the request
Parameters:
Name Type Description
userId string User who submitted the rating
itemId string Rated item
rating number Rating rescaled to interval [-1.0,1.0], where -1.0 means the worst rating possible, 0.0 means neutral, and 1.0 means absolutely positive rating. For example, in the case of 5-star evaluations, rating = (numStars-3)/2 formula may be used for the conversion.
optional Object Optional parameters given as an object with structure name of the parameter: value - Allowed parameters: - *timestamp* - Type: string|number - Description: UTC timestamp of the rating as ISO8601-1 pattern or UTC epoch time. The default value is the current time. - *cascadeCreate* - Type: boolean - Description: Sets whether the given user/item should be created if not present in the database. - *recommId* - Type: string - Description: If this rating is based on a recommendation request, `recommId` is the id of the clicked recommendation. - *additionalData* - Type: - Description: A dictionary of additional data for the interaction.
Source:

Methods

bodyParameters() → {Object}

Get body parameters
Source:
Returns:
The values of body parameters (name of parameter: value of the parameter)
Type
Object

queryParameters() → {Object}

Get query parameters
Source:
Returns:
The values of query parameters (name of parameter: value of the parameter)
Type
Object