class MailchimpCampaigns in Mailchimp 8
Same name in this branch
- 8 lib/mailchimp-api-php/src/MailchimpCampaigns.php \Mailchimp\MailchimpCampaigns
- 8 lib/mailchimp-api-php/tests/src/MailchimpCampaigns.php \Mailchimp\Tests\MailchimpCampaigns
Mailchimp Campaigns library test cases.
@package Mailchimp\Tests
Hierarchy
- class \Mailchimp\Mailchimp
- class \Mailchimp\MailchimpCampaigns
- class \Mailchimp\Tests\MailchimpCampaigns
- class \Mailchimp\MailchimpCampaigns
Expanded class hierarchy of MailchimpCampaigns
5 string references to 'MailchimpCampaigns'
- mailchimp_campaign_delete_campaign in modules/
mailchimp_campaign/ mailchimp_campaign.module - Delete a Mailchimp campaign and the local entity.
- mailchimp_campaign_get_campaigns in modules/
mailchimp_campaign/ mailchimp_campaign.module - Get Mailchimp campaigns.
- mailchimp_campaign_save_campaign in modules/
mailchimp_campaign/ mailchimp_campaign.module - Save a campaign in Mailchimp and as a Drupal entity.
- mailchimp_campaign_send_campaign in modules/
mailchimp_campaign/ mailchimp_campaign.module - Sends a Mailchimp campaign.
- mailchimp_get_campaign_data in ./
mailchimp.module - Wrapper function to return data for a given campaign.
File
- lib/
mailchimp-api-php/ tests/ src/ MailchimpCampaigns.php, line 10
Namespace
Mailchimp\TestsView source
class MailchimpCampaigns extends \Mailchimp\MailchimpCampaigns {
/**
* @inheritdoc
*/
public function __construct($api_key = 'apikey', $api_user = 'apikey', $http_options = []) {
$this->client = new MailchimpTestHttpClient();
}
public function getClient() {
return $this->client;
}
public function getEndpoint() {
return $this->endpoint;
}
/**
* @inheritdoc
*/
public function getCampaign($campaign_id, $parameters = []) {
parent::getCampaign($campaign_id, $parameters);
$response = (object) [
'id' => $campaign_id,
'type' => 'regular',
'recipients' => (object) [
'list_id' => '57afe96172',
],
'settings' => (object) [
'subject_line' => 'Test Campaign',
],
'tracking' => (object) [
'html_clicks' => TRUE,
'text_clicks' => FALSE,
],
];
return $response;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Mailchimp:: |
private | property | The Mailchimp API key to authenticate with. | |
Mailchimp:: |
private | property | The Mailchimp API username to authenticate with. | |
Mailchimp:: |
private | property | Array of pending batch operations. | |
Mailchimp:: |
protected | property | The HTTP client. | |
Mailchimp:: |
private | property | A Mailchimp API error code to return with every API response. | |
Mailchimp:: |
protected | property | The REST API endpoint. | |
Mailchimp:: |
public | property | API version. | |
Mailchimp:: |
protected | function | Adds a pending batch operation. | |
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
constant | |||
Mailchimp:: |
public | function | Gets Mailchimp account information for the authenticated account. | |
Mailchimp:: |
public | function | Gets the status of a batch request. | |
Mailchimp:: |
private | function | Gets the ID of the data center associated with an API key. | |
Mailchimp:: |
private | function | Instantiates a default HTTP client based on the local environment. | |
Mailchimp:: |
public | function | Processes all pending batch operations. | |
Mailchimp:: |
public | function | Makes a request to the Mailchimp API. | |
Mailchimp:: |
public | function | Sets a custom HTTP client to be used for all API requests. | |
Mailchimp:: |
public | function | Sets a Mailchimp error code to be returned by all requests. | |
Mailchimp:: |
constant | |||
MailchimpCampaigns:: |
public | function | Adds a new campaign to the authenticated account. | |
MailchimpCampaigns:: |
constant | |||
MailchimpCampaigns:: |
constant | |||
MailchimpCampaigns:: |
constant | |||
MailchimpCampaigns:: |
constant | |||
MailchimpCampaigns:: |
constant | |||
MailchimpCampaigns:: |
public | function | Deletes a Mailchimp campaign. | |
MailchimpCampaigns:: |
constant | |||
MailchimpCampaigns:: |
constant | |||
MailchimpCampaigns:: |
public | function |
@inheritdoc Overrides MailchimpCampaigns:: |
|
MailchimpCampaigns:: |
public | function | Gets the HTML, plain-text, and template content for a Mailchimp campaign. | |
MailchimpCampaigns:: |
public | function | Gets information about all campaigns owned by the authenticated account. | |
MailchimpCampaigns:: |
public | function | ||
MailchimpCampaigns:: |
public | function | ||
MailchimpCampaigns:: |
public | function | Get the send checklist for a Mailchimp campaign. | |
MailchimpCampaigns:: |
public | function | Schedule a Mailchimp campaign. | |
MailchimpCampaigns:: |
public | function | Send a Mailchimp campaign. | |
MailchimpCampaigns:: |
public | function | Sends a test email. | |
MailchimpCampaigns:: |
public | function | Sets the HTML, plain-text, and template content for a Mailchimp campaign. | |
MailchimpCampaigns:: |
public | function | Unschedule a Mailchimp campaign. | |
MailchimpCampaigns:: |
public | function | Updates a campaign. | |
MailchimpCampaigns:: |
public | function |
@inheritdoc Overrides Mailchimp:: |