bkuhl / easychimp
Installs: 2 718
Dependents: 0
Suggesters: 0
Security: 0
Stars: 16
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=7.0.0
- illuminate/support: >=5.0
- pacely/mailchimp-apiv3: ~1.0
Requires (Dev)
- phpspec/phpspec: ~3.1
- symfony/var-dumper: dev-master
README
This project has been deprecated in favor of using Mailchimp's PHP SDK directly.
Easychimp makes integrating a PHP/Laravel app with Mailchimp's API (version 3) dead simple. Functionality is currently limited to managing subscriptions on a list because that's what I needed for a project. I'd welcome pull requests that add additional functionality.
Usage
$easychimp = new Easychimp\Easychimp($apiKey); $easychimp->validateKey(); // throws InvalidApiKey $list = $easychimp->mailingList($listId); $list->exists(); // boolean $list->isOnList($email); // boolean $list->subscribe($email, $firstName = null, $lastName = null, ...); // boolean $list->unsubscribe($email); // boolean $list->subscriberInfo($email); // [] $list->updateSubscriber($email, $firstName = null, $lastName = null, ...); // boolean // Interests are labeled as "Groups" in the Mailchimp UI $list->interestCategories(); // [] $list->interests($interestCategoryId); // []
Installation
composer require bkuhl/easychimp:~1.0
To use the facade, add the following to config/app.php
:
'aliases' => [ ... 'Easychimp' => Easychimp\MailchimpFacade::class, ]
Environment Variables
Define the MAILCHIMP_API_KEY
environmental variable. Get your API key here.