You are here

protected function CampaignMonitor::createSubscriberObj in Campaign Monitor 8

Create API subscribers object.

Parameters

string $listId: The Campaign Monitor list ID.

Return value

\CS_REST_Subscribers The Campaign Monitor subscriber object.

4 calls to CampaignMonitor::createSubscriberObj()
CampaignMonitor::getSubscriber in src/CampaignMonitor.php
Get values entered by the subscriber, when she/he subscribed to a given list.
CampaignMonitor::subscribe in src/CampaignMonitor.php
Subscribe a user to a given list, with information entered. If the user is already subscribed to the list, her/his information will be updated with the new values.
CampaignMonitor::unsubscribe in src/CampaignMonitor.php
Unsubscribe a given user, identified by e-mail address, from a given list.
CampaignMonitor::updateSubscriberEmail in src/CampaignMonitor.php
Updates the subscriber e-mail address for a given list.

File

src/CampaignMonitor.php, line 151
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 createSubscriberObj($listId) {
  return new \CS_REST_Subscribers($listId, $this->apiKey);
}