slackmail/slack/auth.py
Anna Schumaker 23ac359ad7 slack: Add channels module and Channel class
This patch begins a new main loop using the new Channel class.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-05-26 15:21:13 -04:00

20 lines
404 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
def token():
return __TOKEN