2017 © Pedro Peláez
 

library whitemail-api

This package provides a wrapper for Whitemail Api

image

reneeshkuttan/whitemail-api

This package provides a wrapper for Whitemail Api

  • Monday, November 28, 2016
  • by reneesh
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

WHITEMAIL API (PHP 5 Package)

WhitemailApi is a PHP wrapper to whitemail api., (*1)

Contents

Installation

1) In order to install WhitemailApi, just add the following to your composer.json. Then run composer update:, (*2)

"reneeshkuttan/whitemail-api": "1.0.x-dev"

Usage

Requirements

Before you start, acquire your API End Point url and API Key from whitemail's company settings page., (*3)

Initializtion

Let's start by creating a new instance of WhitemailApi:, (*4)

$api = new WhitemailApi($apiEndPoint, $apiKey);

Identify

Now we can send a call through the API to identify a subscriber, (*5)

$subscriberData = [
    'email'  => "johns@example.com",
            'fields' => [
                'first_name' => 'John',
                'last_name' => 'Sam'
             ]
];

$api->identify($subscriberData);

On succesful request, the identify function would return an associative array with the details of the subscriber:, (*6)

Array ( [success] => 1 [message] => Subscriber succesfully created/updated [subscriber] => Array ( [id] => 31 [uris] => Array ( [show] => http://client1.whitemail5.dev/subscriber/31 ) ) ) 

Track

Use the track() function to track subscriber events:, (*7)

$trackData = [
            'email' => 'johns@example.com',
            'eventName' => 'purchased',
            'data' => ['amt' => '40.50'],
        ];

$api->track($trackData);

On success this would return an associative array with status information, (*8)

Array ( [success] => 1 [message] => Subscriber event added ) 

License

WhitemailApi is free software distributed under the terms of the MIT license., (*9)

The Versions

28/11 2016

dev-master

9999999-dev

This package provides a wrapper for Whitemail Api

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Reneesh Tk

api php whitemail

28/11 2016

1.0.0

1.0.0.0

This package provides a wrapper for Whitemail Api

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Reneesh Tk

api php whitemail