Install todoist API client

This commit is contained in:
Jake Howard 2019-02-14 20:27:09 +00:00
parent d4c218b8a9
commit 6d29fb1fe8
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 18 additions and 3 deletions

View file

@ -25,3 +25,4 @@ apscheduler = "*"
pygithub = "*"
python-dotenv = "*"
aiohttp-basicauth = "*"
todoist-python = "*"

9
Pipfile.lock generated
View file

@ -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",

View file

@ -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'))

View file

@ -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(":")