You are here

protected function CampaignMonitor::createClientObj in Campaign Monitor 8

Create API client object.

Return value

\CS_REST_Clients The Campaign Monitor client object.

3 calls to CampaignMonitor::createClientObj()
CampaignMonitor::getCampaigns in src/CampaignMonitor.php
Get basic information about campaigns in the form of a keyed array. The information is stored locally in a temporary cache. The array is formatted like this:.
CampaignMonitor::getDrafts in src/CampaignMonitor.php
Get basic information about drafts in the form of a keyed array. The information is stored locally in a temporary cache. The array is formatted like this:.
CampaignMonitor::getLists in src/CampaignMonitor.php
Gets all lists from Campaign Monitor found under the client ID given during object creation. The list is returned as a keyed array and cached in the cache table, so it may not always return the newest information.

File

src/CampaignMonitor.php, line 125
Implementation of the CampaignMonitor class, which is a wrapper class for Campaign Monitor v3 API. It's implemented as a Singleton class and instances are created using the account variables and the static function getConnector(). An example:.

Class

CampaignMonitor

Namespace

Drupal\campaignmonitor

Code

protected function createClientObj() {
  return $this->clientId ? new \CS_REST_Clients($this->clientId, $this->apiKey) : NULL;
}