diff --git a/Pipfile b/Pipfile index 713bd5b..112c1c2 100644 --- a/Pipfile +++ b/Pipfile @@ -25,3 +25,4 @@ apscheduler = "*" pygithub = "*" python-dotenv = "*" aiohttp-basicauth = "*" +todoist-python = "*" diff --git a/Pipfile.lock b/Pipfile.lock index b6c8d13..60c3837 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "655537d96ce2a47a7ef792ca2e0142c6ac9171fe41bffceea65fef4ca070f473" + "sha256": "6cf7c4ad05c16172e008a56fff46fe8374eaa923700a8423ba87c770b455a269" }, "pipfile-spec": 6, "requires": { @@ -185,6 +185,13 @@ ], "version": "==1.12.0" }, + "todoist-python": { + "hashes": [ + "sha256:f2d8ee63d0ceabdf548bd0b127e7cd3d9dc42759282033796225c251a2153dcb" + ], + "index": "pypi", + "version": "==7.0.19" + }, "typing-extensions": { "hashes": [ "sha256:07b2c978670896022a43c4b915df8958bec4a6b84add7f2c87b2b728bda3ba64", diff --git a/actioner/clients.py b/actioner/clients.py index 06583a7..6e84287 100644 --- a/actioner/clients.py +++ b/actioner/clients.py @@ -1,5 +1,10 @@ -from github import Github +import os +import tempfile -from actioner.settings import GITHUB_TOKEN +from github import Github +from todoist import TodoistAPI + +from actioner.settings import GITHUB_TOKEN, TODOIST_TOKEN github = Github(GITHUB_TOKEN) +todoist = TodoistAPI(TODOIST_TOKEN, cache=os.path.join(tempfile.gettempdir(), 'todoist-api')) diff --git a/actioner/settings.py b/actioner/settings.py index 8315cdd..be1ec29 100644 --- a/actioner/settings.py +++ b/actioner/settings.py @@ -7,6 +7,8 @@ load_dotenv() GITHUB_TOKEN = os.environ['GITHUB_TOKEN'] +TODOIST_TOKEN = os.environ['TODOIST_TOKEN'] + LOGGING_LEVEL = _nameToLevel[os.environ.get('LOGGING_LEVEL', 'INFO')] BASIC_AUTH = os.environ['BASIC_AUTH'].split(":")