Package recombee_api_client :: Package api_requests :: Module set_view_portion :: Class SetViewPortion
[hide private]
[frames] | no frames]

Class SetViewPortion

source code

     object --+    
              |    
request.Request --+
                  |
                 SetViewPortion

Sets viewed portion of an item (for example a video or article) by a user (at a session). If you send new request with the same (`userId`, `itemId`, `sessionId`), the portion gets updated.

Instance Methods [hide private]
 
__init__(self, user_id, item_id, portion, session_id=UUID('b5a1d36f-aff2-4bad-8073-310983866ee9'), timestamp=UUID('b5a1d36f-aff2-4bad-8073-310983866ee9'), cascade_create=UUID('b5a1d36f-aff2-4bad-8073-310983866ee9'), recomm_id=UUID('b5a1d36f-aff2-4bad-8073-310983866ee9'))
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, portion, session_id=UUID('b5a1d36f-aff2-4bad-8073-310983866ee9'), timestamp=UUID('b5a1d36f-aff2-4bad-8073-310983866ee9'), cascade_create=UUID('b5a1d36f-aff2-4bad-8073-310983866ee9'), recomm_id=UUID('b5a1d36f-aff2-4bad-8073-310983866ee9'))
(Constructor)

source code 

Required parameters:

Parameters:
  • user_id - User who viewed a portion of the item
  • item_id - Viewed item
  • 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`.

    Optional parameters:

  • session_id - ID of session in which the user viewed the item. Default is `null` (`None`, `nil`, `NULL` etc. depending on language).
  • 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 view portion is based on a recommendation request, `recommId` is the id of the clicked recommendation.
Overrides: object.__init__