Merge branch 'master' of github.com:annabunches/elite_api
This commit is contained in:
commit
930000104e
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[submodule "edmc"]
|
||||
path = edmc
|
||||
url = https://github.com/annabunches/EDMarketConnector.git
|
24
companion.py
Normal file
24
companion.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
import easygui
|
||||
from edmc import companion as c
|
||||
import os
|
||||
import platform
|
||||
|
||||
if platform.system() == 'Windows':
|
||||
os.environ['REQUESTS_CA_BUNDLE'] = "requests/cacert.pem"
|
||||
|
||||
companion_session = c.Session()
|
||||
|
||||
def login(username, password):
|
||||
try:
|
||||
companion_session.login(username, password)
|
||||
except c.VerificationRequired:
|
||||
if platform.system() == 'Windows':
|
||||
code = easygui.enterbox("Input Verification Code (check your email)",
|
||||
"Verification Required")
|
||||
else:
|
||||
code = raw_input("Input Verification Code (check your email): ")
|
||||
companion_session.verify(code)
|
||||
|
||||
|
||||
def get_data():
|
||||
return companion_session.query()
|
1
edmc
Submodule
1
edmc
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit eeb0770bbeedc57a786f4575ab44d0c4bf5ba60a
|
Reference in New Issue
Block a user