2017 © Pedro Peláez
 

library mailchimp-apiv3

Complete PHP Wrapper for MailChimp API v3.0.

image

nblakefriend/mailchimp-apiv3

Complete PHP Wrapper for MailChimp API v3.0.

  • Sunday, November 20, 2016
  • by nblakefriend
  • Repository
  • 1 Watchers
  • 1 Stars
  • 75 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 7 Versions
  • 10 % Grown

The README.md

MailChimp API v3.0 PHP Wrapper

DEPRECATED:

This project is no longer maintained and is honestly not good. MC offers official 3.0 libraries now: mailchimp.com/developer, (*1)

PHP wrapper for the MailChimp API v 3.0., (*2)

Dependencies

  • GuzzleHttp
  • PHP > 5.4

Project still in the works. More documentation to come, (*3)

Installing

Using Composer: composer require nblakefriend/mailchimp-apiv3, (*4)

Getting Started

When downloading from composer (recommended): 1. In vendor/nblakefriend/mailchimp-apiv3/src create config.ini file with structure:, (*5)

[api_keys]
key1[api_keys] = "yourmcapikey-usx"
key1[active] = true

Multiple accounts can be configured in this config file., (*6)

[api_keys]
key1[api_keys] = "yourmcapikey-usx"
key1[active] = true

key2[api_keys] = "yourmcapikey-usx"
key2[active] = false

Whichever key[active] is true will be used., (*7)

config.ini is excluded in the .gitignore file. Make sure this is not changed!, (*8)

  1. Instantiate with $mc = new MailChimp\MailChimp;
  2. print_r($mc->getAccountInfo()); should return the MailChimp API Root call.

If downloading this repo directly: 1. From your command line, navigate to the MailChimp folder and run composer update to download Dependencies. 2. Add the package to your add require_once 'MailChimp/vendor/autoload.php' in your file. 3. Instantiate with $mc = new MailChimp\MailChimp; 4. print_r($mc->getAccountInfo()); should return the MailChimp API Root call., (*9)

Using the Wrapper

Each MailChimp collections (lists, campaigns, e-commerce etc.) is accessed using a method found at the bottom of the MailChimp.php file that instantiates the collection's class., (*10)

For example: Assuming your MailChimp instance is stored in the $mc variable, (*11)

Lists

$mc->lists()->getLists();, (*12)

This would return the response from calling /lists http://developer.mailchimp.com/documentation/mailchimp/reference/lists/#read-get_lists, (*13)

E-commerce

Adding a new store customer:, (*14)

$mc->ecommerce()->customers()->addCustomer("STORE123", "CUST123", "freddie@freddiesjokes.com", true);, (*15)

This would create a new customer to the store with id STORE123 with the customer id CUST123 and the email address freddie@freddiesjokes.com and an opt-in status of true which subscribes the customer to the list., (*16)

Collection Reference * authorizedApps() * automations() * batchOps() * campaignFolders() * campaigns() * conversations() * ecommerce() * - ecommerce()->carts() * - ecommerce()->customers() * - ecommerce()->orders() * - ecommerce()->products() * fileManager() * lists() * reports() * templateFolders() * templates(), (*17)

See complete list of available methods for each class/collection here, (*18)

Docs also able to be run locally from the docs/index.html, (*19)

The Versions

20/11 2016

dev-master

9999999-dev https://github.com/nblakefriend/MailChimp-API3.0-Wrapper.git

Complete PHP Wrapper for MailChimp API v3.0.

  Sources   Download

MIT

The Requires

 

by Nathan Friend

api php mailchimp

20/11 2016

1.0.4

1.0.4.0 https://github.com/nblakefriend/MailChimp-API3.0-Wrapper.git

Complete PHP Wrapper for MailChimp API v3.0.

  Sources   Download

MIT

The Requires

 

by Nathan Friend

api php mailchimp

20/11 2016

1.0.3

1.0.3.0 https://github.com/nblakefriend/MailChimp-API3.0-Wrapper.git

Complete PHP Wrapper for MailChimp API v3.0.

  Sources   Download

MIT

The Requires

 

by Nathan Friend

api php mailchimp

20/11 2016

1.0.2

1.0.2.0 https://github.com/nblakefriend/MailChimp-API3.0-Wrapper.git

Complete PHP Wrapper for MailChimp API v3.0.

  Sources   Download

MIT

The Requires

 

by Nathan Friend

api php mailchimp

19/11 2016

dev-create_documentation

dev-create_documentation https://github.com/nblakefriend/MailChimp-API3.0-Wrapper.git

Complete PHP Wrapper for MailChimp API v3.0.

  Sources   Download

MIT

The Requires

 

by Nathan Friend

api php mailchimp

18/11 2016

1.0.1

1.0.1.0 https://github.com/nblakefriend/MailChimp-API3.0-Wrapper.git

Complete PHP Wrapper for MailChimp API v3.0.

  Sources   Download

MIT

The Requires

 

by Nathan Friend

api php mailchimp

18/11 2016

1.0.0

1.0.0.0 https://github.com/nblakefriend/MailChimp-API3.0-Wrapper.git

Complete PHP Wrapper for MailChimp API v3.0.

  Sources   Download

MIT

The Requires

 

by Nathan Friend

api php mailchimp