You are here

function CampaignMonitor::campaignGeneric in Campaign Monitor 6.3

Same name and namespace in other branches
  1. 5.2 lib/CMBase.php \CampaignMonitor::campaignGeneric()
  2. 6.2 lib/CMBase.php \CampaignMonitor::campaignGeneric()

* A generic wrapper to feed Campaign.* calls. * *

Parameters

string $method The API method to call.: * @param int $campaign_id (Optional) A valid Campaign ID to check against. If not given, the default class property is used. * @return mixed A parsed response from the server, or null if something failed.

7 calls to CampaignMonitor::campaignGeneric()
CampaignMonitor::campaignDelete in lib/CMBase.php
* Delete a campaign. *
CampaignMonitor::campaignGetBounces in lib/CMBase.php
*
CampaignMonitor::campaignGetLists in lib/CMBase.php
*
CampaignMonitor::campaignGetOpens in lib/CMBase.php
*
CampaignMonitor::campaignGetSubscriberClicks in lib/CMBase.php
*

... See full list

File

lib/CMBase.php, line 1147

Class

CampaignMonitor
The new CampaignMonitor class that now extends from CMBase. This should be backwards compatible with the original (PHP5) version.

Code

function campaignGeneric($method, $campaign_id = null) {
  if (!$campaign_id) {
    $campaign_id = $this->campaign_id;
  }
  return $this
    ->makeCall('Campaign.' . $method, array(
    'params' => array(
      'CampaignID' => $campaign_id,
    ),
  ));
}