aglipanci / laravel-interspire by aglipanci

Interspire API Intergration Made Easy
207
2
4
Package Data
Maintainer Username: aglipanci
Maintainer Contact: agli.panci@gmail.com (Agli Panci)
Package Create Date: 2014-09-08
Package Last Update: 2014-10-23
Language: PHP
License: GPL-3.0+
Last Refreshed: 2024-05-04 15:08:26
Package Statistics
Total Downloads: 207
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 2
Total Watchers: 4
Total Forks: 4
Total Open Issues: 0

laravel-interspire

SensioLabsInsight

Interspire API Intergration Made Easy

Installation

Add laravel-interspire to your composer.json file:

"require": {
  "aglipanci/interspire": "dev-master"
}

Use composer to install this package.

$ composer update

Registering the Package

Register the service provider within the providers array found in app/config/app.php:

'providers' => array(
	// ...
	
	'Aglipanci\Interspire\InterspireServiceProvider',
)

Add an alias within the aliases array found in app/config/app.php:

'aliases' => array(
	// ...
	
	'Interspire'     => 'Aglipanci\Interspire\Facades\Interspire',
)

Configuration

Create configuration file for package using artisan command

$ php artisan config:publish aglipanci/interspire

And edit the config file with your Interspire API URL, Username and Token.

Usage

Basic usage

To add a new Subscriber to a list you should add name, surname, email and the list id (which you get from interspire);

Interspire::addSubscriberToList('John', 'Smith', 'jsmith@gmail.com', 1);

To delete an existing Subscriber you need only the email address:

Interspire::deleteSubscriber('jsmith@gmail.com');

To check if a subscriber is already on a specific list:

Interspire::isOnList('jsmith@gmail.com', 2)