keep (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
media
- download — Gets an attachment. To download attachment media via REST requires the alt=media query parameter. Returns a 400 bad request error if attachment media is not available in the requested MIME type.
notes
- create — Creates a new note.
- delete — Deletes a note. Caller must have the OWNER role on the note to delete. Deleting a note removes the resource immediately and cannot be undone. Any collaborators will lose access to the note.
- get — Gets a note.
- list — Lists notes. Every list call returns a page of results with page_size as the upper bound of returned items. A page_size of zero allows the server to choose the upper bound. The ListNotesResponse contains at most page_size entries. If there are more things left to list, it provides a next_page_token value. (Page tokens are opaque values.) To get the next page of results, copy the result's next_page_token into the next request's page_token.
- permissions — Operations on the 'permissions' resource
Discovering Commands
Before calling any API method, inspect it:
CODEBLOCK1
Use gws schema output to build your --params and --json flags.
keep (v1)
前置条件: 请阅读 ../gws-shared/SKILL.md 了解认证、全局标志和安全规则。如果该文件缺失,请运行 gws generate-skills 创建。
bash
gws keep <资源> <方法> [标志]
API 资源
media
- download — 获取附件。通过 REST 下载附件媒体需要使用 alt=media 查询参数。如果请求的 MIME 类型中没有可用的附件媒体,则返回 400 错误请求。
notes
- create — 创建新笔记。
- delete — 删除笔记。调用者必须拥有笔记的 OWNER 角色才能删除。删除笔记会立即移除该资源且无法撤销。任何协作者将失去对该笔记的访问权限。
- get — 获取笔记。
- list — 列出笔记。每次列表调用返回一页结果,pagesize 为返回条目的上限。pagesize 为零时允许服务器选择上限。ListNotesResponse 最多包含 pagesize 条记录。如果还有更多内容需要列出,则提供 nextpagetoken 值。(分页令牌是不透明值。)要获取下一页结果,请将结果的 nextpagetoken 复制到下一个请求的 pagetoken 中。
- permissions — 对 permissions 资源的操作
发现命令
在调用任何 API 方法之前,请先检查它:
bash
浏览资源和方法
gws keep --help
检查方法的必需参数、类型和默认值
gws schema keep.<资源>.<方法>
使用 gws schema 的输出来构建你的 --params 和 --json 标志。