<?php
-
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
- *
* APIv3 functions for registering/processing mailing group events.
*
+ * @deprecated
* @package CiviCRM_APIv3
- * @subpackage API_MailerGroup
- * @copyright CiviCRM LLC (c) 2004-2014
- * $Id$
- *
*/
/**
+ * Declare deprecated functions.
+ *
* @deprecated api notice
- * @return string to indicate this entire api entity is deprecated
+ * @return string
+ * to indicate this entire api entity is deprecated
*/
function _civicrm_api3_mailing_group_deprecation() {
- return 'The mailing_group api is deprecated. Use the mailing_event apis instead.';
+ return 'The MailingGroup api is deprecated. Use the mailing_event apis instead.';
}
/**
- * Handle an unsubscribe event
+ * Handle an unsubscribe event.
+ *
* @deprecated
*
* @param array $params
}
/**
- * Handle a site-level unsubscribe event
+ * Handle a site-level unsubscribe event.
+ *
* @deprecated
*
* @param array $params
}
/**
- * Handle a resubscription event
+ * Handle a re-subscription event.
+ *
* @deprecated
*
* @param array $params
}
/**
- * Handle a subscription event
+ * Handle a subscription event.
+ *
* @deprecated
*
* @param array $params
}
/**
+ * Create mailing group.
+ *
+ * @param array $params
+ *
+ * @return array
+ * @throws \API_Exception
+ */
+function civicrm_api3_mailing_group_create($params) {
+ return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
+}
+
+/**
+ * Get mailing group.
+ *
+ * @param array $params
+ *
+ * @return array
+ */
+function civicrm_api3_mailing_group_get($params) {
+ return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
+}
+
+/**
+ * Delete mailing group.
+ *
+ * @param array $params
+ *
+ * @return array
+ * @throws \API_Exception
+ */
+function civicrm_api3_mailing_group_delete($params) {
+ return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
+}
+
+/**
+ * Get metadata for mailing group functions.
+ *
* @param array $params
*
* @return array
unset($field['pseudoconstant']);
}
- return civicrm_api3_create_success($fields, $params, 'mailing_group', 'getfields');
+ return civicrm_api3_create_success($fields, $params, 'MailingGroup', 'getfields');
}
-