gws-chat
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesechat (v1)
chat (v1)
PREREQUISITE: Readfor auth, global flags, and security rules. If missing, run../gws-shared/SKILL.mdto create it.gws generate-skills
bash
gws chat <resource> <method> [flags]前置要求: 请阅读了解认证、全局标志和安全规则。如果该文件缺失,请运行../gws-shared/SKILL.md命令生成它。gws generate-skills
bash
gws chat <resource> <method> [flags]Helper Commands
辅助命令
| Command | Description |
|---|---|
| Send a message to a space |
| 命令 | 描述 |
|---|---|
| 向聊天室发送消息 |
API Resources
API 资源
customEmojis
customEmojis
- — Creates a custom emoji. Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.
create- — Deletes a custom emoji. By default, users can only delete custom emoji they created. Emoji managers assigned by the administrator can delete any custom emoji in the organization. See Learn about custom emojis in Google Chat. Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization.
delete - — Returns details about a custom emoji. Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.
get - — Lists custom emojis visible to the authenticated user. Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.
list
- — 创建自定义表情符号。自定义表情符号仅适用于Google Workspace账户,且管理员必须为组织开启自定义表情符号功能。更多信息,请查看了解Google Chat中的自定义表情符号和管理自定义表情符号权限。
create- — 删除自定义表情符号。默认情况下,用户只能删除自己创建的自定义表情符号。管理员分配的表情符号管理员可以删除组织内的所有自定义表情符号。更多信息,请查看了解Google Chat中的自定义表情符号。自定义表情符号仅适用于Google Workspace账户,且管理员必须为组织开启自定义表情符号功能。
delete - — 返回自定义表情符号的详细信息。自定义表情符号仅适用于Google Workspace账户,且管理员必须为组织开启自定义表情符号功能。更多信息,请查看了解Google Chat中的自定义表情符号和管理自定义表情符号权限。
get - — 列出已认证用户可见的自定义表情符号。自定义表情符号仅适用于Google Workspace账户,且管理员必须为组织开启自定义表情符号功能。更多信息,请查看了解Google Chat中的自定义表情符号和管理自定义表情符号权限。
list
media
media
- — Downloads media. Download is supported on the URI
download./v1/media/{+name}?alt=media- — Uploads an attachment. For an example, see Upload media as a file attachment.
upload
- — 下载媒体文件。下载功能支持通过URI
download调用。/v1/media/{+name}?alt=media- — 上传附件。示例请查看上传媒体文件作为附件。
upload
spaces
spaces
- — Completes the import process for the specified space and makes it visible to users.
completeImport- — Creates a space. Can be used to create a named space, or a group chat in
create. For an example, see Create a space.Import mode - — Deletes a named space. Always performs a cascading delete, which means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see Delete a space.
delete - — Returns the existing direct message with the specified user. If no direct message space is found, returns a
findDirectMessageerror. For an example, see Find a direct message. With app authentication, returns the direct message space between the specified user and the calling Chat app.404 NOT_FOUND - — Returns details about a space. For an example, see Get details about a space.
get - — Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see List spaces.
list - — Updates a space. For an example, see Update a space. If you're updating the
patchfield and receive the error messagedisplayName, try a different display name.. An existing space within the Google Workspace organization might already use this display name.ALREADY_EXISTS - — Returns a list of spaces in a Google Workspace organization based on an administrator's search. In the request, set
searchtouse_admin_access. For an example, see Search for and manage spaces.true - — Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see Set up a space with initial members. To specify the human members to add, add memberships with the appropriate
setup. To add a human user, usemembership.member.name, whereusers/{user}can be the email address for the user.{user} - — Operations on the 'members' resource
members - — Operations on the 'messages' resource
messages - — Operations on the 'spaceEvents' resource
spaceEvents
- — 完成指定聊天室的导入流程,使其对用户可见。
completeImport- — 创建聊天室。可用于创建命名聊天室或处于
create的群聊。示例请查看创建聊天室。导入模式 - — 删除命名聊天室。始终执行级联删除,这意味着聊天室的子资源(如聊天室中发布的消息和成员身份)也会被删除。示例请查看删除聊天室。
delete - — 返回与指定用户的现有私聊聊天室。如果未找到私聊聊天室,则返回
findDirectMessage错误。示例请查看查找私聊聊天室。通过应用认证,返回指定用户与调用Chat应用之间的私聊聊天室。404 NOT_FOUND - — 返回聊天室的详细信息。示例请查看获取聊天室详细信息。
get - — 列出调用者所属的聊天室。群聊和私聊聊天室在发送第一条消息前不会被列出。示例请查看列出聊天室。
list - — 更新聊天室。示例请查看更新聊天室。如果更新
patch字段时收到错误消息displayName,请尝试使用其他显示名称。Google Workspace组织内的现有聊天室可能已在使用该显示名称。ALREADY_EXISTS - — 根据管理员的搜索条件返回Google Workspace组织内的聊天室列表。请求中需将
search设置为use_admin_access。示例请查看搜索并管理聊天室。true - — 创建聊天室并添加指定用户。调用用户会自动加入聊天室,无需在请求中指定为成员。示例请查看创建包含初始成员的聊天室。要指定添加的人类成员,请添加带有相应
setup的成员信息。添加人类用户时,使用membership.member.name格式,其中users/{user}可以是用户的电子邮件地址。{user} - — 对'members'资源的操作
members - — 对'messages'资源的操作
messages - — 对'spaceEvents'资源的操作
spaceEvents
users
users
- — Operations on the 'spaces' resource
spaces
- — 对'spaces'资源的操作
spaces
Discovering Commands
命令探索
Before calling any API method, inspect it:
bash
undefined调用任何API方法前,请先查看其详情:
bash
undefinedBrowse resources and methods
浏览资源和方法
gws chat --help
gws chat --help
Inspect a method's required params, types, and defaults
查看方法的必填参数、类型和默认值
gws schema chat.<resource>.<method>
Use `gws schema` output to build your `--params` and `--json` flags.gws schema chat.<resource>.<method>
使用`gws schema`的输出来构建`--params`和`--json`标志参数。