2017 © Pedro Peláez
 

library addemar

PHP Library to easy talk to the Addemar API

image

pixart/addemar

PHP Library to easy talk to the Addemar API

  • Tuesday, October 13, 2015
  • by pixart
  • Repository
  • 1 Watchers
  • 3 Stars
  • 1,005 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 5 % Grown

The README.md

PHP API Wrapper for Addemar Build Status Build Status

Fully rewritten this old stuff. Is now unittested and contains 3 managers so far., (*1)

ContactManager
SendingManager
ContactGroupsManager

All correspond with the structure of the addemar documentation here: https://ws-email.addemar.com/docs/current/, (*2)

Settings

Settings are needed to connect to the client. In the constructor you can set your Token. Other parameters are pre-defined but can be updated., (*3)

class Settings
{
    private $token;
    private $version = 1.4;
    private $wsdl = 'https://ws-email.addemar.com/soap/wsdl/';
    private $options = array();

    ...
}

Connection

Connection is an extension from the standard SoapClient. You don't need to know much about this component. Just pass your settings and this will give you a working connection., (*4)

Managers

Managers are just grouping names for functions of a specific catergory. Each manager is contains function that you'll be able to find in the documentation from addemar. You can load a manager by calling the Factory., (*5)

Example, (*6)

use Addemar\Factory\ManagerFactory;
use Addemar\Client\Connection;
use Addemar\Configuration\Settings;

$connection = new Connection(new Settings('Your Token'));
ManagerFactory::create($connection, 'Addemar\Manager\ContactGroupsManager');

ContactManager

List of Functions:, (*7)

getStructure()

Get structure from contact, (*8)

return: structure ContactData, (*9)

create($structure)

Create a new contact, (*10)

  • ContactData $contact_data: structure: ContactData

return: integer (contact id), (*11)

getContactId($status, $filter, $search_field_id = 1)

Get list of contact ids, (*12)

  • integer $status: 0=all 1=not unsubscribed 2=unsubscribed
  • string $filter: Text to search on
  • integer $search_field_id: Field id to search on

return: integer array (contact id's), (*13)

getContactData($cid)

Get data from contact specified by the contact id, (*14)

  • integer $cid: Contact id

return: structure ContactData, (*15)

getFieldIdByName($name)

Get list of field ids, (*16)

  • string $parameter: Field parameter to search on

return: array (field id's), (*17)

update($contact_data)

Update contact, (*18)

  • ContactData $contact_data: Structure: ContactData

return: boolean (true=successful, false=unsuccessful), (*19)

delete($cid)

Remove/delete contact specified by the contact id, (*20)

  • integer $cid: Contact id

return: boolean (true=successful, false=unsuccessful), (*21)

subscribeContact($cid, $mgid)

Subscribe contact specified by the contact id, (*22)

  • integer $cid: Contact id
  • integer $mgid: Mailgroup id

return: boolean (true=successful, false=unsuccessful), (*23)

ContactGroupsManager

List of Functions:, (*24)

getMailgroupId($name)

Get list of mailgroup ids, (*25)

  • string $name: Mailgroup name to search on

return: array (mailgroup id's), (*26)

SendingManager

List of Functions:, (*27)

sendTriggeredItem(SendItem $senditem)

Send triggered item (Campaign Item exists), (*28)

object $senditem: instance of Addemar\Model\SendItem, (*29)

return: integer (eid), (*30)

The Versions

13/10 2015

dev-master

9999999-dev https://github.com/pix-art/addemar

PHP Library to easy talk to the Addemar API

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

mailing addemar pix-art