Browse Source

docs and recipe tweaks

pull/287/head
Rossen Georgiev 5 years ago
parent
commit
2a28c0e509
  1. 2
      docs/user_guide.rst
  2. 6
      recipes/1.Login/diy_one_off_login.py
  3. 2
      recipes/2.SimpleWebAPI/steam_worker.py

2
docs/user_guide.rst

@ -161,7 +161,7 @@ After that we logout.
.. code:: python
from steam.steamid import SteamClient
from steam.client import SteamClient
from steam.enums.emsg import EMsg
client = SteamClient()

6
recipes/1.Login/diy_one_off_login.py

@ -7,7 +7,7 @@ print("One-off login recipe")
print("-"*20)
LOGON_DETAILS = {
'username': raw_input("Steam user: "),
'username': input("Steam user: "),
'password': getpass("Password: "),
}
@ -20,10 +20,10 @@ def error(result):
@client.on('auth_code_required')
def auth_code_prompt(is_2fa, mismatch):
if is_2fa:
code = raw_input("Enter 2FA Code: ")
code = input("Enter 2FA Code: ")
client.login(two_factor_code=code, **LOGON_DETAILS)
else:
code = raw_input("Enter Email Code: ")
code = input("Enter Email Code: ")
client.login(auth_code=code, **LOGON_DETAILS)

2
recipes/2.SimpleWebAPI/steam_worker.py

@ -4,7 +4,7 @@ from binascii import hexlify
from steam.client import SteamClient
from steam.core.msg import MsgProto
from steam.enums.emsg import EMsg
from steam.util import proto_to_dict
from steam.utils.proto import proto_to_dict
import vdf
LOG = logging.getLogger("Steam Worker")

Loading…
Cancel
Save