added user search

This commit is contained in:
Sergey
2024-08-09 15:14:10 +03:00
parent e2c0ff8a1d
commit 273b97bbc7
2 changed files with 24 additions and 6 deletions

View File

@@ -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,
}