3 * Test Generated example of using event get API.
9 function event_get_example() {
11 'event_title' => 'Annual CiviCRM meet',
16 $result = civicrm_api3('event', 'get', $params);
18 catch (CiviCRM_API3_Exception
$e) {
20 $errorMessage = $e->getMessage();
21 $errorCode = $e->getErrorCode();
22 $errorData = $e->getExtraParams();
24 'error' => $errorMessage,
25 'error_code' => $errorCode,
26 'error_data' => $errorData,
34 * Function returns array of result expected from previous function.
39 function event_get_expectedresult() {
41 $expectedResult = array(
49 'title' => 'Annual CiviCRM meet',
50 'event_title' => 'Annual CiviCRM meet',
51 'event_type_id' => '1',
52 'participant_listing_id' => 0,
54 'start_date' => '2013-07-29 00:00:00',
55 'event_start_date' => '2013-07-29 00:00:00',
56 'is_online_registration' => 0,
60 'is_show_location' => '1',
61 'default_role_id' => '1',
62 'is_email_confirm' => 0,
64 'is_partial_payment' => 0,
65 'is_multiple_registrations' => 0,
66 'allow_same_participant_emails' => 0,
68 'created_date' => '2013-07-28 08:49:19',
70 'is_confirm_enabled' => '1',
71 'is_billing_required' => 0,
76 return $expectedResult;
80 * This example has been generated from the API test suite.
81 * The test that created it is called
82 * testGetEventByEventTitle
84 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EventTest.php
86 * You can see the outcome of the API tests at
87 * https://test.civicrm.org/job/CiviCRM-master-git/
89 * To Learn about the API read
90 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
92 * Browse the api on your own site with the api explorer
93 * http://MYSITE.ORG/path/to/civicrm/api
95 * Read more about testing here
96 * http://wiki.civicrm.org/confluence/display/CRM/Testing
98 * API Standards documentation:
99 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards