Access to the contacts directory in the iPhone.

 

all

Get all contacts in the iPhone directory.


Syntax:

lg.contacts.all();

Event Trigger:

  • lg_contacts

Back to Top

 

 

dept

Filter names by department. Only matching results will be saved in the list array.


Syntax:

lg.contacts.dept(string);

Arguments:

  1. string – (string) Filter by string.


Event Trigger:

  • lg_contacts


Example:

lg.contacts.dept('Development');

Back to Top

 

 

email

Filter names by email. Only matching results will be saved in the list array.


Syntax:

lg.contacts.email(string);

Arguments:

  1. string – (string) Filter by string.


Event Trigger:

  • lg_contacts


Example:

lg.contacts.email('kate-bell@mac.com');

Back to Top

 

 

firstName

Filter names by first name. Only matching results will be saved in the list array.


Syntax:

lg.contacts.firstName(name);

Arguments:

  1. name – (string) Name to filter by.


Event Trigger:

  • lg_contacts


Example:

lg.contacts.firstName('Daniel');

Back to Top

 

 

lastName

Filter names by last name. Only matching results will be saved in the list array.


Syntax:

lg.contacts.lastName(name);

Arguments:

  1. name – (string) Name to filter by.


Event Trigger:

  • lg_contacts

Example:

lg.contacts.lastName('Higgins');

Back to Top

 

 

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.


Example:

var personFirst = lg.contacts.list[0].firstName;

Back to Top

 

 

org

Filter names by organization. Only matching results will be saved in the list array.


Syntax:

lg.contacts.org(string);

Arguments:

  1. string – (string) Filter by string.


Event Trigger:

  • lg_contacts


Example:

lg.contacts.org('Creative Consulting');

Back to Top

 

 

phone

Filter names by phone number. Only matching results will be saved in the list array.


Syntax:

lg.contacts.phone(string);

Arguments:

  1. string – (string) Filter by phone number in the format, “000-000-0000″.


Event Trigger:

  • lg_contacts


Example:

lg.contacts.phone('555-564-8583');

Back to Top

 

 

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:

  1. string – (string) String to search.


Event Trigger:

  • lg_contacts


Example:

lg.contacts.search('Hig*');

Back to Top

 

 

title

Filter names by title. Only matching results will be saved in the list array.


Syntax:

lg.contacts.title(string);

Arguments:

  1. string – (string) Filter by string.


Event Trigger:

  • lg_contacts


Example:

lg.contacts.title('Producer');

Back to Top