forked from recombee/python-api-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_user.py
More file actions
34 lines (25 loc) · 878 Bytes
/
add_user.py
File metadata and controls
34 lines (25 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from recombee_api_client.api_requests.request import Request
from typing import Union, List
import uuid
DEFAULT = uuid.uuid4()
class AddUser(Request):
"""
Adds a new user to the database.
Required parameters:
:param user_id: ID of the user to be added.
"""
def __init__(self, user_id: str):
super().__init__(path="/users/%s" % (user_id), method='put', timeout=1000, ensure_https=False)
self.user_id = user_id
def get_body_parameters(self) -> dict:
"""
Values of body parameters as a dictionary (name of parameter: value of the parameter).
"""
p = dict()
return p
def get_query_parameters(self) -> dict:
"""
Values of query parameters as a dictionary (name of parameter: value of the parameter).
"""
params = dict()
return params