gws-people
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesepeople (v1)
people (v1)
PREREQUISITE: Readfor auth, global flags, and security rules. If missing, run../gws-shared/SKILL.mdto create it.gws generate-skills
bash
gws people <resource> <method> [flags]前置要求: 阅读了解认证、全局标志和安全规则。如果该文件缺失,请运行../gws-shared/SKILL.md来创建它。gws generate-skills
bash
gws people <resource> <method> [flags]API Resources
API资源
contactGroups
contactGroups
- — Get a list of contact groups owned by the authenticated user by specifying a list of contact group resource names.
batchGet- — Create a new contact group owned by the authenticated user. Created contact group names must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.
create - — Delete an existing contact group owned by the authenticated user by specifying a contact group resource name. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.
delete - — Get a specific contact group owned by the authenticated user by specifying a contact group resource name.
get - — List all contact groups owned by the authenticated user. Members of the contact groups are not populated.
list - — Update the name of an existing contact group owned by the authenticated user. Updated contact group names must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.
update - — Operations on the 'members' resource
members
- — 获取已认证用户拥有的联系人组列表,需指定联系人组资源名称列表。
batchGet- — 创建一个由已认证用户拥有的新联系人组。创建的联系人组名称必须在该用户的联系人组中唯一。尝试创建重复名称的组将返回HTTP 409错误。针对同一用户的变更请求应按顺序发送,以避免延迟增加和请求失败。
create - — 通过指定联系人组资源名称,删除已认证用户拥有的现有联系人组。针对同一用户的变更请求应按顺序发送,以避免延迟增加和请求失败。
delete - — 通过指定联系人组资源名称,获取已认证用户拥有的特定联系人组。
get - — 列出已认证用户拥有的所有联系人组。不会填充联系人组的成员信息。
list - — 更新已认证用户拥有的现有联系人组的名称。更新后的联系人组名称必须在该用户的联系人组中唯一。尝试创建重复名称的组将返回HTTP 409错误。针对同一用户的变更请求应按顺序发送,以避免延迟增加和请求失败。
update - — 对'members'资源的操作
members
otherContacts
otherContacts
- — Copies an "Other contact" to a new contact in the user's "myContacts" group Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.
copyOtherContactToMyContactsGroup- — List all "Other contacts", that is contacts that are not in a contact group. "Other contacts" are typically auto created contacts from interactions. Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an google.rpc.ErrorInfo with reason "EXPIRED_SYNC_TOKEN". In the case of such an error clients should make a full sync request without a
list.sync_token - — Provides a list of contacts in the authenticated user's other contacts that matches the search query. The query matches on a contact's
search,names, andemailAddressesfields that are from the OTHER_CONTACT source. IMPORTANT: Before searching, clients should send a warmup request with an empty query to update the cache. See https://developers.google.com/people/v1/other-contacts#search_the_users_other_contactsphoneNumbers
- — 将“其他联系人”复制到用户的“我的联系人”组中作为新联系人。针对同一用户的变更请求应按顺序发送,以避免延迟增加和请求失败。
copyOtherContactToMyContactsGroup- — 列出所有“其他联系人”,即未加入任何联系人组的联系人。“其他联系人”通常是通过交互自动创建的联系人。同步令牌(sync_token)在完全同步后7天过期。使用过期同步令牌的请求将返回错误,包含google.rpc.ErrorInfo,错误原因标记为"EXPIRED_SYNC_TOKEN"。遇到此类错误时,客户端应发起不携带
list的完全同步请求。sync_token - — 提供与搜索查询匹配的已认证用户“其他联系人”列表。查询会匹配来自OTHER_CONTACT源的联系人的
search、names和emailAddresses字段。重要提示: 在搜索前,客户端应发送一个空查询的预热请求来更新缓存。请参阅https://developers.google.com/people/v1/other-contacts#search_the_users_other_contactsphoneNumbers
people
people
- — Create a batch of new contacts and return the PersonResponses for the newly Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.
batchCreateContacts- — Delete a batch of contacts. Any non-contact data will not be deleted. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.
batchDeleteContacts - — Update a batch of contacts and return a map of resource names to PersonResponses for the updated contacts. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.
batchUpdateContacts - — Create a new contact and return the person resource for that contact. The request returns a 400 error if more than one field is specified on a field that is a singleton for contact sources: * biographies * birthdays * genders * names Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.
createContact - — Delete a contact person. Any non-contact data will not be deleted. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.
deleteContact - — Delete a contact's photo. Mutate requests for the same user should be done sequentially to avoid // lock contention.
deleteContactPhoto - — Provides information about a person by specifying a resource name. Use
getto indicate the authenticated user. The request returns a 400 error if 'personFields' is not specified.people/me - — Provides information about a list of specific people by specifying a list of requested resource names. Use
getBatchGetto indicate the authenticated user. The request returns a 400 error if 'personFields' is not specified.people/me - — Provides a list of domain profiles and domain contacts in the authenticated user's domain directory. When the
listDirectoryPeopleis specified, resources deleted since the last sync will be returned as a person withsync_tokenset to true. When thePersonMetadata.deletedorpage_tokenis specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases.sync_token - — Provides a list of contacts in the authenticated user's grouped contacts that matches the search query. The query matches on a contact's
searchContacts,names,nickNames,emailAddresses, andphoneNumbersfields that are from the CONTACT source. IMPORTANT: Before searching, clients should send a warmup request with an empty query to update the cache. See https://developers.google.com/people/v1/contacts#search_the_users_contactsorganizations - — Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query.
searchDirectoryPeople - — Update contact data for an existing contact person. Any non-contact data will not be modified. Any non-contact data in the person to update will be ignored. All fields specified in the
updateContactwill be replaced. The server returns a 400 error ifupdate_maskis not specified for the contact to be updated or if there is no contact source.person.metadata.sources - — Update a contact's photo. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.
updateContactPhoto - — Operations on the 'connections' resource
connections
- — 批量创建新联系人,并返回新创建联系人的PersonResponses。针对同一用户的变更请求应按顺序发送,以避免延迟增加和请求失败。
batchCreateContacts- — 批量删除联系人。非联系人数据不会被删除。针对同一用户的变更请求应按顺序发送,以避免延迟增加和请求失败。
batchDeleteContacts - — 批量更新联系人,并返回资源名称与更新后联系人PersonResponses的映射。针对同一用户的变更请求应按顺序发送,以避免延迟增加和请求失败。
batchUpdateContacts - — 创建新联系人,并返回该联系人的人员资源。如果在联系人源的单例字段上指定了多个字段,请求将返回400错误:* 个人简介 * 生日 * 性别 * 姓名。针对同一用户的变更请求应按顺序发送,以避免延迟增加和请求失败。
createContact - — 删除联系人。非联系人数据不会被删除。针对同一用户的变更请求应按顺序发送,以避免延迟增加和请求失败。
deleteContact - — 删除联系人的照片。针对同一用户的变更请求应按顺序执行,以避免锁竞争。
deleteContactPhoto - — 通过指定资源名称提供人员信息。使用
get表示已认证用户。如果未指定'personFields',请求将返回400错误。people/me - — 通过指定请求的资源名称列表,提供特定人员的信息列表。使用
getBatchGet表示已认证用户。如果未指定'personFields',请求将返回400错误。people/me - — 提供已认证用户所在域目录中的域个人资料和域联系人列表。当指定
listDirectoryPeople时,自上次同步以来删除的资源将以sync_token设为true的人员形式返回。当指定PersonMetadata.deleted或page_token时,所有其他请求参数必须与第一次调用匹配。写入操作对于同步请求可能有几分钟的传播延迟。增量同步不适用于写后读取的使用场景。sync_token - — 提供与搜索查询匹配的已认证用户分组联系人列表。查询会匹配来自CONTACT源的联系人的
searchContacts、names、nickNames、emailAddresses和phoneNumbers字段。重要提示: 在搜索前,客户端应发送一个空查询的预热请求来更新缓存。请参阅https://developers.google.com/people/v1/contacts#search_the_users_contactsorganizations - — 提供与搜索查询匹配的已认证用户所在域目录中的域个人资料和域联系人列表。
searchDirectoryPeople - — 更新现有联系人的联系人数据。非联系人数据不会被修改。待更新人员中的非联系人数据将被忽略。
updateContact中指定的所有字段将被替换。如果未指定待更新联系人的update_mask或不存在联系人源,服务器将返回400错误。person.metadata.sources - — 更新联系人的照片。针对同一用户变更请求应按顺序发送,以避免延迟增加和请求失败。
updateContactPhoto - — 对'connections'资源的操作
connections
Discovering Commands
命令探索
Before calling any API method, inspect it:
bash
undefined在调用任何API方法之前,请先查看其详情:
bash
undefinedBrowse resources and methods
浏览资源和方法
gws people --help
gws people --help
Inspect a method's required params, types, and defaults
查看方法的必填参数、类型和默认值
gws schema people.<resource>.<method>
Use `gws schema` output to build your `--params` and `--json` flags.gws schema people.<resource>.<method>
使用`gws schema`的输出来构建你的`--params`和`--json`标志。