/**
 * Geocode group of contacts based on given params
 *
 * @param  array   	  $params (reference ) input parameters
 *
 * @return array API Result Array
 * {@getfields contact_geocode}
 *
 * @static void
 * @access public
 *
 *
 */
function civicrm_api3_job_geocode($params)
{
    // available params:
    // 'start=', 'end=', 'geocoding=', 'parse=', 'throttle='
    require_once 'CRM/Utils/Address/BatchUpdate.php';
    $gc = new CRM_Utils_Address_BatchUpdate($params);
    $result = $gc->run();
    if ($result['is_error'] == 0) {
        return civicrm_api3_create_success($result['messages']);
    } else {
        return civicrm_api3_create_error($result['messages']);
    }
}
Exemple #2
0
/**
 * Geocode group of contacts based on given params.
 *
 * @param array $params
 *   input parameters.
 *
 * @return array
 *   API Result Array
 */
function civicrm_api3_job_geocode($params)
{
    $gc = new CRM_Utils_Address_BatchUpdate($params);
    $result = $gc->run();
    if ($result['is_error'] == 0) {
        return civicrm_api3_create_success($result['messages']);
    } else {
        return civicrm_api3_create_error($result['messages']);
    }
}