Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.
/ selligent Public archive

📤 A simple PHP library to help you interact with both Selligent Individual and Broadcast API.

License

Notifications You must be signed in to change notification settings

mediapart/selligent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selligent Soap API Client

Build Status Code Coverage Scrutinizer Quality Score Total Downloads Latest Stable Version

A simple PHP library to help you interact with both Selligent Individual and Broadcast API.

Usage

<?php # example.php

require './vendor/autoload.php';

use Mediapart\Selligent\Connection;
use Mediapart\Selligent\Transport;
use Mediapart\Selligent\Properties;


/* connect you to your Selligent API server */
$connection = new Connection();
$client = $connection->open([
    'login' => '*****',
    'password' => '*****',
    'wsdl' => 'http://emsecure/individual?wsdl', 
]);

/*
    Example : Trigger the TESTGATE campaign to an user.
    We will register the user first an then, we will trigger
    the campaign with a custom message :
 */
try {

    $transport = new Transport($client);

    $user = new Properties();
    $user['NAME'] = 'Foo Bar';
    $user['MAIL'] = '[email protected]';

    $userId = $transport
        ->setList($config['list'])
        ->subscribe($user)
    ;

    $inputData = new Properties();
    $inputData['MESSAGE'] = 'Lorem ipsum dolor sit amet conceptuem.';

    $result = $transport
        ->setCampaign($config['campaign'])
        ->triggerCampaign($userId, $inputData)
    ;

} catch (\Exception $e) {
    echo 'something bad happens.';
}

You could broadcast campaign based on complete HTML from the API.

Installation

Simply install this package with Composer.

composer require mediapart/selligent

Tests

Executing tests out of the box :

./vendor/bin/phpunit

Without setting some environment variables, some tests will be skipped. Tests in real testsuite for example.

Read More

About

📤 A simple PHP library to help you interact with both Selligent Individual and Broadcast API.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages