You are here

function CMBase::subscribersGetActive in Campaign Monitor 5.2

* 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 CMBase::subscribersGetActive()
CMBase::subscribersGetBounced in lib/CMBase.php
*
CMBase::subscribersGetUnsubscribed in lib/CMBase.php
*

File

lib/CMBase.php, line 331

Class

CMBase

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,
    ),
  ));
}