Changeset 2052715
- Timestamp:
- 03/18/2019 02:32:55 PM (7 years ago)
- File:
-
- 1 edited
-
makemydonation-imo/trunk/api.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
makemydonation-imo/trunk/api.php
r1498447 r2052715 93 93 94 94 /** 95 * Load donations from a single case using the API. 96 * 97 * @param $case_id 98 * The case id. 99 * @return 100 * Array with the donation data as in the API description. 101 */ 102 function mmdimo_api_case_donations_load( $case_id, $count = FALSE ) { 103 $count = (int) $count; 104 $response = mmdimo_api_request( 'get', "donation?funeral_home_case=$case_id&count=$count" ); 105 106 if ( is_array( $response ) && isset( $response['response'] ) ) { 107 switch ($response['response']['code']) { 108 case 200: 109 return (array) json_decode( $response['body'] ); 110 } 111 } 112 113 return FALSE; 114 } 115 116 /** 95 117 * Create a case using the API. 96 118 *
Note: See TracChangeset
for help on using the changeset viewer.