class MailchimpTemplates in Mailchimp 8
Same name in this branch
- 8 lib/mailchimp-api-php/src/MailchimpTemplates.php \Mailchimp\MailchimpTemplates
- 8 lib/mailchimp-api-php/tests/src/MailchimpTemplates.php \Mailchimp\Tests\MailchimpTemplates
Mailchimp Templates library.
@package Mailchimp
Hierarchy
- class \Mailchimp\Mailchimp
- class \Mailchimp\MailchimpTemplates
Expanded class hierarchy of MailchimpTemplates
2 string references to 'MailchimpTemplates'
- mailchimp_campaign_get_template in modules/
mailchimp_campaign/ mailchimp_campaign.module - Return full details for a Mailchimp Template.
- mailchimp_campaign_list_templates in modules/
mailchimp_campaign/ mailchimp_campaign.module - Return all available user templates.
File
- lib/
mailchimp-api-php/ src/ MailchimpTemplates.php, line 10
Namespace
MailchimpView source
class MailchimpTemplates extends Mailchimp {
/**
* Gets information about all templates owned by the authenticated account.
*
* @param array $parameters
* Associative array of optional request parameters.
*
* @return object
*
* @see http://developer.mailchimp.com/documentation/mailchimp/reference/templates/#read-get_templates
*/
public function getTemplates($parameters = []) {
return $this
->request('GET', '/templates', NULL, $parameters);
}
/**
* Gets information a specific template.
*
* @param string $template_id
* The ID of the template.
* @param array $parameters
* Associative array of optional request parameters.
*
* @return object
*
* @see http://developer.mailchimp.com/documentation/mailchimp/reference/templates/#read-get_templates_template_id
*/
public function getTemplate($template_id, $parameters = []) {
$tokens = [
'template_id' => $template_id,
];
return $this
->request('GET', '/templates/{template_id}', $tokens, $parameters);
}
/**
* Gets the default content of a specific template.
*
* @param string $template_id
* The ID of the template.
* @param array $parameters
* Associative array of optional request parameters.
*
* @return object
*
* @see http://developer.mailchimp.com/documentation/mailchimp/reference/templates/default-content/#read-get_templates_template_id_default_content
*/
public function getTemplateContent($template_id, $parameters = []) {
$tokens = [
'template_id' => $template_id,
];
return $this
->request('GET', '/templates/{template_id}/default-content', $tokens, $parameters);
}
}
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 | |||
Mailchimp:: |
public | function | Mailchimp constructor. | 7 |
MailchimpTemplates:: |
public | function | Gets information a specific template. | |
MailchimpTemplates:: |
public | function | Gets the default content of a specific template. | |
MailchimpTemplates:: |
public | function | Gets information about all templates owned by the authenticated account. |