Readme: example updated

This commit is contained in:
DarkCat09 2023-06-01 17:59:33 +04:00
parent 09b9d9f238
commit f98dfc7cfc

View file

@ -79,17 +79,20 @@ Here is an example how to use the API:
from python_aternos import Client from python_aternos import Client
# Create object # Create object
aternos = Client() atclient = Client()
# Log in # Log in
# with username and password # with username and password
aternos.login('example', 'test123') atclient.login('example', 'test123')
# ----OR---- # ----OR----
# with username and MD5 hashed password # with username and MD5 hashed password
aternos.login_hashed('example', 'cc03e747a6afbbcbf8be7668acfebee5') atclient.login_hashed('example', 'cc03e747a6afbbcbf8be7668acfebee5')
# ----OR---- # ----OR----
# with session cookie # with session cookie
aternos.login_with_session('ATERNOS_SESSION cookie value') atclient.login_with_session('ATERNOS_SESSION cookie value')
# Get AternosAccount object
aternos = atclient.account
# Get servers list # Get servers list
servs = aternos.list_servers() servs = aternos.list_servers()