使用 todoist python api 添加周期性任务
using todoist python api to add a recurring task
我正在尝试使用 python api.
添加一个循环任务到 todoist
- 官方API文档:https://developer.todoist.com/sync/v7/#add-two-new-tasks
- 官方 Python 图书馆:https://github.com/Doist/todoist-python
- 其他Python图书馆:https://github.com/Garee/pytodoist
- 其他 Python 图书馆文件:https://media.readthedocs.org/pdf/pytodoist/latest/pytodoist.pdf
我在下面尝试过,但不知道如何指定重复设置
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')
我推荐你使用我们的主库。
这是每天创建一个新任务的单行代码:
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
我正在尝试使用 python api.
添加一个循环任务到 todoist- 官方API文档:https://developer.todoist.com/sync/v7/#add-two-new-tasks
- 官方 Python 图书馆:https://github.com/Doist/todoist-python
- 其他Python图书馆:https://github.com/Garee/pytodoist
- 其他 Python 图书馆文件:https://media.readthedocs.org/pdf/pytodoist/latest/pytodoist.pdf
我在下面尝试过,但不知道如何指定重复设置
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')
我推荐你使用我们的主库。
这是每天创建一个新任务的单行代码:
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