Access to the contacts directory in the iPhone.
all
Get all contacts in the iPhone directory.
Syntax:
lg.contacts.all();
Event Trigger:
- lg_contacts
dept
Filter names by department. Only matching results will be saved in the list array.
Syntax:
lg.contacts.dept(string);
Arguments:
- string – (string) Filter by string.
Event Trigger:
- lg_contacts
Example:
lg.contacts.dept('Development');
Filter names by email. Only matching results will be saved in the list array.
Syntax:
lg.contacts.email(string);
Arguments:
- string – (string) Filter by string.
Event Trigger:
- lg_contacts
Example:
lg.contacts.email('kate-bell@mac.com');
firstName
Filter names by first name. Only matching results will be saved in the list array.
Syntax:
lg.contacts.firstName(name);
Arguments:
- name – (string) Name to filter by.
Event Trigger:
- lg_contacts
Example:
lg.contacts.firstName('Daniel');
lastName
Filter names by last name. Only matching results will be saved in the list array.
Syntax:
lg.contacts.lastName(name);
Arguments:
- name – (string) Name to filter by.
Event Trigger:
- lg_contacts
Example:
lg.contacts.lastName('Higgins');
list
A list of contacts retrived from a contacts call.
Syntax:
lg.contacts.list;
Returns:
- (array) An array of contacts.
- address – (object) Address
- street – (string) Street.
- city – (string) City.
- state – (string) State.
- zip – (string) Zip code.
- country – (string) Country name.
- countryCode – (string) Country code.
- birthday – (string) Birthday in the format, “YYYY-MM-DD”.
- created – (string) Date contact was created.
- dates – (array) Custom anniversary dates.
- type – (string) Type of address (other, anniversary).
- value – (string) Email address.
- email – (array) Email addresses.
- type – (string) Type of address (home, work, other).
- value – (string) Email address.
- im – (array) Instant Message usernames
- type – (string) Type of im (yahoo, jabber, msn, icq, aim, other).
- value – (string) Email address.
- dept – (string) Department.
- firstName – (string) First name.
- lastName – (string) Last name.
- middleName – (string) Middle name.
- modified – (string) Date contact was modified.
- nickName – (string) Nickname.
- note – (string) Quick note about the contact.
- org – (string)Organization name.
- phone – (array) Phone numbers.
- type – (string) Type of phones (home, work, mobile, main, homeFax, workFax, pager, other).
- value – (string) Email address.
- prefix – (string) Prefix (“Sir,” “Duke,” “General”).
- suffix – (string) uffix (“Jr.,” “Sr.,” “III”).
- title – (string) Job title.
- url – (array) Web sites.
- type – (string) Type of address (homepage, work, other).
- value – (string) Email address.
- address – (object) Address
Example:
var personFirst = lg.contacts.list[0].firstName;
org
Filter names by organization. Only matching results will be saved in the list array.
Syntax:
lg.contacts.org(string);
Arguments:
- string – (string) Filter by string.
Event Trigger:
- lg_contacts
Example:
lg.contacts.org('Creative Consulting');
phone
Filter names by phone number. Only matching results will be saved in the list array.
Syntax:
lg.contacts.phone(string);
Arguments:
- string – (string) Filter by phone number in the format, “000-000-0000″.
Event Trigger:
- lg_contacts
Example:
lg.contacts.phone('555-564-8583');
search
Search for any part of name. May also use partial names as well as the wildcard, “*”. Only matching results will be saved in the list array.
Syntax:
lg.contacts.search(string);
Arguments:
- string – (string) String to search.
Event Trigger:
- lg_contacts
Example:
lg.contacts.search('Hig*');
title
Filter names by title. Only matching results will be saved in the list array.
Syntax:
lg.contacts.title(string);
Arguments:
- string – (string) Filter by string.
Event Trigger:
- lg_contacts
Example:
lg.contacts.title('Producer');
