@@ -394,7 +394,7 @@ def get_user(self, **kwargs):
394
394
raise TypeError ('Unsupported keyword arguments: {0}.' .format (kwargs ))
395
395
396
396
try :
397
- response = self ._client .request ('post' , 'getAccountInfo' , json = payload )
397
+ response = self ._client .body ('post' , 'getAccountInfo' , json = payload )
398
398
except requests .exceptions .RequestException as error :
399
399
msg = 'Failed to get user by {0}: {1}.' .format (key_type , key )
400
400
self ._handle_http_error (INTERNAL_ERROR , msg , error )
@@ -421,7 +421,7 @@ def list_users(self, page_token=None, max_results=MAX_LIST_USERS_RESULTS):
421
421
if page_token :
422
422
payload ['nextPageToken' ] = page_token
423
423
try :
424
- return self ._client .request ('post' , 'downloadAccount' , json = payload )
424
+ return self ._client .body ('post' , 'downloadAccount' , json = payload )
425
425
except requests .exceptions .RequestException as error :
426
426
self ._handle_http_error (USER_DOWNLOAD_ERROR , 'Failed to download user accounts.' , error )
427
427
@@ -440,7 +440,7 @@ def create_user(self, uid=None, display_name=None, email=None, phone_number=None
440
440
}
441
441
payload = {k : v for k , v in payload .items () if v is not None }
442
442
try :
443
- response = self ._client .request ('post' , 'signupNewUser' , json = payload )
443
+ response = self ._client .body ('post' , 'signupNewUser' , json = payload )
444
444
except requests .exceptions .RequestException as error :
445
445
self ._handle_http_error (USER_CREATE_ERROR , 'Failed to create new user.' , error )
446
446
else :
@@ -490,7 +490,7 @@ def update_user(self, uid, display_name=_UNSPECIFIED, email=None, phone_number=_
490
490
491
491
payload = {k : v for k , v in payload .items () if v is not None }
492
492
try :
493
- response = self ._client .request ('post' , 'setAccountInfo' , json = payload )
493
+ response = self ._client .body ('post' , 'setAccountInfo' , json = payload )
494
494
except requests .exceptions .RequestException as error :
495
495
self ._handle_http_error (
496
496
USER_UPDATE_ERROR , 'Failed to update user: {0}.' .format (uid ), error )
@@ -503,7 +503,7 @@ def delete_user(self, uid):
503
503
"""Deletes the user identified by the specified user ID."""
504
504
_auth_utils .validate_uid (uid , required = True )
505
505
try :
506
- response = self ._client .request ('post' , 'deleteAccount' , json = {'localId' : uid })
506
+ response = self ._client .body ('post' , 'deleteAccount' , json = {'localId' : uid })
507
507
except requests .exceptions .RequestException as error :
508
508
self ._handle_http_error (
509
509
USER_DELETE_ERROR , 'Failed to delete user: {0}.' .format (uid ), error )
@@ -529,7 +529,7 @@ def import_users(self, users, hash_alg=None):
529
529
raise ValueError ('A UserImportHash is required to import users with passwords.' )
530
530
payload .update (hash_alg .to_dict ())
531
531
try :
532
- response = self ._client .request ('post' , 'uploadAccount' , json = payload )
532
+ response = self ._client .body ('post' , 'uploadAccount' , json = payload )
533
533
except requests .exceptions .RequestException as error :
534
534
self ._handle_http_error (USER_IMPORT_ERROR , 'Failed to import users.' , error )
535
535
else :
0 commit comments