6 function contact_get_example(){
8 'email' => 'man2@yahoo.com',
12 $result = civicrm_api( 'contact','get',$params );
18 * Function returns array of result expected from previous function
20 function contact_get_expectedresult(){
22 $expectedResult = array(
30 'contact_type' => 'Individual',
31 'contact_sub_type' => '',
32 'sort_name' => 'man2@yahoo.com',
33 'display_name' => 'man2@yahoo.com',
40 'legal_identifier' => '',
41 'external_identifier' => '',
45 'preferred_mail_format' => 'Both',
52 'deceased_date' => '',
53 'household_name' => '',
54 'organization_name' => '',
56 'contact_is_deleted' => 0,
63 'current_employer' => '',
65 'street_address' => '',
66 'supplemental_address_1' => '',
67 'supplemental_address_2' => '',
69 'postal_code_suffix' => '',
73 'state_province_id' => '',
74 'state_province_name' => '',
75 'state_province' => '',
79 'phone_type_id' => '',
82 'email' => 'man2@yahoo.com',
87 'worldregion_id' => '',
94 return $expectedResult ;
99 * This example has been generated from the API test suite. The test that created it is called
101 * testContactGetEmail and can be found in
102 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/ContactTest.php
104 * You can see the outcome of the API tests at
105 * http://tests.dev.civicrm.org/trunk/results-api_v3
107 * To Learn about the API read
108 * http://book.civicrm.org/developer/current/techniques/api/
110 * and review the wiki at
111 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
113 * Read more about testing here
114 * http://wiki.civicrm.org/confluence/display/CRM/Testing
116 * API Standards documentation:
117 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards