From c37c5dcc3720e04112bff3610598ee88efd0b8d6 Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Mon, 9 May 2016 01:39:40 +0100 Subject: [PATCH] reworked SteamClient example in user_guide --- docs/user_guide.rst | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/docs/user_guide.rst b/docs/user_guide.rst index 54d2263..9530f3b 100644 --- a/docs/user_guide.rst +++ b/docs/user_guide.rst @@ -169,7 +169,7 @@ Configuring logging will lets us see the internal interactions. } client = SteamClient() - #client.cm.verbose_debug = True + #client.verbose_debug = True @client.on('error') def print_error(result): @@ -179,20 +179,12 @@ Configuring logging will lets us see the internal interactions. def auth_code_prompt(is_2fa, code_mismatch): if is_2fa: code = raw_input("Enter 2FA Code: ") - logOnDetails.update({'two_factor_code': code}) + client.login(two_factor_code=code, **logOnDetails) else: code = raw_input("Enter Email Code: ") - logOnDetails.update({'auth_code': code}) + client.login(auth_code=code, **logOnDetails) - client.connect() - - @client.on('channel_secured') - def send_login(): - client.login(**logOnDetails) - # OR - # client.anonymous_login() - - client.connect() + client.login(**logOnDetails) msg, = client.wait_event(EMsg.ClientAccountInfo) print "Logged on as: %s" % msg.body.persona_name