osa-contacts
A node.js module to access contact information on OSX
Installation
Requires OSX 10.10 Yosemite.
npm install osa-contacts
Usage
Get info about a contact
var contacts = ; // First param: query object (see below)contacts;
The query object contains requirements for a contact to be returned. All conditions must be met for the contact to be returned.
Example query objects:
// Person with the name 'Johnny Appleseed' 'name': 'Johnny Appleseed' // People with the first name 'Alice' 'firstName': 'Alice' // People with the last name 'Liddell' 'lastName': 'Liddell'
Example contact object:
'id': 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:ABPerson' 'first': 'Johnny' 'last': 'Appleseed' 'nickname': null 'addresses': 'city': 'Cupertino' 'street': '1 Infinite Loop' 'zip': '95014' 'country': 'United States' 'state': 'CA' 'formattedAddress': '1 Infinite Loop\nCupertino CA 95014\nUnited States' 'phones': '+1 (555) 555-5555'
Get a person's contact photo
var contacts = ; contacts;