edit_profile now returns True or False depending on success.
This commit is contained in:
parent
66c39b6151
commit
03d477edd8
@ -782,6 +782,7 @@ class Client(object):
|
|||||||
:param new_password: The new password you wish to change to.
|
:param new_password: The new password you wish to change to.
|
||||||
:param email: The new email you wish to change to.
|
:param email: The new email you wish to change to.
|
||||||
:param username: The new username you wish to change to.
|
:param username: The new username you wish to change to.
|
||||||
|
:returns: True if profile edit was successful, False otherwise.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
payload = {
|
payload = {
|
||||||
@ -802,8 +803,10 @@ class Client(object):
|
|||||||
self.email = data['email']
|
self.email = data['email']
|
||||||
self.headers['authorization'] = self.token
|
self.headers['authorization'] = self.token
|
||||||
self.user = User(**data)
|
self.user = User(**data)
|
||||||
|
return True
|
||||||
else:
|
else:
|
||||||
log.debug(request_logging_format.format(response=response, name='edit_profile'))
|
log.debug(request_logging_format.format(response=response, name='edit_profile'))
|
||||||
|
return False
|
||||||
|
|
||||||
def edit_channel(self, channel, **options):
|
def edit_channel(self, channel, **options):
|
||||||
"""Edits a :class:`Channel`.
|
"""Edits a :class:`Channel`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user