2017 © Pedro Peláez
 

library mailchimp-api

Simplest MailChimp API v3 wrapper

image

adterminal/mailchimp-api

Simplest MailChimp API v3 wrapper

  • Wednesday, December 30, 2015
  • by adterminal
  • Repository
  • 3 Watchers
  • 0 Stars
  • 199 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 22 % Grown

The README.md

MailChimp API

Simplest MailChimp API v3 wrapper, in PHP., (*1)

This lets you get from the MailChimp API docs to the code as directly as possible., (*2)

Requires PHP 5.3 and a pulse. Abstraction is for chimps., (*3)

Installation

You can install mailchimp-api v3 dev branch using Composer:, (*4)

composer require adterminal/mailchimp-api:dev-master

You will then need to: * run composer install to get these dependencies added to your vendor directory * add the autoloader to your application with this line: require("vendor/autoload.php"), (*5)

Alternatively you can just download the MailChimp.php file and include it manually:, (*6)

include('./Mailchimp.php');

Examples

List all the mailing lists (lists method), (*7)

use \Adterminal\MailChimp\MailChimp;

$MailChimp = new MailChimp('abc123abc123abc123abc123abc123-us1');
print_r($MailChimp->get('lists'));

Subscribe someone to a list and an interest group, (*8)

use \Adterminal\MailChimp\MailChimp;

$MailChimp = new MailChimp('abc123abc123abc123abc123abc123-us1');
$result = $MailChimp->post('lists/b1234346/members', array(
                'email_address'     => 'davy@example.com',
                'status'            => 'subscribed',
                'merge_fields'      => array('FNAME'=>'Davy', 'LNAME'=>'Jones'),
                'interests'         => array( '2s3a384h' => true )
            ));
print_r($result);

The Versions

30/12 2015

dev-master

9999999-dev https://github.com/adterminal/mailchimp-api

Simplest MailChimp API v3 wrapper

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires