2017 © Pedro Peláez
 

library mailchimp-rest-api

Very Easy to use MailChimp REST Enabled API 3.0 Wrapper Class.

image

vatps/mailchimp-rest-api

Very Easy to use MailChimp REST Enabled API 3.0 Wrapper Class.

  • Thursday, June 30, 2016
  • by vatps
  • Repository
  • 8 Watchers
  • 25 Stars
  • 9,959 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 2 Versions
  • 12 % Grown

The README.md

MailChimp API 3.0 Wrapper

Very Easy to use MailChimp REST Enabled API 3.0 Wrapper Class in PHP., (*1)

Requires PHP 5.3 and curl extension., (*2)

Installation

You can install the mailchimp-rest-api using Composer. Just add the following to your composer.json:, (*3)

{
    "require": {
        "vatps/mailchimp-rest-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"), (*4)

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

Laravel Installation

Run composer require vatps/mailchimp-rest-api in terminal., (*6)

Laravel Example

<?php
use \VPS\MailChimp;

$mc = new MailChimp();
$mc->setApiKey('yourapikeyhere-us1');

$result = $mc->get('/lists/');
return $result;

You can find all available Resources at http://kb.mailchimp.com/api/resources, (*7)

Examples

Create New Instance and set mailchimp API Key., (*8)

<?php
$mc = new \VPS\MailChimp('yourapikeyhere-us1');

Lists Collection (GET /lists/), (*9)

<?php
$result = $mc->get('/lists/');
print_r($result);

Lists Instance (GET /lists/{list_id}), (*10)

<?php
$result = $mc->get('/lists/{list_id}');
print_r($result);

REMOVE LIST (DELETE /lists/{list_id}), (*11)

<?php
$mc->delete('/lists/{list_id}');

Subscribe to a list (POST /lists/{list_id}/members), (*12)

<?php
$result = $mc->post('/lists/{list_id}/members', array(
                'email_address' => 'test@vps.com',
                'merge_fields' => array('FNAME'=>'VAT', 'LNAME'=>'PS'),
                'status' => 'subscribed'
            ));
print_r($result);

Contact me if you need any help., (*13)

The Versions

30/06 2016

dev-master

9999999-dev https://github.com/vatps/mailchimp-rest-api

Very Easy to use MailChimp REST Enabled API 3.0 Wrapper Class.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

api php mailchimp class

08/04 2016

v1.0

1.0.0.0 https://github.com/vatps/mailchimp-rest-api

Very Easy to use MailChimp REST Enabled API 3.0 Wrapper Class.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

api php mailchimp class