addressBooks API
The addressBooks API allows to access and manage the user’s address books.
Permissions
The following permissions influence the behavior of the API. Depending on which permissions are requested, additional methods might be available, or certain data may be included in responses.
Hint
Request permissions only when needed. Unnecessary requests may result in rejection during ATN review.
addressBooks
Read and modify your address books and contacts.
Functions
closeUI()
– [Added in TB 64]
Closes the address book user interface.
Required permissions
create(properties)
– [Added in TB 64]
Creates a new, empty address book.
Required permissions
delete(id)
– [Added in TB 64]
Removes an address book, and all associated contacts and mailing lists.
Required permissions
get(id, [complete])
– [Added in TB 64]
Gets a single address book, optionally including all contacts and mailing lists.
Parameters
id
complete
If set to true, results will include contacts and mailing lists for this address book.
Required permissions
list([complete])
– [Added in TB 64]
Gets a list of the user’s address books, optionally including all contacts and mailing lists.
Parameters
complete
If set to true, results will include contacts and mailing lists for each address book.
Required permissions
openUI()
– [Added in TB 64]
Opens the address book user interface.
Required permissions
update(id, properties)
– [Added in TB 64]
Renames an address book.
Required permissions
Events
onCreated
– [Added in TB 64]
Fired when an address book is created.
Parameters for onCreated.addListener(listener)
listener(node)
A function that will be called when this event occurs.
Required permissions
onDeleted
– [Added in TB 64]
Fired when an addressBook is deleted.
Parameters for onDeleted.addListener(listener)
listener(id)
A function that will be called when this event occurs.
Required permissions
onUpdated
– [Added in TB 64]
Fired when an address book is renamed.
Parameters for onUpdated.addListener(listener)
listener(node)
A function that will be called when this event occurs.
Required permissions
Types
AddressBookNode
– [Added in TB 64]
A node representing an address book.
object
id
The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the program is restarted.
name
type
contacts
A list of contacts held by this node’s address book or mailing list.
mailingLists
A list of mailingLists in this node’s address book.
parentId
The id of the parent object.
readOnly
Indicates if the object is read-only.
remote
Indicates if the address book is accessed via remote look-up.
NodeType
– [Added in TB 64]
Indicates the type of a Node.