3 * Test Generated example demonstrating the Address.get API.
5 * Demonstrates Use of Like.
10 function address_get_example() {
12 'street_address' => array(
19 $result = civicrm_api3('Address', 'get', $params);
21 catch (CiviCRM_API3_Exception
$e) {
23 $errorMessage = $e->getMessage();
24 $errorCode = $e->getErrorCode();
25 $errorData = $e->getExtraParams();
28 'error_message' => $errorMessage,
29 'error_code' => $errorCode,
30 'error_data' => $errorData,
38 * Function returns array of result expected from previous function.
43 function address_get_expectedresult() {
45 $expectedResult = array(
54 'location_type_id' => '18',
57 'street_address' => 'Ambachtstraat 23',
58 'street_number' => '23',
59 'street_name' => 'Ambachtstraat',
61 'postal_code' => '6971 BN',
62 'country_id' => '1152',
63 'manual_geo_code' => 0,
68 return $expectedResult;
72 * This example has been generated from the API test suite.
73 * The test that created it is called "testGetAddressLikeSuccess"
74 * and can be found at:
75 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/AddressTest.php
77 * You can see the outcome of the API tests at
78 * https://test.civicrm.org/job/CiviCRM-master-git/
80 * To Learn about the API read
81 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
83 * Browse the api on your own site with the api explorer
84 * http://MYSITE.ORG/path/to/civicrm/api
86 * Read more about testing here
87 * http://wiki.civicrm.org/confluence/display/CRM/Testing
89 * API Standards documentation:
90 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards