2017 © Pedro Peláez
 

library mailchimp-api

Doowebdev PHP MailChimp API v2 Wrapper using Guzzle

image

doowebdev/mailchimp-api

Doowebdev PHP MailChimp API v2 Wrapper using Guzzle

  • Friday, February 27, 2015
  • by webberdoo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Mailchimp API

An Easy to use PHP wrapper for the MailChimp API v2 using Guzzle, (*1)

Installation:

Requires: php 5.4+ and Guzzle (will be added automatically when you install this package)., (*2)

To install the latest version of doowebdev/mailchimp-api simply add it to your composer.json file in the 'require section':, (*3)

"doowebdev/mailchimp-api": "dev-master"

Next Run 'composer install' in your command console to add the package to your projects vendor folder., (*4)

Once the package is installed, you need to initialize the MailChimpApi class:, (*5)

require 'vendor/autoload.php';

use Doowebdev\MailChimpApi;

How to use

Assuming you are using php classes in your application use the following as an example:, (*6)

In a controller:, (*7)

use Doowebdev\MailChimpApi;

class SomeClass
{

    public function someMethod()
    {
        $mc = new MailChimpApi('YOUR-MAILCHIMP-APIKEY-GOES-HERE');

       //We are using the 'lists/subscribe' method to subscribe a user/visitor to our newsletter list.
        $results = $mc->run('lists/subscribe',[
            'id'                => 'YOUR-LIST-ID-GOES-HERE',
            'email'             => ['email'=>'subscribers@email.com'],
            'merge_vars'        => ['FNAME'=>'subscribers_firstname', 'LNAME'=>'subscribers_lastname'],
            'double_optin'      => true,
            'update_existing'   => true,
            'replace_interests' => false,
            'send_welcome'      => true,
        ]);

        var_dump($results);
    }

}

Thats it!, (*8)

To get the complete list of methods you can use visit the official MailChimp API documentation here: https://apidocs.mailchimp.com/api/2.0/#method-sections, (*9)

The Versions

27/02 2015

dev-master

9999999-dev https://github.com/doowebdev/doowebdev

Doowebdev PHP MailChimp API v2 Wrapper using Guzzle

  Sources   Download

MIT

The Requires

 

mailchimp guzzle php api mailchimp api v2 api v2

26/02 2015

1.4

1.4.0.0 https://github.com/doowebdev/doowebdev

Doowebdev PHP MailChimp API v2 Wrapper using Guzzle

  Sources   Download

MIT

The Requires

 

mailchimp guzzle php api mailchimp api v2 api v2

26/02 2015

1.3

1.3.0.0 https://github.com/doowebdev/doowebdev

Doowebdev PHP MailChimp API v2 Wrapper using Guzzle

  Sources   Download

MIT

The Requires

 

mailchimp guzzle php api mailchimp api v2 api v2

26/02 2015

1.2

1.2.0.0 https://github.com/doowebdev/doowebdev

Doowebdev PHP MailChimp API v2 Wrapper using Guzzle

  Sources   Download

MIT

The Requires

 

mailchimp guzzle php api mailchimp api v2 api v2

26/02 2015

1.1

1.1.0.0 https://github.com/doowebdev/doowebdev

Doowebdev PHP MailChimp API v2 Wrapper using Guzzle

  Sources   Download

MIT

The Requires

 

26/02 2015

1.0

1.0.0.0 https://github.com/doowebdev/doowebdev

Doowebdev PHP MailChimp API v2 Wrapper using Guzzle.

  Sources   Download

MIT

The Requires