dreamcampaigns/managesend-bundle
This bundle integrates DreamCampaigns API into your Symfony application.
This version of the bundle requires Symfony 5 for Symfony 2, 3 or 4 versions try v1.
managesend-bundle is available on Packagist as the
dreamcampaigns/managesend-bundle package.
Require the bundle in your composer.json file:
{
"require": {
"dreamcampaigns/managesend-bundle": "*"
}
}
Install the bundle:
$ composer require dreamcampaigns/managesend-bundle
Register the bundle:
// app/AppKernel.php
public function registerBundles()
{
return array(
new Managesend\ApiBundle\ManagesendApiBundle(),
// ...
);
}
Add DreamCampaigns Api keys
#app/config/config.yml
managesend_api:
api_key: <Your API Token Key>
api_secret: <Your API Token Secret>
client_id: <Your Client id> #optional for some calls
timeout: 60 #optional timeout value, default is 60 secs
Add DreamCampaigns Api keys
You can add your Api keys to the managesend_api.yaml
# config/packages/managesend_api.yaml
managesend_api:
api_key: <Your API Token Key>
api_secret: <Your API Token Secret>
client_id: <Your Client id> #optional for some calls
timeout: 60 #optional timeout value, default is 60 secs
or use the .env
MANAGESEND_TOKEN_KEY=ACXXXXXX
MANAGESEND_TOKEN_SECRET=YXYXYX
MANAGESEND_CLIENT_ID=c5is8tltkk00018k9ype5lg741
The API is available with the managesend_api service.
To access it, get it from controller container:
<?php
$managesend = $this->get('managesend_api');
Or use DependencyInjection
public function TestAction(\Managesend\RestClient $managesend)
{
$result = $managesend->clients()->getClients();
}
Samples for accessing all resources can be found in the examples directory of dreamcampaigns/managesend-php
For more details you can reffer to the DreamCampaigns API documentations
How can I help you explore Laravel packages today?