87d490a69b8cf02dbad02b28da58a0f2515c3d70
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();
27 'error' => $errorMessage,
28 'error_code' => $errorCode,
29 'error_data' => $errorData,
37 * Function returns array of result expected from previous function.
42 function address_get_expectedresult() {
44 $expectedResult = array(
53 'location_type_id' => '18',
56 'street_address' => 'Ambachtstraat 23',
57 'street_number' => '23',
58 'street_name' => 'Ambachtstraat',
60 'postal_code' => '6971 BN',
61 'country_id' => '1152',
62 'manual_geo_code' => 0,
67 return $expectedResult;
71 * This example has been generated from the API test suite.
72 * The test that created it is called "testGetAddressLikeSuccess"
73 * and can be found at:
74 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/AddressTest.php
76 * You can see the outcome of the API tests at
77 * https://test.civicrm.org/job/CiviCRM-master-git/
79 * To Learn about the API read
80 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
82 * Browse the api on your own site with the api explorer
83 * http://MYSITE.ORG/path/to/civicrm/api
85 * Read more about testing here
86 * http://wiki.civicrm.org/confluence/display/CRM/Testing
88 * API Standards documentation:
89 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards