Merge branch 'master' of github.com:annabunches/elite_api
This commit is contained in:
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
Submodule edmc added at eeb0770bbe
Reference in New Issue
Block a user