Contacts
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
资源表示形式
可用作创建者或联系人的个人或群组。
{
"kind": "mirror#contact",
"source": string,
"id": string,
"displayName": string,
"imageUrls": [
string
],
"type": string,
"acceptTypes": [
string
],
"phoneNumber": string,
"priority": unsigned integer,
"acceptCommands": [
{
"type": string
}
],
"speakableName": string,
"sharingFeatures": [
string
]
}
属性名称 |
值 |
说明 |
备注 |
acceptCommands[] |
list |
联系人可处理的语音菜单命令的列表。Glass 会针对每条语音菜单命令最多显示 3 位联系人。如果超过 1 个,针对该特定命令将显示 priority 最高的三个联系人。 |
可写入 |
acceptCommands[].type |
string |
与此命令对应的操作类型。允许的值包括:-
TAKE_A_NOTE - 分享包含“Take a note”中的用户语音转写内容的时间轴项语音菜单命令。 -
POST_AN_UPDATE - 分享时间轴项,其中包含“发布更新”中的用户语音转写内容语音菜单命令。
|
可写入 |
acceptTypes[] |
list |
联系人支持的 MIME 类型的列表。如果联系人的任何一种 acceptTypes 与该项的任何附件类型匹配,该联系人便会向用户显示。如果未提供 acceptType,则将针对所有项显示联系人。 |
可写入 |
displayName |
string |
要显示此联系人的姓名。 |
可写入 |
id |
string |
此联系人的 ID。它由应用生成,被视为不透明令牌。 |
可写入 |
imageUrls[] |
list |
要为联系人显示的一组图片网址。大多数联系人只有一张图片,但是“群组”联系人最多可包含 8 个图片网址,它们会在客户端上调整大小并剪裁成拼接图。 |
可写入 |
kind |
string |
资源类型。始终为 mirror#contact 。 |
|
phoneNumber |
string |
联系人的主要电话号码。此号码可以是包含国家/地区呼叫代码和区号的完全限定号码,也可以是本地号码。 |
可写入 |
priority |
unsigned integer |
用于确定联系人列表中顺序的联系人优先级。优先级较高的联系人会先于优先级较低的联系人显示。 |
可写入 |
sharingFeatures[] |
list |
联系人可使用的共享功能列表。允许的值包括: |
|
source |
string |
创建此联系人的应用的 ID。此字段由 API 填充 |
|
speakableName |
string |
此联系人的姓名(应发音)。如果此联系人姓名在语音消除歧义菜单中必须说出,则会按照预期发音使用此姓名。这对联系人姓名包含不发音的字符或者显示拼写不同于发音的联系人姓名非常有用。 |
可写入 |
type |
string |
此联系人的类型。用于在界面中排序。允许的值包括:INDIVIDUAL - 代表单个人。这是默认值。 GROUP - 代表多个人。
|
可写入 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThe Google Mirror API uses the Contact resource to represent individuals or groups who can be assigned roles such as creator or point of contact.\u003c/p\u003e\n"],["\u003cp\u003eContacts in the Google Mirror API can be managed through operations like insertion, retrieval, updating, and deletion.\u003c/p\u003e\n"],["\u003cp\u003eEach contact is identified by a unique ID and contains information like display name, image URLs, contact type (individual or group), phone number, priority ranking for display, and supported MIME types for content sharing.\u003c/p\u003e\n"],["\u003cp\u003eContact management supports features like voice commands (e.g., taking notes, posting updates) and includes provisions for the pronunciation of names for voice interactions.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can leverage these features for diverse use cases, including application integration and contact organization within the Google Mirror ecosystem.\u003c/p\u003e\n"]]],[],null,["# Contacts\n\n\u003cbr /\u003e\n\nFor a list of [methods](#methods) for this resource, see the end of this page.\n\nResource representations\n------------------------\n\nA person or group that can be used as a creator or a contact.\n\n```carbon\n{\n \"kind\": \"mirror#contact\",\n \"source\": string,\n \"id\": string,\n \"displayName\": string,\n \"imageUrls\": [\n string\n ],\n \"type\": string,\n \"acceptTypes\": [\n string\n ],\n \"phoneNumber\": string,\n \"priority\": unsigned integer,\n \"acceptCommands\": [\n {\n \"type\": string\n }\n ],\n \"speakableName\": string,\n \"sharingFeatures\": [\n string\n ]\n}\n```\n\n| Property name | Value | Description | Notes |\n|-------------------------|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|\n| `acceptCommands[]` | `list` | A list of voice menu commands that a contact can handle. Glass shows up to three contacts for each voice menu command. If there are more than that, the three contacts with the highest `priority` are shown for that particular command. | writable |\n| acceptCommands[].`type` | `string` | The type of operation this command corresponds to. Allowed values are: - `TAKE_A_NOTE` - Shares a timeline item with the transcription of user speech from the \"Take a note\" voice menu command. - `POST_AN_UPDATE` - Shares a timeline item with the transcription of user speech from the \"Post an update\" voice menu command. | writable |\n| `acceptTypes[]` | `list` | A list of MIME types that a contact supports. The contact will be shown to the user if any of its acceptTypes matches any of the types of the attachments on the item. If no acceptTypes are given, the contact will be shown for all items. | writable |\n| `displayName` | `string` | The name to display for this contact. | writable |\n| `id` | `string` | An ID for this contact. This is generated by the application and is treated as an opaque token. | writable |\n| `imageUrls[]` | `list` | Set of image URLs to display for a contact. Most contacts will have a single image, but a \"group\" contact may include up to 8 image URLs and they will be resized and cropped into a mosaic on the client. | writable |\n| `kind` | `string` | The type of resource. This is always `mirror#contact`. | |\n| `phoneNumber` | `string` | Primary phone number for the contact. This can be a fully-qualified number, with country calling code and area code, or a local number. | writable |\n| `priority` | `unsigned integer` | Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities. | writable |\n| `sharingFeatures[]` | `list` | A list of sharing features that a contact can handle. Allowed values are: - `ADD_CAPTION` | |\n| `source` | `string` | The ID of the application that created this contact. This is populated by the API | |\n| `speakableName` | `string` | Name of this contact as it should be pronounced. If this contact's name must be spoken as part of a voice disambiguation menu, this name is used as the expected pronunciation. This is useful for contact names with unpronounceable characters or whose display spelling is otherwise not phonetic. | writable |\n| `type` | `string` | The type for this contact. This is used for sorting in UIs. Allowed values are: - `INDIVIDUAL` - Represents a single person. This is the default. - `GROUP` - Represents more than a single person. | writable |\n\nMethods\n-------\n\n[delete](/glass/v1/reference/contacts/delete)\n: Deletes a contact.\n\n[get](/glass/v1/reference/contacts/get)\n: Gets a single contact by ID.\n\n[insert](/glass/v1/reference/contacts/insert)\n: Inserts a new contact.\n\n[list](/glass/v1/reference/contacts/list)\n: Retrieves a list of contacts for the authenticated user.\n\n[patch](/glass/v1/reference/contacts/patch)\n: Updates a contact in place. This method supports [patch semantics](/glass/performance#patch).\n\n[update](/glass/v1/reference/contacts/update)\n: Updates a contact in place."]]