Skip to content

Examples

Seb Kay edited this page Oct 12, 2021 · 4 revisions

Mailchimp

use Arbalest\Arbalest;
use Arbalest\Services\Mailchimp;

try {
    $arbalest = new Arbalest(
        new Mailchimp([
            'api_key'  => '12345',
            'server'   => 'us2',
            'list_id'  => 'abcde',
        ])
    );

    $arbalest->subscribe('[email protected]');
} catch (\Exception $e) {
    // Do something on error
}

Campaign Monitor

use Arbalest\Arbalest;
use Arbalest\Services\CampaignMonitor;

try {
    $arbalest = new Arbalest(
        new CampaignMonitor([
            'api_key'  => '12345',
            'list_id'  => 'abcde',
        ])
    );

    $arbalest->subscribe('[email protected]');
} catch (\Exception $e) {
    // Do something on error
}

ConvertKit

use Arbalest\Arbalest;
use Arbalest\Services\ConvertKit;

try {
    $arbalest = new Arbalest(
        new ConvertKit([
            'api_key'     => '12345',
            'api_secret'  => 'abcde',
            'form_id'     => '1ab2c3',
        ])
    );

    $arbalest->subscribe('[email protected]');
} catch (\Exception $e) {
    // Do something on error
}
Clone this wiki locally