Readme: example updated
This commit is contained in:
parent
09b9d9f238
commit
f98dfc7cfc
1 changed files with 7 additions and 4 deletions
11
README.md
11
README.md
|
@ -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()
|
||||||
|
|
Reference in a new issue