This library use the Mailchimp API 2.0, and have compatibility with CodeIgniter 2.x and 3.x.
Inspired on jlamim repo
Copy the files to their respective directories, as listed below:
config/mailchimp.php
libraries/Mailchimp.php
libraries/Mailchimp (copy the directory)
After copy files config/mailchimp.php
, get the API KEY in your Mailchimp Panel, and paste in mailchimp config file, set also if debug option is true or false.
$config['mc_apikey'] = "xxxxxxxxxxx";
To load Mailchimp library automatically, add the library name in config/autoload file:
$autoload['libraries'] = array("Mailchimp");
Set also the autoload to the mailchimp config file:
$autoload['config'] = array('mailchimp');
$this->load->config('mailchimp');
$this->load->library('mailchimp');
$list = $this->mailchimp->lists->getList();