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,
57 'current_employer' => '',
59 'street_address' => '',
60 'supplemental_address_1' => '',
61 'supplemental_address_2' => '',
63 'postal_code_suffix' => '',
67 'state_province_id' => '',
68 'state_province_name' => '',
69 'state_province' => '',
73 'phone_type_id' => '',
76 'email' => 'man2@yahoo.com',
81 'worldregion_id' => '',
88 return $expectedResult ;
93 * This example has been generated from the API test suite. The test that created it is called
95 * testContactGetEmail and can be found in
96 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/ContactTest.php
98 * You can see the outcome of the API tests at
99 * http://tests.dev.civicrm.org/trunk/results-api_v3
101 * To Learn about the API read
102 * http://book.civicrm.org/developer/current/techniques/api/
104 * and review the wiki at
105 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
107 * Read more about testing here
108 * http://wiki.civicrm.org/confluence/display/CRM/Testing
110 * API Standards documentation:
111 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards