Merge branch 'master' of github.com:annabunches/elite_api

This commit is contained in:
Anna Rose 2016-01-21 19:56:13 -05:00
commit 930000104e
3 changed files with 28 additions and 0 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "edmc"]
path = edmc
url = https://github.com/annabunches/EDMarketConnector.git

24
companion.py Normal file
View 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

@ -0,0 +1 @@
Subproject commit eeb0770bbeedc57a786f4575ab44d0c4bf5ba60a