recombee_api_client.api_requests.add_rating module¶
-
class
recombee_api_client.api_requests.add_rating.
AddRating
(user_id, item_id, rating, timestamp=UUID('16bc1398-5cfd-42bc-b7df-e0249a22ba61'), cascade_create=UUID('16bc1398-5cfd-42bc-b7df-e0249a22ba61'), recomm_id=UUID('16bc1398-5cfd-42bc-b7df-e0249a22ba61'), additional_data=UUID('16bc1398-5cfd-42bc-b7df-e0249a22ba61'))¶ Bases:
recombee_api_client.api_requests.request.Request
Adds a rating of given item made by a given user.
Required parameters:
- Parameters
user_id – User who submitted the rating
item_id – Rated item
rating – 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 parameters:
- Parameters
timestamp – UTC timestamp of the rating as ISO8601-1 pattern or UTC epoch time. The default value is the current time.
cascade_create – Sets whether the given user/item should be created if not present in the database.
recomm_id – If this rating is based on a recommendation request, recommId is the id of the clicked recommendation.
additional_data – A dictionary of additional data for the interaction.
-
get_body_parameters
()¶ Values of body parameters as a dictionary (name of parameter: value of the parameter).
-
get_query_parameters
()¶ Values of query parameters as a dictionary (name of parameter: value of the parameter).