4 Example demonstrates setting & retrieving the target & source
6 function activity__example(){
8 'source_contact_id' => 17,
9 'subject' => 'Make-it-Happen Meeting',
10 'activity_date_time' => '20110316',
12 'location' => 'Pensulvania',
13 'details' => 'a test activity',
15 'activity_type_id' => 1,
18 'target_contact_id' => 17,
19 'assignee_contact_id' => 17,
22 $result = civicrm_api( 'activity','',$params );
28 * Function returns array of result expected from previous function
30 function activity__expectedresult(){
32 $expectedResult = array(
40 'source_record_id' => '',
41 'activity_type_id' => '1',
42 'subject' => 'Make-it-Happen Meeting',
43 'activity_date_time' => '20110316000000',
45 'location' => 'Pensulvania',
48 'details' => 'a test activity',
55 'relationship_id' => '',
56 'is_current_revision' => '',
61 'engagement_level' => '',
67 return $expectedResult ;
72 * This example has been generated from the API test suite. The test that created it is called
74 * testActivityReturnTargetAssignee and can be found in
75 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/ActivityTest.php
77 * You can see the outcome of the API tests at
78 * http://tests.dev.civicrm.org/trunk/results-api_v3
80 * To Learn about the API read
81 * http://book.civicrm.org/developer/current/techniques/api/
83 * and review the wiki at
84 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
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