leroy-merlin-br/exacttarget-client
Easy way to interact with ExactTarget REST API in Laravel
11,472
3
| Install | |
|---|---|
composer require leroy-merlin-br/exacttarget-client |
|
| Latest Version: | v1.0.0 |
| PHP: | ^8.0 |
| License: | MIT |
| Last Updated: | Jun 26, 2026 |
| Links: | GitHub · Packagist |
Maintainer: svc-lmbr-boitata
ExactTarget API wrapper for PHP, Laravel 5.* and 4.2
A wrapper to ExactTarget REST API.
Get started
[TODO]
Usage
Vanilla PHP
<?php
$guzzleClient = new \GuzzleHttp\Client();
$requestBuilder = new \LeroyMerlin\ExactTarget\RequestBuilder($guzzleClient);
$token = new \LeroyMerlin\ExactTarget\Token('YOUR_CLIENT_ID', 'YOUR_CLIENT_SECRET', $requestBuilder);
$client = new \LeroyMerlin\ExactTarget\Client($token, $requestBuilder);
$parameters = [
// optional
// 'some-url-param' => 'some-value'
'data' => [
'email' => 'johndoe@example.com',
'validators' => ['SyntaxValidator', 'MXValidator', 'ListDetectiveValidator'],
],
];
try {
$response = $client->validateEmail($parameters);
var_dump((string) $response->getBody());
} catch (\LeroyMerlin\ExactTarget\Exception\ExactTargetClientException $error) {
var_dump($error->getCode(), $error->getMessage());
}
Laravel 5.*
$client = app(\LeroyMerlin\ExactTarget\Client::class);
// As in https://code.exacttarget.com/apis-sdks/rest-api/v1/address/validateEmail.html
$parameters = [
// optional
// 'some-url-param' => 'some-value'
'data' => [
'email' => 'johndoe@example.com',
'validators' => ['SyntaxValidator', 'MXValidator', 'ListDetectiveValidator'],
],
];
try {
$response = $client->validateEmail($parameters);
var_dump((string) $response->getBody());
} catch (\LeroyMerlin\ExactTarget\Exception\ExactTargetClientException $error) {
var_dump($error->getCode(), $error->getMessage());
}
Laravel 4.2
$client = App::make('LeroyMerlin\ExactTarget\Client');
// As in https://code.exacttarget.com/apis-sdks/rest-api/v1/address/validateEmail.html
$parameters = [
// optional
// 'some-url-param' => 'some-value'
'data' => [
'email' => 'johndoe@example.com',
'validators' => ['SyntaxValidator', 'MXValidator', 'ListDetectiveValidator'],
],
];
try {
$response = $client->validateEmail($parameters);
var_dump((string) $response->getBody());
} catch (\LeroyMerlin\ExactTarget\Exception\ExactTargetClientException $error) {
var_dump($error->getCode(), $error->getMessage());
}
Related Packages
jhayiwg/laravel-linkedin
artesaos/laravel-linkedin : Linkedin API integration for Laravel and Lumen 5
4
0
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v1.0.0 | ^8.0 | ^9.0 | | MIT | |
| v0.8.0 | ^8.0 | ^9.0 | | MIT | |
| v0.7.0 | ^8.0 | ^9.0 | | MIT | |
| v0.6.0 | ^8.0 | ^9.0 | | MIT | |
| v0.5.0 | ^8.0 | ^9.0 | | MIT | |
| v0.4.0 | >=7.2 | ^5.8 | | MIT | |
| v0.3.0 | >=7.2 | ^5.8 | | MIT | |
| v0.2.0 | >=7.2 | ^5.8 | | MIT | |
| v0.1.0 | >=5.4.0 | ^5.0 | MIT |