最近,发布有可能将任务分配给Google中的人。这些任务随后会出现在Google应用程序中,但是,当通过API (甚至更快)查询时,这些任务就不会出现。
有人试过吗?我想通过API将它们拉到我的things3收件箱。
代码:
function listTasks(taskListId) {
try {
// List the task items of specified tasklist using taskList id.
Tasks.Tasks.list(taskListId,{state:"1"})
const tasks = Tasks.Tasks.list(taskListId);
// If tasks are available then print all task of given tasklists.
if (!tasks.items) {
Logger.log('No tasks found.');
return;
}
// Print the task title and task id of specified tasklist.
for (let i = 0; i < tasks.items.length; i++) {
const task = tasks.items[i];
if (task.status != "completed"){
Logger.log(task.title)
//Logger.log('Task with title "%s" and ID "%s" was found and status %s.', task.title, task.id, task.completed);
}
}
} catch (err) {
// TODO (developer) - Handle exception from Task API
Logger.log('Failed with an error %s', err.message);
}
谢谢
发布于 2022-10-21 04:31:59
这是Google任务API中的一个已知问题,正如Google的问题跟踪器中所报告的那样:
https://stackoverflow.com/questions/73600736
复制相似问题