Add rest of project files

This commit is contained in:
2020-04-29 12:38:41 -04:00
parent 3b01915ec6
commit 052490c0fc
20 changed files with 158 additions and 0 deletions

18
app/groupme.py Normal file
View File

@@ -0,0 +1,18 @@
from groupy import Client
from util import api_keys
GROUPME_CLIENT = None
def get_client():
if GROUPME_CLIENT is None:
init_client()
return GROUPME_CLIENT
def init_client():
global GROUPME_CLIENT
GROUPME_CLIENT = Client.from_token(api_keys.GROUPME)
if not list(GROUPME_CLIENT.groups.list_all()):
raise Exception("Invalid groupme token or not apart of any groups.")