2017 © Pedro Peláez
 

library madmimi-api-php

A PHP library for rich, testable integration with MadMimi.

image

aaronsaray/madmimi-api-php

A PHP library for rich, testable integration with MadMimi.

  • Sunday, June 18, 2017
  • by aaronsaray
  • Repository
  • 2 Watchers
  • 5 Stars
  • 1,551 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 5 Versions
  • 24 % Grown

The README.md

madmimi-api-php

An up-to-date PHP library for integrating with the MadMimi API., (*1)

Using your http://madmimi.com account, you can interact with all parts of the API using this library. This library requires PHP 5.4+ and curl to be installed., (*2)

Installation

This library is available on packagist and can be installed using composer., (*3)

$ composer require aaronsaray/madmimi-api-php

Basic Usage

This example sends a transactional email to a promotion named "Meaning of Life" and replaces the {answer} placeholder with the answer to life, the universe and everything. This email goes to Slartibartfast at iluvcoastlines@planetdesigners.com, (*4)

<?php

use MadMimi\Connection;
use MadMimi\CurlRequest;
use MadMimi\Options\Mail\Transactional;

$connection = new Connection('your@email.com', 'your-api-key', new CurlRequest());

$options = new Transactional();
$options->setPromotionName('Meaning of Life')
  ->setPlaceholderValues(['answer'=>'42'])
  ->setTo('iluvcoastlines@planetdesigners.com', 'Slartibartfast');

$transactionId = $connection->request($options);

Documentation

Core

Sending Mail

Statistics / Status

Webforms

Lists

Promotions

Members

Addons

Google Analytics

Child Accounts

Misc

In general, method calls and organization of this API have been normalized using this library. So, please check the MadMimi documentation AND this code documentation before implementing a method. Mostly they will translate the same, but from time to time there have been liberties taken in this library. The responses are not currently translated into known, normalized objects., (*5)

One such example is the transactional mailer status. While this documentation is located under the mailer section, and the end point contains the /mailer path, it has been moved to the stats section. This particular call is not for sending a mail, but instead, receiving the status of the particular email. It seems to fit better with the statistics section., (*6)

Another example is the promotion search API. The search functionality was split up - the search by exact ID is in the single retrieval option - whereas the rest of the search criteria is in the search option. This mirrors the webforms paradigm., (*7)

About

Requirements

  • PHP 5.4+
  • Curl
  • MadMimi mailer API access

Bugs and Feature Requests

Bugs and feature request are tracked on GitHub, (*8)

Author

Aaron Saray - http://aaronsaray.com, (*9)

License

This library is licensed under the MIT License - see the LICENSE file for details, (*10)

Acknowledgements

We're using MadMimi in our work at https://www.smallshopsunited.com - stop by and check it out. Also, special thanks to the team at MadMimi who gave me access to the API for testing this library., (*11)

The Versions

18/06 2017

dev-master

9999999-dev https://github.com/aaronsaray/madmimi-api-php

A PHP library for rich, testable integration with MadMimi.

  Sources   Download

MIT

The Requires

 

The Development Requires

api madmimi

18/06 2017

1.0.3

1.0.3.0 https://github.com/aaronsaray/madmimi-api-php

A PHP library for rich, testable integration with MadMimi.

  Sources   Download

MIT

The Requires

 

The Development Requires

api madmimi

22/01 2016

1.0.2

1.0.2.0 https://github.com/aaronsaray/madmimi-api-php

A PHP library for rich, testable integration with MadMimi.

  Sources   Download

MIT

The Requires

 

The Development Requires

api madmimi

22/01 2016

1.0.1

1.0.1.0 https://github.com/aaronsaray/madmimi-api-php

A PHP library for rich, testable integration with MadMimi.

  Sources   Download

MIT

The Requires

 

The Development Requires

api madmimi

18/12 2015

1.0.0

1.0.0.0 https://github.com/aaronsaray/madmimi-api-php

A PHP library for rich, testable integration with MadMimi.

  Sources   Download

MIT

The Requires

 

The Development Requires

api madmimi