The address books API, also including the :doc:`contacts` and :doc:`mailingLists` namespaces, first appeared in Thunderbird 64.
The Address Books sample extension uses this API.
- addressBooks "Read and modify your address books and contacts"
Note
The permission addressBooks
is required to use addressBooks
.
Opens the address book user interface.
Closes the address book user interface.
Gets a list of the user's address books, optionally including all contacts and mailing lists.
- [
complete
] (boolean) If set to true, results will include contacts and mailing lists for each address book.
Returns a Promise fulfilled with:
- array of :ref:`addressBooks.AddressBookNode`
Gets a single address book, optionally including all contacts and mailing lists.
id
(string)- [
complete
] (boolean) If set to true, results will include contacts and mailing lists for this address book.
Returns a Promise fulfilled with:
Creates a new, empty address book.
properties
(object)name
(string)
Returns a Promise fulfilled with:
- string The ID of the new address book.
Renames an address book.
id
(string)properties
(object)name
(string)
Removes an address book, and all associated contacts and mailing lists.
id
(string)
Fired when an address book is created.
Fired when an address book is renamed.
Fired when an addressBook is deleted.
id
(string)
A node representing an address book.
object
id
(string) The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the program is restarted.name
(string)type
(:ref:`addressBooks.NodeType`) Always set toaddressBook
.- [
contacts
] (array of :ref:`contacts.ContactNode`) A list of contacts held by this node's address book or mailing list. - [
mailingLists
] (array of :ref:`mailingLists.MailingListNode`) A list of mailingLists in this node's address book. - [
parentId
] (string) Theid
of the parent object. - [
readOnly
] (boolean) Indicates if the object is read-only. Currently this returns false in all cases, as read-only address books are ignored by the API.
Indicates the type of a Node, which can be one of addressBook
, contact
, or mailingList
.
Values for NodeType:
addressBook
contact
mailingList