tasks (v1)
PREREQUISITE: Read ../gws-shared/SKILL.md for auth, global flags, and security rules. If missing, run gws generate-skills to create it.
CODEBLOCK0
API Resources
tasklists
- delete — Deletes the authenticated user's specified task list. If the list contains assigned tasks, both the assigned tasks and the original tasks in the assignment surface (Docs, Chat Spaces) are deleted.
- get — Returns the authenticated user's specified task list.
- insert — Creates a new task list and adds it to the authenticated user's task lists. A user can have up to 2000 lists at a time.
- list — Returns all the authenticated user's task lists. A user can have up to 2000 lists at a time.
- patch — Updates the authenticated user's specified task list. This method supports patch semantics.
- update — Updates the authenticated user's specified task list.
tasks
- clear — Clears all completed tasks from the specified task list. The affected tasks will be marked as 'hidden' and no longer be returned by default when retrieving all tasks for a task list.
- delete — Deletes the specified task from the task list. If the task is assigned, both the assigned task and the original task (in Docs, Chat Spaces) are deleted. To delete the assigned task only, navigate to the assignment surface and unassign the task from there.
- get — Returns the specified task.
- insert — Creates a new task on the specified task list. Tasks assigned from Docs or Chat Spaces cannot be inserted from Tasks Public API; they can only be created by assigning them from Docs or Chat Spaces. A user can have up to 20,000 non-hidden tasks per list and up to 100,000 tasks in total at a time.
- list — Returns all tasks in the specified task list. Doesn't return assigned tasks by default (from Docs, Chat Spaces). A user can have up to 20,000 non-hidden tasks per list and up to 100,000 tasks in total at a time.
- move — Moves the specified task to another position in the destination task list. If the destination list is not specified, the task is moved within its current list. This can include putting it as a child task under a new parent and/or move it to a different position among its sibling tasks. A user can have up to 2,000 subtasks per task.
- patch — Updates the specified task. This method supports patch semantics.
- update — Updates the specified task.
Discovering Commands
Before calling any API method, inspect it:
CODEBLOCK1
Use gws schema output to build your --params and --json flags.
tasks (v1)
前置条件: 请先阅读 ../gws-shared/SKILL.md 了解认证、全局标志和安全规则。如果该文件缺失,请运行 gws generate-skills 创建。
bash
gws tasks <资源> <方法> [标志]
API 资源
tasklists
- delete — 删除已认证用户的指定任务列表。如果该列表包含已分配的任务,则已分配的任务以及分配界面(文档、聊天空间)中的原始任务都将被删除。
- get — 返回已认证用户的指定任务列表。
- insert — 创建一个新的任务列表并将其添加到已认证用户的任务列表中。一个用户最多可同时拥有 2000 个列表。
- list — 返回已认证用户的所有任务列表。一个用户最多可同时拥有 2000 个列表。
- patch — 更新已认证用户的指定任务列表。此方法支持补丁语义。
- update — 更新已认证用户的指定任务列表。
tasks
- clear — 清除指定任务列表中所有已完成的任务。受影响的任务将被标记为隐藏,在检索任务列表的所有任务时默认不再返回。
- delete — 从任务列表中删除指定任务。如果该任务已被分配,则已分配的任务和原始任务(在文档、聊天空间中)都将被删除。如果只想删除已分配的任务,请导航到分配界面并从那里取消分配该任务。
- get — 返回指定的任务。
- insert — 在指定的任务列表上创建新任务。从文档或聊天空间分配的任务无法通过 Tasks 公共 API 插入;只能通过从文档或聊天空间分配来创建。一个用户每个列表最多可拥有 20,000 个非隐藏任务,同时总共最多可拥有 100,000 个任务。
- list — 返回指定任务列表中的所有任务。默认不返回已分配的任务(来自文档、聊天空间)。一个用户每个列表最多可拥有 20,000 个非隐藏任务,同时总共最多可拥有 100,000 个任务。
- move — 将指定任务移动到目标任务列表中的另一个位置。如果未指定目标列表,则任务将在其当前列表内移动。这可以包括将其作为子任务放在新的父任务下,和/或将其移动到同级任务中的不同位置。一个用户每个任务最多可拥有 2,000 个子任务。
- patch — 更新指定的任务。此方法支持补丁语义。
- update — 更新指定的任务。
发现命令
在调用任何 API 方法之前,请先检查它:
bash
浏览资源和方法
gws tasks --help
检查方法的必需参数、类型和默认值
gws schema tasks.<资源>.<方法>
使用 gws schema 的输出来构建你的 --params 和 --json 标志。