class MailchimpReports in Mailchimp 8
Same name in this branch
- 8 lib/mailchimp-api-php/src/MailchimpReports.php \Mailchimp\MailchimpReports
- 8 lib/mailchimp-api-php/tests/src/MailchimpReports.php \Mailchimp\Tests\MailchimpReports
Mailchimp Reports library.
@package Mailchimp
Hierarchy
- class \Mailchimp\Mailchimp
- class \Mailchimp\MailchimpReports
Expanded class hierarchy of MailchimpReports
1 string reference to 'MailchimpReports'
- MailchimpCampaignController::stats in modules/
mailchimp_campaign/ src/ Controller/ MailchimpCampaignController.php - View a Mailchimp campaign stats.
File
- lib/
mailchimp-api-php/ src/ MailchimpReports.php, line 10
Namespace
MailchimpView source
class MailchimpReports extends Mailchimp {
/**
* Gets a report summary for the authenticated account.
*
* @param array $parameters
* Associative array of optional request parameters.
*
* @return object
*
* @see http://developer.mailchimp.com/documentation/mailchimp/reference/reports/#read-get_reports
*/
public function getSummary($parameters = []) {
return $this
->request('GET', '/reports', NULL, $parameters);
}
/**
* Gets a report summary for a specific campaign.
*
* @param string $campaign_id
* The ID of the campaign.
* @param array $parameters
* Associative array of optional request parameters.
*
* @return object
*
* @see http://developer.mailchimp.com/documentation/mailchimp/reference/reports/#read-get_reports_campaign_id
*/
public function getCampaignSummary($campaign_id, $parameters = []) {
$tokens = [
'campaign_id' => $campaign_id,
];
return $this
->request('GET', '/reports/{campaign_id}', $tokens, $parameters);
}
/**
* Gets a specific report for a specific campaign.
*
* @param string $campaign_id
* The ID of the campaign.
* @param string $type
* The type of report to generate path url.
* - abuse-reports @see http://developer.mailchimp.com/documentation/mailchimp/reference/reports/abuse-reports
* - advice @see http://developer.mailchimp.com/documentation/mailchimp/reference/reports/advice
* - click-details @see http://developer.mailchimp.com/documentation/mailchimp/reference/reports/click-details
* - domain-performance @see http://developer.mailchimp.com/documentation/mailchimp/reference/reports/domain-performance
* - eepurl @see http://developer.mailchimp.com/documentation/mailchimp/reference/reports/eepurl
* - email-activity @see http://developer.mailchimp.com/documentation/mailchimp/reference/reports/email-activity
* - locations @see http://developer.mailchimp.com/documentation/mailchimp/reference/reports/locations
* - sent-to @see http://developer.mailchimp.com/documentation/mailchimp/reference/reports/sent-to
* - sub-reports @see http://developer.mailchimp.com/documentation/mailchimp/reference/reports/sub-reports
* - unsubscribed @see http://developer.mailchimp.com/documentation/mailchimp/reference/reports/unsubscribed
* @param array $parameters
* Associative array of optional request parameters.
*
* @return object
*/
public function getCampaignReport($campaign_id, $type, $parameters = []) {
$tokens = [
'campaign_id' => $campaign_id,
'type' => $type,
];
return $this
->request('GET', '/reports/{campaign_id}/{type}', $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 |
MailchimpReports:: |
public | function | Gets a specific report for a specific campaign. | |
MailchimpReports:: |
public | function | Gets a report summary for a specific campaign. | |
MailchimpReports:: |
public | function | Gets a report summary for the authenticated account. |