"GoogleContacts" (Service Connection)
"GoogleContacts" (Service Connection)
Obsolete
Connecting & Authenticating
ServiceConnect["GoogleContacts"] creates a connection to the Google Contacts API. If a previously saved connection can be found, it will be used; otherwise, a new authentication request will be launched.
Requests
ServiceExecute["GoogleContacts","request",params] sends a request to the Google Contacts API, using parameters params. The following gives possible requests.
List Contacts
"ContactsList" — a List of contacts and associated information
"ContactsDataset" — a Dataset of contacts and associated information
| MaxItems | 100 | number of elements to return | |
| "StartIndex" | 1 | start index | |
| "UpdatedDate" | None | lower bound on entry update dates | |
| "Query" | None | query string | |
| "SortBy" | None | sorting order: "LastModified" | |
| "ShowDeleted" | False | whether to include deleted contacts | |
| "GroupID" | None | group ID |
Detailed Contact Information
"ContactInformation" — detailed information about a specific contact
| "ContactID" | (required) | contact ID |
Contact Photos
"ContactPhoto" — photo associated with a specific contact
| "ContactID" | (required) | contact ID |
Group Lists
"GroupList" — a List of contact groups
"GroupDataset" — a Dataset of contact groups
| MaxItems | 100 | number of elements to return | |
| "StartIndex" | 1 | start index | |
| "UpdatedDate" | None | lower bound on entry update dates | |
| "Query" | None | query string | |
| "SortBy" | None | sorting order: "LastModified" | |
| "ShowDeleted" | False | whether to include deleted groups |
Examples
Basic Examples (1)
Create a new connection by launching an authentication dialog:
googlecontacts = ServiceConnect["GoogleContacts"]contacts = googlecontacts["ContactsDataset", {MaxItems -> 5}]contacts = googlecontacts["ContactsList", {"Query" -> "wizard"}]groups = googlecontacts["GroupList"]List contacts in a given group:
googlecontacts["ContactsList", {"GroupID" -> groups[[5]]["GroupID"]}]Get detailed information about a contact:
googlecontacts["ContactInformation", {"ContactID" -> contacts[[1]]["ID"]}]Get the photo associated with a contact:
contacts = googlecontacts["ContactsList", {"Query" -> "wolfie"}]googlecontacts["ContactPhoto", {"ContactID" -> contacts[[1]]["ID"]}]