Package recombee_api_client :: Package api_requests :: Module add_rating :: Class AddRating
[hide private]
[frames] | no frames]

Class AddRating

source code

     object --+    
              |    
request.Request --+
                  |
                 AddRating

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

Instance Methods [hide private]
 
__init__(self, user_id, item_id, rating, timestamp=UUID('984e5364-7add-4341-b817-93ec0fde19f3'), cascade_create=UUID('984e5364-7add-4341-b817-93ec0fde19f3'), recomm_id=UUID('984e5364-7add-4341-b817-93ec0fde19f3'))
Required parameters:
source code
 
get_body_parameters(self)
Values of body parameters as a dictionary (name of parameter: value of the parameter).
source code
 
get_query_parameters(self)
Values of query parameters as a dictionary (name of parameter: value of the parameter).
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from request.Request: quote_path_param

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, user_id, item_id, rating, timestamp=UUID('984e5364-7add-4341-b817-93ec0fde19f3'), cascade_create=UUID('984e5364-7add-4341-b817-93ec0fde19f3'), recomm_id=UUID('984e5364-7add-4341-b817-93ec0fde19f3'))
(Constructor)

source code 

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:

  • 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.
Overrides: object.__init__