Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project improvements. In Progress #316

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 0 additions & 142 deletions .php_cs

This file was deleted.

75 changes: 75 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,81 @@ try {
}
```

### Get Campaigns with filters

```php
require 'vendor/autoload.php';

use \Mailjet\Resources;

$mj = new \Mailjet\Client(
'xxx',
'yyy',
true,
['version' => 'v3']
);
try {
//Note: If no query parameters are used, only campaigns sent since 00:00 UTC on the current day will be returned.
$filters = [
'period' => 'Year',
];
$response = $mj->get(Resources::$Campaign, ['filters' => $filters]);
print_r($response->getBody());

} catch (Throwable $throwable) {
print_r($throwable->getMessage());
}
```

### Get ESP statistics

```php
require 'vendor/autoload.php';

use \Mailjet\Resources;

$mj = new \Mailjet\Client(
'xxxx',
'yyyy',
true,
['version' => 'v3']
);
try {
$filters = [
'CampaignID' => 123456,
];
$response = $mj->get(Resources::$Useragentstatistics, ['filters' => $filters]);
print_r($response->getBody());


} catch (Throwable $throwable) {
print_r($throwable->getMessage());
}
```

### Get Campaign overview

```php
require 'vendor/autoload.php';

use \Mailjet\Resources;

$mj = new \Mailjet\Client(
'xxx',
'yyy',
true,
['version' => 'v3']
);
try {
$response = $mj->get(Resources::$Campaignoverview);
print_r($response->getBody());


} catch (Throwable $throwable) {
print_r($throwable->getMessage());
}
```

## Contribute

Mailjet loves developers. You can be part of this project!
Expand Down
Loading