2017-11-25 35 views
0

私は、python apiを使用してtodoistに定期的なタスクを追加しようとしています。todoist python apiを使用して定期的なタスクを追加する

私は以下これを試したがありません定期的な設定を指定する方法を知っている

from pytodoist import todoist 
user = todoist.login('login', 'pass') 
project = user.get_project('my_project') 
task = project.add_task('My Recuring task') 
task = project.add_task('My Recuring task tomorrow at 2 pm') 

答えて

1

メインライブラリを使用することをおすすめします。それを破壊

python2.7 -c "import todoist; import os; token = os.environ.get('token'); api = todoist.TodoistAPI(token); api.items.add('test', None, date_string='ev day'); api.commit()" 

:ここ

は毎日のための新しいタスクを作成ワンライナーであるあなたは、すべての引数を渡すことができ、最後の引数で

# import the library 
import todoist 

# retrieve the token from my environment variables 
import os 
token = os.environ.get('token'); 

# initialize the API object 
api = todoist.TodoistAPI(token) 

# Create a new task called "test", with "None" as the project id and date_string as kwargs for the arguments of the item. 
api.items.add('test', None, date_string='ev day') 

# commit it! :) 
api.commit()" 

available in the documentation as command arguments

関連する問題