Download the PHP package zfr/zfr-mailchimp without Composer

On this page you can find all versions of the php package zfr/zfr-mailchimp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package zfr-mailchimp

ZfrMailChimp, a MailChimp PHP Library

Latest Stable Version

IMPORTANT: MailChimp has announced the removal of old API (including v1 and v2) in their blog post. Because this library is based on v2, it will stop working at the end of the year. I don't have the time to update this library to the v3 as today, but if anyone would like to tackle it... do not hesitate!

Note : this library does not contain tests, mainly because I'm not sure about how to write tests for an API wrapper. Don't hesitate to help on this ;-).

Introduction

This is an unofficial MailChimp PHP client for interacting with the v2 REST MailChimp API. If you are looking for a wrapper around previous MailChimp API versions (like 1.3), please refer to something else.

What is done

The following methods are supported by the client (not everything has been carefully tested though):

Dependencies

Integration with frameworks

To make this library even more easier to use, here are various frameworks integrations:

Want to do an integration for another framework? Open an issue, and I'll open a repository for you!

Installation

We recommend you to use Composer to install ZfrMailChimp:

Tutorial

Firstly, you need to instantiate the MailChimp client:

The correct endpoint will be automatically chosen based on your API key.

You can then have access to all the methods available (see the list below):

How to use it ?

You will notice that the method names below does not always have a 1-to-1 mapping with the API names. For instance, most methods that imply retrieving something are prefixed by "get".

However, there is an exact mapping for parameters. Therefore, you just need to refer to the official documentation for a given method (links are given below). Here is an example with the subscribe method:

Exceptions handling

ZfrMailChimp tries its best to extract meaningful exceptions from MailChimp errors. All exceptions implement the ZfrMailChimp\Exception\ExceptionInterface interface, so you can use this to do a catch all block. You can find an exhaustive list of all exceptions in the ZfrMailChimp\Exception folder.

List exceptions are under the Ls namespace, because list is a reserved keyword in PHP.

Usage example:

Complete reference

Here are the supported methods today:

CAMPAIGN RELATED METHODS:

LIST RELATED METHODS:

ECOMM RELATED METHODS:

FOLDER RELATED METHODS:

TEMPLATE RELATED METHODS:

REPORT RELATED METHODS:

USERS RELATED METHODS:

VIP RELATED METHODS:

GALLERY RELATED METHODS:

HELPER RELATED METHODS:

Advanced usage

Attaching Guzzle plugins

UPDATE: Async plugin Guzzle 3 has been known to be very strange, and often not work as expected. Actually, it has even been removed in Guzzle 5. I'd suggest you to trying manually the Async plugin, but I recommend you NOT to use it.

Because ZfrMailChimp is built on top of Guzzle, you can take advantage of all the nice features of it. For instance, let's say you want to send requests asynchronously, you can simply attach the built-in Async plugin:


All versions of zfr-mailchimp with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
guzzle/guzzle Version ~3.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zfr/zfr-mailchimp contains the following files

Loading the files please wait ....