17 lines
371 B
Python
17 lines
371 B
Python
|
#
|
||
|
# Copyright 2015 (c) Anna Schumaker
|
||
|
#
|
||
|
from . import api
|
||
|
|
||
|
# TODO: Move the token config file outside of code directory
|
||
|
__TOKEN = ""
|
||
|
with open("token") as f:
|
||
|
__TOKEN = f.read().strip()
|
||
|
|
||
|
def test():
|
||
|
ret = api.call("auth.test", token = __TOKEN)
|
||
|
if ret["ok"] == False:
|
||
|
print("Authentication error: %s." % ret["error"])
|
||
|
return None
|
||
|
return ret
|