function CampaignMonitor::subscribersGetActive in Campaign Monitor 6.2
Same name and namespace in other branches
- 6.3 lib/CMBase.php \CampaignMonitor::subscribersGetActive()
* Wrapper for Subscribers.GetActive. This method triples as Subscribers.GetUnsubscribed * and Subscribers.GetBounced when the very last parameter is overridden. * *
Parameters
mixed $date If a string, should be in the date() format of 'Y-m-d H:i:s', otherwise, a Unix timestamp.: * @param int $list_id (Optional) A valid List ID to check against. If not given, the default class property is used. * @param string $action (Optional) Set the actual API method to call. Defaults to Subscribers.GeActive if no other valid value is given. * @return mixed A parsed response from the server, or null if something failed. * @see http://www.campaignmonitor.com/api/Subscribers.GetActive.aspx
2 calls to CampaignMonitor::subscribersGetActive()
File
- lib/
CMBase.php, line 566
Class
- CampaignMonitor
- The new CampaignMonitor class that now extends from CMBase. This should be backwards compatible with the original (PHP5) version.
Code
function subscribersGetActive($date = 0, $list_id = null, $action = 'Subscribers.GetActive') {
if (!$list_id) {
$list_id = $this->list_id;
}
if (is_numeric($date)) {
$date = date('Y-m-d H:i:s', $date);
}
$valid_actions = array(
'Subscribers.GetActive' => '',
'Subscribers.GetUnsubscribed' => '',
'Subscribers.GetBounced' => '',
);
if (!isset($valid_actions[$action])) {
$action = 'Subscribers.GetActive';
}
return $this
->makeCall($action, array(
'params' => array(
'ListID' => $list_id,
'Date' => $date,
),
));
}