grork/mailchimp

Easily manage Mailchimp API v3

dev-master 2016-07-06 14:05 UTC

This package is auto-updated.

Last update: 2024-09-14 00:05:15 UTC


README

This class will help you to manage the MailChimp API v3.

It's not complete, but the most important methods are included.

Getting started

  1. Install package with composer: composer require grork/mailchimp=dev-master. If you don't want to use composer, you can download the repository and extract it in your project folder.
  2. Require the autoload with require __DIR__ . '/vendor/autoload.php' or with require __DIR__ . '/src/Mailchimp.php (or wherever you placed the folder)
  3. Init the class with $mailchimp = new Grork\Mailchimp( '<API-KEY-HERE>' ). You can obtain your API Key logging into MailChimp > Account > Extras > API Keys > Create A Key

It's better to init the class with the following code, catching the exceptions:

try {
	$mailchimp = new Grork\Mailchimp( '<API-KEY-HERE>' );
} catch( Exception $e ) {
	die( 'Error: ' . $e->getMessage() );
}

Documentation

For the documentation, you can check the wiki.