mirror of
https://git.auk.su/Dinect/bonus-import-tools.git
synced 2025-12-28 18:10:01 +00:00
added user search
This commit is contained in:
@@ -80,7 +80,7 @@ def get_user(search_id, get_type='auto', headers=None) -> tuple:
|
||||
# return False, r.text
|
||||
|
||||
|
||||
def new_user(nickname, phone, gender=None, foreign_card=None, headers=None):
|
||||
def new_user(full_name, phone, gender=None, foreign_card=None, email=None, headers=None):
|
||||
"""
|
||||
A function that creates a new user with optional headers.
|
||||
|
||||
@@ -91,11 +91,12 @@ def new_user(nickname, phone, gender=None, foreign_card=None, headers=None):
|
||||
tuple: A tuple containing a boolean indicating the success of the request and the JSON response.
|
||||
If the request is successful, the boolean is True and the JSON response is returned.
|
||||
If the request is unsuccessful, the boolean is False and the JSON response is returned.
|
||||
:param email:
|
||||
:param gender:
|
||||
:param foreign_card:
|
||||
:param headers:
|
||||
:param phone:
|
||||
:param nickname :
|
||||
:param full_name :
|
||||
"""
|
||||
if headers is None:
|
||||
headers = HEADERS
|
||||
@@ -104,8 +105,9 @@ def new_user(nickname, phone, gender=None, foreign_card=None, headers=None):
|
||||
|
||||
params = {
|
||||
# "short_name": nickname,
|
||||
"full_name": nickname,
|
||||
"full_name": full_name,
|
||||
"phone": phone,
|
||||
"email": email,
|
||||
# "gender": gender,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user