• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="mirror_v1.html">Google Mirror API</a> . <a href="mirror_v1.contacts.html">contacts</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#delete">delete(id)</a></code></p>
79<p class="firstline">Deletes a contact.</p>
80<p class="toc_element">
81  <code><a href="#get">get(id)</a></code></p>
82<p class="firstline">Gets a single contact by ID.</p>
83<p class="toc_element">
84  <code><a href="#insert">insert(body)</a></code></p>
85<p class="firstline">Inserts a new contact.</p>
86<p class="toc_element">
87  <code><a href="#list">list()</a></code></p>
88<p class="firstline">Retrieves a list of contacts for the authenticated user.</p>
89<p class="toc_element">
90  <code><a href="#patch">patch(id, body)</a></code></p>
91<p class="firstline">Updates a contact in place. This method supports patch semantics.</p>
92<p class="toc_element">
93  <code><a href="#update">update(id, body)</a></code></p>
94<p class="firstline">Updates a contact in place.</p>
95<h3>Method Details</h3>
96<div class="method">
97    <code class="details" id="delete">delete(id)</code>
98  <pre>Deletes a contact.
99
100Args:
101  id: string, The ID of the contact. (required)
102</pre>
103</div>
104
105<div class="method">
106    <code class="details" id="get">get(id)</code>
107  <pre>Gets a single contact by ID.
108
109Args:
110  id: string, The ID of the contact. (required)
111
112Returns:
113  An object of the form:
114
115    { # A person or group that can be used as a creator or a contact.
116      "kind": "mirror#contact", # The type of resource. This is always mirror#contact.
117      "displayName": "A String", # The name to display for this contact.
118      "acceptTypes": [ # 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.
119        "A String",
120      ],
121      "imageUrls": [ # 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.
122        "A String",
123      ],
124      "priority": 42, # Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
125      "source": "A String", # The ID of the application that created this contact. This is populated by the API
126      "phoneNumber": "A 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.
127      "sharingFeatures": [ # A list of sharing features that a contact can handle. Allowed values are:
128          # - ADD_CAPTION
129        "A String",
130      ],
131      "type": "A String", # The type for this contact. This is used for sorting in UIs. Allowed values are:
132          # - INDIVIDUAL - Represents a single person. This is the default.
133          # - GROUP - Represents more than a single person.
134      "acceptCommands": [ # 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.
135        { # A single menu command that is part of a Contact.
136          "type": "A String", # The type of operation this command corresponds to. Allowed values are:
137              # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
138              # - POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
139        },
140      ],
141      "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
142      "speakableName": "A 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.
143    }</pre>
144</div>
145
146<div class="method">
147    <code class="details" id="insert">insert(body)</code>
148  <pre>Inserts a new contact.
149
150Args:
151  body: object, The request body. (required)
152    The object takes the form of:
153
154{ # A person or group that can be used as a creator or a contact.
155    "kind": "mirror#contact", # The type of resource. This is always mirror#contact.
156    "displayName": "A String", # The name to display for this contact.
157    "acceptTypes": [ # 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.
158      "A String",
159    ],
160    "imageUrls": [ # 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.
161      "A String",
162    ],
163    "priority": 42, # Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
164    "source": "A String", # The ID of the application that created this contact. This is populated by the API
165    "phoneNumber": "A 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.
166    "sharingFeatures": [ # A list of sharing features that a contact can handle. Allowed values are:
167        # - ADD_CAPTION
168      "A String",
169    ],
170    "type": "A String", # The type for this contact. This is used for sorting in UIs. Allowed values are:
171        # - INDIVIDUAL - Represents a single person. This is the default.
172        # - GROUP - Represents more than a single person.
173    "acceptCommands": [ # 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.
174      { # A single menu command that is part of a Contact.
175        "type": "A String", # The type of operation this command corresponds to. Allowed values are:
176            # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
177            # - POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
178      },
179    ],
180    "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
181    "speakableName": "A 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.
182  }
183
184
185Returns:
186  An object of the form:
187
188    { # A person or group that can be used as a creator or a contact.
189      "kind": "mirror#contact", # The type of resource. This is always mirror#contact.
190      "displayName": "A String", # The name to display for this contact.
191      "acceptTypes": [ # 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.
192        "A String",
193      ],
194      "imageUrls": [ # 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.
195        "A String",
196      ],
197      "priority": 42, # Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
198      "source": "A String", # The ID of the application that created this contact. This is populated by the API
199      "phoneNumber": "A 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.
200      "sharingFeatures": [ # A list of sharing features that a contact can handle. Allowed values are:
201          # - ADD_CAPTION
202        "A String",
203      ],
204      "type": "A String", # The type for this contact. This is used for sorting in UIs. Allowed values are:
205          # - INDIVIDUAL - Represents a single person. This is the default.
206          # - GROUP - Represents more than a single person.
207      "acceptCommands": [ # 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.
208        { # A single menu command that is part of a Contact.
209          "type": "A String", # The type of operation this command corresponds to. Allowed values are:
210              # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
211              # - POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
212        },
213      ],
214      "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
215      "speakableName": "A 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.
216    }</pre>
217</div>
218
219<div class="method">
220    <code class="details" id="list">list()</code>
221  <pre>Retrieves a list of contacts for the authenticated user.
222
223Args:
224
225Returns:
226  An object of the form:
227
228    { # A list of Contacts representing contacts. This is the response from the server to GET requests on the contacts collection.
229    "items": [ # Contact list.
230      { # A person or group that can be used as a creator or a contact.
231          "kind": "mirror#contact", # The type of resource. This is always mirror#contact.
232          "displayName": "A String", # The name to display for this contact.
233          "acceptTypes": [ # 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.
234            "A String",
235          ],
236          "imageUrls": [ # 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.
237            "A String",
238          ],
239          "priority": 42, # Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
240          "source": "A String", # The ID of the application that created this contact. This is populated by the API
241          "phoneNumber": "A 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.
242          "sharingFeatures": [ # A list of sharing features that a contact can handle. Allowed values are:
243              # - ADD_CAPTION
244            "A String",
245          ],
246          "type": "A String", # The type for this contact. This is used for sorting in UIs. Allowed values are:
247              # - INDIVIDUAL - Represents a single person. This is the default.
248              # - GROUP - Represents more than a single person.
249          "acceptCommands": [ # 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.
250            { # A single menu command that is part of a Contact.
251              "type": "A String", # The type of operation this command corresponds to. Allowed values are:
252                  # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
253                  # - POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
254            },
255          ],
256          "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
257          "speakableName": "A 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.
258        },
259    ],
260    "kind": "mirror#contacts", # The type of resource. This is always mirror#contacts.
261  }</pre>
262</div>
263
264<div class="method">
265    <code class="details" id="patch">patch(id, body)</code>
266  <pre>Updates a contact in place. This method supports patch semantics.
267
268Args:
269  id: string, The ID of the contact. (required)
270  body: object, The request body. (required)
271    The object takes the form of:
272
273{ # A person or group that can be used as a creator or a contact.
274    "kind": "mirror#contact", # The type of resource. This is always mirror#contact.
275    "displayName": "A String", # The name to display for this contact.
276    "acceptTypes": [ # 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.
277      "A String",
278    ],
279    "imageUrls": [ # 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.
280      "A String",
281    ],
282    "priority": 42, # Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
283    "source": "A String", # The ID of the application that created this contact. This is populated by the API
284    "phoneNumber": "A 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.
285    "sharingFeatures": [ # A list of sharing features that a contact can handle. Allowed values are:
286        # - ADD_CAPTION
287      "A String",
288    ],
289    "type": "A String", # The type for this contact. This is used for sorting in UIs. Allowed values are:
290        # - INDIVIDUAL - Represents a single person. This is the default.
291        # - GROUP - Represents more than a single person.
292    "acceptCommands": [ # 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.
293      { # A single menu command that is part of a Contact.
294        "type": "A String", # The type of operation this command corresponds to. Allowed values are:
295            # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
296            # - POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
297      },
298    ],
299    "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
300    "speakableName": "A 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.
301  }
302
303
304Returns:
305  An object of the form:
306
307    { # A person or group that can be used as a creator or a contact.
308      "kind": "mirror#contact", # The type of resource. This is always mirror#contact.
309      "displayName": "A String", # The name to display for this contact.
310      "acceptTypes": [ # 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.
311        "A String",
312      ],
313      "imageUrls": [ # 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.
314        "A String",
315      ],
316      "priority": 42, # Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
317      "source": "A String", # The ID of the application that created this contact. This is populated by the API
318      "phoneNumber": "A 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.
319      "sharingFeatures": [ # A list of sharing features that a contact can handle. Allowed values are:
320          # - ADD_CAPTION
321        "A String",
322      ],
323      "type": "A String", # The type for this contact. This is used for sorting in UIs. Allowed values are:
324          # - INDIVIDUAL - Represents a single person. This is the default.
325          # - GROUP - Represents more than a single person.
326      "acceptCommands": [ # 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.
327        { # A single menu command that is part of a Contact.
328          "type": "A String", # The type of operation this command corresponds to. Allowed values are:
329              # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
330              # - POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
331        },
332      ],
333      "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
334      "speakableName": "A 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.
335    }</pre>
336</div>
337
338<div class="method">
339    <code class="details" id="update">update(id, body)</code>
340  <pre>Updates a contact in place.
341
342Args:
343  id: string, The ID of the contact. (required)
344  body: object, The request body. (required)
345    The object takes the form of:
346
347{ # A person or group that can be used as a creator or a contact.
348    "kind": "mirror#contact", # The type of resource. This is always mirror#contact.
349    "displayName": "A String", # The name to display for this contact.
350    "acceptTypes": [ # 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.
351      "A String",
352    ],
353    "imageUrls": [ # 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.
354      "A String",
355    ],
356    "priority": 42, # Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
357    "source": "A String", # The ID of the application that created this contact. This is populated by the API
358    "phoneNumber": "A 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.
359    "sharingFeatures": [ # A list of sharing features that a contact can handle. Allowed values are:
360        # - ADD_CAPTION
361      "A String",
362    ],
363    "type": "A String", # The type for this contact. This is used for sorting in UIs. Allowed values are:
364        # - INDIVIDUAL - Represents a single person. This is the default.
365        # - GROUP - Represents more than a single person.
366    "acceptCommands": [ # 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.
367      { # A single menu command that is part of a Contact.
368        "type": "A String", # The type of operation this command corresponds to. Allowed values are:
369            # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
370            # - POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
371      },
372    ],
373    "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
374    "speakableName": "A 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.
375  }
376
377
378Returns:
379  An object of the form:
380
381    { # A person or group that can be used as a creator or a contact.
382      "kind": "mirror#contact", # The type of resource. This is always mirror#contact.
383      "displayName": "A String", # The name to display for this contact.
384      "acceptTypes": [ # 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.
385        "A String",
386      ],
387      "imageUrls": [ # 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.
388        "A String",
389      ],
390      "priority": 42, # Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
391      "source": "A String", # The ID of the application that created this contact. This is populated by the API
392      "phoneNumber": "A 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.
393      "sharingFeatures": [ # A list of sharing features that a contact can handle. Allowed values are:
394          # - ADD_CAPTION
395        "A String",
396      ],
397      "type": "A String", # The type for this contact. This is used for sorting in UIs. Allowed values are:
398          # - INDIVIDUAL - Represents a single person. This is the default.
399          # - GROUP - Represents more than a single person.
400      "acceptCommands": [ # 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.
401        { # A single menu command that is part of a Contact.
402          "type": "A String", # The type of operation this command corresponds to. Allowed values are:
403              # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
404              # - POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
405        },
406      ],
407      "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
408      "speakableName": "A 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.
409    }</pre>
410</div>
411
412</body></html>