gws-chat

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

chat (v1)

chat (v1)

PREREQUISITE: Read
../gws-shared/SKILL.md
for auth, global flags, and security rules. If missing, run
gws generate-skills
to create it.
bash
gws chat <resource> <method> [flags]
前置要求: 请阅读
../gws-shared/SKILL.md
了解认证、全局标志和安全规则。如果该文件缺失,请运行
gws generate-skills
命令生成它。
bash
gws chat <resource> <method> [flags]

Helper Commands

辅助命令

CommandDescription
+send
Send a message to a space
命令描述
+send
向聊天室发送消息

API Resources

API 资源

customEmojis

customEmojis

media

media

  • download
    — Downloads media. Download is supported on the URI
    /v1/media/{+name}?alt=media
    .
  • download
    — 下载媒体文件。下载功能支持通过URI
    /v1/media/{+name}?alt=media
    调用。

spaces

spaces

  • completeImport
    — Completes the import process for the specified space and makes it visible to users.
    • create
      — Creates a space. Can be used to create a named space, or a group chat in
      Import mode
      . For an example, see Create a space.
    • delete
      — 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.
    • findDirectMessage
      — Returns the existing direct message with the specified user. If no direct message space is found, returns a
      404 NOT_FOUND
      error. 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.
    • get
      — Returns details about a space. For an example, see Get details about a space.
    • list
      — 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.
    • patch
      — Updates a space. For an example, see Update a space. If you're updating the
      displayName
      field and receive the error message
      ALREADY_EXISTS
      , try a different display name.. An existing space within the Google Workspace organization might already use this display name.
    • search
      — Returns a list of spaces in a Google Workspace organization based on an administrator's search. In the request, set
      use_admin_access
      to
      true
      . For an example, see Search for and manage spaces.
    • setup
      — 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
      membership.member.name
      . To add a human user, use
      users/{user}
      , where
      {user}
      can be the email address for the user.
    • members
      — Operations on the 'members' resource
    • messages
      — Operations on the 'messages' resource
    • spaceEvents
      — Operations on the 'spaceEvents' resource
  • completeImport
    — 完成指定聊天室的导入流程,使其对用户可见。
    • create
      — 创建聊天室。可用于创建命名聊天室或处于
      导入模式
      的群聊。示例请查看创建聊天室
    • delete
      — 删除命名聊天室。始终执行级联删除,这意味着聊天室的子资源(如聊天室中发布的消息和成员身份)也会被删除。示例请查看删除聊天室
    • findDirectMessage
      — 返回与指定用户的现有私聊聊天室。如果未找到私聊聊天室,则返回
      404 NOT_FOUND
      错误。示例请查看查找私聊聊天室。通过应用认证,返回指定用户与调用Chat应用之间的私聊聊天室。
    • get
      — 返回聊天室的详细信息。示例请查看获取聊天室详细信息
    • list
      — 列出调用者所属的聊天室。群聊和私聊聊天室在发送第一条消息前不会被列出。示例请查看列出聊天室
    • patch
      — 更新聊天室。示例请查看更新聊天室。如果更新
      displayName
      字段时收到错误消息
      ALREADY_EXISTS
      ,请尝试使用其他显示名称。Google Workspace组织内的现有聊天室可能已在使用该显示名称。
    • search
      — 根据管理员的搜索条件返回Google Workspace组织内的聊天室列表。请求中需将
      use_admin_access
      设置为
      true
      。示例请查看搜索并管理聊天室
    • setup
      — 创建聊天室并添加指定用户。调用用户会自动加入聊天室,无需在请求中指定为成员。示例请查看创建包含初始成员的聊天室。要指定添加的人类成员,请添加带有相应
      membership.member.name
      的成员信息。添加人类用户时,使用
      users/{user}
      格式,其中
      {user}
      可以是用户的电子邮件地址。
    • members
      — 对'members'资源的操作
    • messages
      — 对'messages'资源的操作
    • spaceEvents
      — 对'spaceEvents'资源的操作

users

users

  • spaces
    — Operations on the 'spaces' resource
  • spaces
    — 对'spaces'资源的操作

Discovering Commands

命令探索

Before calling any API method, inspect it:
bash
undefined
调用任何API方法前,请先查看其详情:
bash
undefined

Browse 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`标志参数。