|
16 | 16 | // [START people_quickstart] |
17 | 17 | /** |
18 | 18 | * @typedef {Object} EmailAddress |
| 19 | + * @see https://developers.google.com/people/api/rest/v1/people#Person |
19 | 20 | * @property {string} value |
| 21 | + * Note: This is a partial definition. |
20 | 22 | */ |
21 | 23 |
|
22 | 24 | /** |
23 | 25 | * @typedef {Object} Name |
| 26 | + * @see https://developers.google.com/people/api/rest/v1/people#Person |
24 | 27 | * @property {string} displayName |
| 28 | + * Note: This is a partial definition. |
25 | 29 | */ |
26 | 30 |
|
27 | 31 | /** |
28 | 32 | * @typedef {Object} Person |
| 33 | + * @see https://developers.google.com/people/api/rest/v1/people#Person |
29 | 34 | * @property {Name[]} names |
30 | 35 | * @property {EmailAddress[]} [emailAddresses] |
| 36 | + * Note: This is a partial definition. |
31 | 37 | */ |
32 | 38 |
|
33 | 39 | /** |
34 | 40 | * @typedef {Object} Connection |
| 41 | + * @see https://developers.google.com/people/api/rest/v1/people.connections/list |
35 | 42 | * @property {Person[]} connections |
| 43 | + * Note: This is a partial definition. |
36 | 44 | */ |
37 | 45 |
|
38 | 46 | /** |
39 | 47 | * Print the display name if available for 10 connections. |
40 | 48 | */ |
41 | 49 | function listConnectionNames() { |
42 | | - // Poll the People API to list the connections of the logged in user. |
| 50 | + // Use the People API to list the connections of the logged in user. |
43 | 51 | // See: https://developers.google.com/people/api/rest/v1/people.connections/list |
44 | 52 | if (!People || !People.People || !People.People.Connections) { |
45 | | - // See: https://developers.google.com/apps-script/guides/services/advanced#enable_advanced_services |
46 | 53 | throw new Error('People service not enabled.'); |
47 | 54 | } |
48 | 55 | const connections = People.People.Connections.list('people/me', { |
|
0 commit comments