Package recombee_api_client :: Package api_requests :: Module merge_users :: Class MergeUsers
[hide private]
[frames] | no frames]

Class MergeUsers

source code

     object --+    
request.Request --+

Merges interactions (purchases, ratings, bookmarks, detail views ...) of two different users under a single user ID. This is especially useful for online e-commerce applications working with anonymous users identified by unique tokens such as the session ID. In such applications, it may often happen that a user owns a persistent account, yet accesses the system anonymously while, e.g., putting items into a shopping cart. At some point in time, such as when the user wishes to confirm the purchase, (s)he logs into the system using his/her username and password. The interactions made under anonymous session ID then become connected with the persistent account, and merging these two together becomes desirable.

Merging happens between two users referred to as the *target* and the *source*. After the merge, all the interactions of the source user are attributed to the target user, and the source user is **deleted**.

Instance Methods [hide private]
__init__(self, target_user_id, source_user_id, cascade_create=UUID('9192eaf5-a625-4a06-9a84-bf8dba3002c8'))
Required parameters:
source code
Values of body parameters as a dictionary (name of parameter: value of the parameter).
source code
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, target_user_id, source_user_id, cascade_create=UUID('9192eaf5-a625-4a06-9a84-bf8dba3002c8'))

source code 

Required parameters:

  • target_user_id - ID of the targer user.
  • source_user_id - ID of the source user.

    Optional parameters:

  • cascade_create - Sets whether the user *targetUserId* should be created if not present in the database.
Overrides: object.__init__