3 * Test Generated example demonstrating the Activity.get API.
5 * Demonstrates _low filter (at time of writing doesn't work if contact_id is set.
10 function activity_get_example() {
12 'filter.activity_date_time_low' => '20120101000000',
17 $result = civicrm_api3('Activity', 'get', $params);
19 catch (CiviCRM_API3_Exception
$e) {
21 $errorMessage = $e->getMessage();
22 $errorCode = $e->getErrorCode();
23 $errorData = $e->getExtraParams();
26 'error_message' => $errorMessage,
27 'error_code' => $errorCode,
28 'error_data' => $errorData,
36 * Function returns array of result expected from previous function.
41 function activity_get_expectedresult() {
51 'activity_type_id' => '9999',
52 'subject' => 'Make-it-Happen Meeting',
53 'activity_date_time' => '2012-02-16 00:00:00',
55 'location' => 'Pennsylvania',
56 'details' => 'a test activity',
61 'is_current_revision' => '1',
64 'source_contact_id' => '1',
69 return $expectedResult;
73 * This example has been generated from the API test suite.
74 * The test that created it is called "testGetFilterMaxDate"
75 * and can be found at:
76 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityTest.php
78 * You can see the outcome of the API tests at
79 * https://test.civicrm.org/job/CiviCRM-master-git/
81 * To Learn about the API read
82 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
84 * Browse the api on your own site with the api explorer
85 * http://MYSITE.ORG/path/to/civicrm/api
87 * Read more about testing here
88 * http://wiki.civicrm.org/confluence/display/CRM/Testing
90 * API Standards documentation:
91 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards