2015-05-26 14:21:19 -04:00
|
|
|
#
|
|
|
|
# Copyright 2015 (c) Anna Schumaker
|
|
|
|
#
|
2015-05-26 21:31:45 -04:00
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
|
|
|
|
path = os.path.realpath(sys.argv[0])
|
|
|
|
os.chdir(os.path.dirname(path))
|
|
|
|
|
2015-05-26 14:21:19 -04:00
|
|
|
|
|
|
|
from . import api
|
2015-05-26 14:44:59 -04:00
|
|
|
from . import auth
|
2015-05-26 15:20:12 -04:00
|
|
|
from . import channels
|
2015-05-27 09:11:28 -04:00
|
|
|
from . import users
|
2015-05-26 15:20:12 -04:00
|
|
|
|
2015-05-26 14:44:59 -04:00
|
|
|
|
|
|
|
#
|
|
|
|
# Verify connection and setup team information.
|
|
|
|
#
|
|
|
|
|
|
|
|
if api.test() == False:
|
|
|
|
print("Connection error, cannot continue.")
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
__auth = auth.test()
|
|
|
|
if __auth == None:
|
|
|
|
sys.exit(1)
|
|
|
|
__TEAM = __auth["team"]
|
2015-05-27 09:11:28 -04:00
|
|
|
__USER = users.info(__auth["user_id"])
|
2015-05-26 16:48:22 -04:00
|
|
|
|
|
|
|
|
|
|
|
def team():
|
|
|
|
return __TEAM
|
2015-05-27 09:11:28 -04:00
|
|
|
|
|
|
|
def user():
|
|
|
|
return __USER
|