Browse Source

remove change_email method

pull/180/head
Rossen Georgiev 6 years ago
parent
commit
f1df605ae3
  1. 34
      steam/client/builtins/account.py
  2. 4
      steam/core/msg/__init__.py

34
steam/client/builtins/account.py

@ -68,37 +68,3 @@ class Account(object):
return EResult.Timeout return EResult.Timeout
else: else:
return EResult(resp.eresult) return EResult(resp.eresult)
def change_email(self, password, email, code=''):
"""Change account's email address
:param password: current account password
:type password: :class:`str`
:param email: new email address
:type email: :class:`str`
:param code: email code
:type code: :class:`str`
:return: result
:rtype: :class:`.EResult`
.. note::
To change email, first call without ``code``
and then with, to finalize the change
"""
message = MsgProto(EMsg.ClientEmailChange4)
message.body.password = password
message.body.email = email
if code:
message.body.code = code
message.body.final = not not code
message.body.newmethod = True
message.body.client_supports_sms = True
resp = self.send_job_and_wait(message, timeout=10)
if resp is None:
return EResult.Timeout
else:
return EResult(resp.eresult)

4
steam/core/msg/__init__.py

@ -18,8 +18,8 @@ cmsg_lookup_predefined = {
EMsg.ServiceMethodResponse: steammessages_clientserver_2_pb2.CMsgClientServiceMethodResponse, EMsg.ServiceMethodResponse: steammessages_clientserver_2_pb2.CMsgClientServiceMethodResponse,
EMsg.ClientGetNumberOfCurrentPlayersDP: steammessages_clientserver_2_pb2.CMsgDPGetNumberOfCurrentPlayers, EMsg.ClientGetNumberOfCurrentPlayersDP: steammessages_clientserver_2_pb2.CMsgDPGetNumberOfCurrentPlayers,
EMsg.ClientGetNumberOfCurrentPlayersDPResponse: steammessages_clientserver_2_pb2.CMsgDPGetNumberOfCurrentPlayersResponse, EMsg.ClientGetNumberOfCurrentPlayersDPResponse: steammessages_clientserver_2_pb2.CMsgDPGetNumberOfCurrentPlayersResponse,
EMsg.ClientEmailChange4: steammessages_clientserver_2_pb2.CMsgClientEmailChange, # EMsg.ClientEmailChange4: steammessages_clientserver_2_pb2.CMsgClientEmailChange,
EMsg.ClientEmailChangeResponse4: steammessages_clientserver_2_pb2.CMsgClientEmailChangeResponse, # EMsg.ClientEmailChangeResponse4: steammessages_clientserver_2_pb2.CMsgClientEmailChangeResponse,
EMsg.ClientLogonGameServer: steammessages_clientserver_login_pb2.CMsgClientLogon, EMsg.ClientLogonGameServer: steammessages_clientserver_login_pb2.CMsgClientLogon,
} }

Loading…
Cancel
Save