2017 © Pedro Peláez
 

library adestra

Laravel wrapper for the Adestra API

image

jzpeepz/adestra

Laravel wrapper for the Adestra API

  • Friday, August 18, 2017
  • by jzpeepz
  • Repository
  • 1 Watchers
  • 1 Stars
  • 140 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 8 % Grown

The README.md

Installation

Install via Composer:, (*1)

composer require jzpeepz/adestra, (*2)

Include the service provider in your config/app.php:, (*3)

Jzpeepz\Adestra\AdestraServiceProvider::class, (*4)

Publish the Adestra config file:, (*5)

php artisan vendor:publish --tag=adestra, (*6)

Configuration

Below are descriptions of the configuration values found in the the adestra.php config file., (*7)

account This is the account name found on the login screen., (*8)

username This is your username., (*9)

password This is your password., (*10)

core_table_id This is the id of the core table where your contacts are stored., (*11)

list_id Optional. This is just a nice place to store your main list id., (*12)

Contacts

Subscribe a contact to a list

$list_id = 15;
$contact = AdestraContact::make(['email' => 'me@emailplace.com']);
$result = $contact->subscribe($list_id);

Unsubscribe a contact from a list

$list_id = 15;
$contact = AdestraContact::make(['email' => 'me@emailplace.com']);
$result = $contact->unsubscribe($list_id);

Get a contact's list ids

Returns an array of ids of the lists a contact is on., (*13)

$lists = AdestraContact::make(['email' => 'me@emailplace.com'])
            ->lists();

Campaigns

Create a new campaign

$campaign = AdestraCampaign::make([
                'name' => 'My Campaign',
                'description' => 'My New Campaign',
                'project_id' => 31,
                'list_id' => $list_id,
            ])
            ->create();

Find an existing campaign

$campaign = AdestraCampaign::find($campaign_id);

Update an existing campaign

$campaign = $campaign->update([
                'name' => 'My Campaign',
                'description' => 'My New Campaign',
                'project_id' => 31,
                'list_id' => $list_id,
            ]);

Set campaign options

$campaign->setAllOptions([
                'subject_line' => 'My Subject',
                'domain' => 'email.mydomain.com',
                'from_prefix' => 'mail',
                'from_name' => 'My Company',
                'auto_tracking' => 1,
                'user_from' => 1,
                'from_address' => 'me@emailplace.com',
            ]);

Set campaign HTML and text

HTML: $campaign->setMessage('html', $html);, (*14)

Text: $campaign->setMessage('text', $text);, (*15)

Publish a campaign

$campaign->publish();

Send a test of a campaign

$campaign->sendTest('me@emailplace.com');

This also allows for a comma separated list:, (*16)

$campaign->sendTest('me@emailplace.com,you@emailplace.com');

Launch a campaign

$campaign->launch([
                'launch_label' => 'My Launch',
                'date_scheduled' => date('c'),
            ]);

The Versions

18/08 2017

dev-master

9999999-dev

Laravel wrapper for the Adestra API

  Sources   Download

MIT

The Requires

 

18/08 2017

1.2.7

1.2.7.0

Laravel wrapper for the Adestra API

  Sources   Download

MIT

The Requires

 

10/05 2017

1.2.6

1.2.6.0

Laravel wrapper for the Adestra API

  Sources   Download

MIT

The Requires

 

10/02 2017

1.2.5

1.2.5.0

Laravel wrapper for the Adestra API

  Sources   Download

MIT

The Requires

 

30/11 2016

1.2.4

1.2.4.0

Laravel wrapper for the Adestra API

  Sources   Download

MIT

The Requires

 

30/11 2016

1.2.3

1.2.3.0

Laravel wrapper for the Adestra API

  Sources   Download

MIT

The Requires

 

28/11 2016

1.2.2

1.2.2.0

Laravel wrapper for the Adestra API

  Sources   Download

MIT

The Requires

 

28/11 2016

1.2

1.2.0.0

Laravel wrapper for the Adestra API

  Sources   Download

MIT

The Requires

 

28/11 2016

1.1

1.1.0.0

PHP wrapper for the Adestra API

  Sources   Download

MIT

The Requires

 

28/11 2016

1.0

1.0.0.0

PHP wrapper for the Adestra API

  Sources   Download

The Requires