You are here

private function CampaignMonitor::createClientObj in Campaign Monitor 7

Create API client object.

Return value

CS_REST_Clients|bool The Campaign Monitor client object or FALSE on failure.

2 calls to CampaignMonitor::createClientObj()
CampaignMonitor::getCampaigns in lib/campaignmonitor.class.inc
Get basic information about campaigns in the form of a keyed array.
CampaignMonitor::getLists in lib/campaignmonitor.class.inc
Gets all lists from Campaign Monitor.

File

lib/campaignmonitor.class.inc, line 232
Implementation of the CampaignMonitor class.

Class

CampaignMonitor
Implementation of the CampaignMonitor class.

Code

private function createClientObj() {
  if ($this
    ->libraryLoad(self::FILE_CLIENT)) {
    return new CS_REST_Clients($this->clientId, $this->apiKey);
  }
  $this
    ->addError(WATCHDOG_ERROR, t('Failed to locate the client library.'));
  return FALSE;
}