/node-addressbook

Node.js module providing access to the macOS address book

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Wire

This repository is part of the source code of Wire. You can find more information at wire.com or by contacting opensource@wire.com.

You can find the published source code at github.com/wireapp/wire.

For licensing information, see the attached LICENSE file and the list of third-party licenses at wire.com/legal/licenses/.

Building

Building for node is done with node-gyp:

node-gyp configure node-gyp build

Building for electron seems to require the use of electron-rebuild:

electron-rebuild -v <electron version>

Usage

how to use the module:

const addressBook = require('node-addressbook');

console.log("Number of Contacts: ", addressBook.getContactsCount());

console.log("Me: ", addressBook.getMe());

console.log("Contact [9]: ", addressBook.getContact(9));

console.log("Start Importing Contacts");

addressBook.getContacts(
    progress => console.log("Progress: " + progress + "% "),
    contacts => console.log("Contacts: ", contacts)
);