3 * Test Generated example demonstrating the Event.get API.
8 function event_get_example() {
10 'event_title' => 'Annual CiviCRM meet',
15 $result = civicrm_api3('Event', 'get', $params);
17 catch (CiviCRM_API3_Exception
$e) {
19 $errorMessage = $e->getMessage();
20 $errorCode = $e->getErrorCode();
21 $errorData = $e->getExtraParams();
23 'error' => $errorMessage,
24 'error_code' => $errorCode,
25 'error_data' => $errorData,
33 * Function returns array of result expected from previous function.
38 function event_get_expectedresult() {
40 $expectedResult = array(
48 'title' => 'Annual CiviCRM meet',
49 'event_title' => 'Annual CiviCRM meet',
50 'event_type_id' => '1',
51 'participant_listing_id' => 0,
53 'start_date' => '2013-07-29 00:00:00',
54 'event_start_date' => '2013-07-29 00:00:00',
55 'is_online_registration' => 0,
59 'is_show_location' => '1',
60 'default_role_id' => '1',
61 'is_email_confirm' => 0,
63 'is_partial_payment' => 0,
64 'is_multiple_registrations' => 0,
65 'allow_same_participant_emails' => 0,
67 'created_date' => '2013-07-28 08:49:19',
69 'is_confirm_enabled' => '1',
70 'is_billing_required' => 0,
75 return $expectedResult;
79 * This example has been generated from the API test suite.
80 * The test that created it is called "testGetEventByEventTitle"
81 * and can be found at:
82 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EventTest.php
84 * You can see the outcome of the API tests at
85 * https://test.civicrm.org/job/CiviCRM-master-git/
87 * To Learn about the API read
88 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
90 * Browse the api on your own site with the api explorer
91 * http://MYSITE.ORG/path/to/civicrm/api
93 * Read more about testing here
94 * http://wiki.civicrm.org/confluence/display/CRM/Testing
96 * API Standards documentation:
97 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards