2017 © Pedro Peláez
 

symfony-bundle ymlp-bundle

Integrates YMLP API for Symfony

image

tilleuls/ymlp-bundle

Integrates YMLP API for Symfony

  • Tuesday, March 14, 2017
  • by dunglas
  • Repository
  • 12 Watchers
  • 3 Stars
  • 1,821 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

CoopTilleulsYmlpBundle, YMLP API for Symfony

This bundle integrates the Your Mailing List Provider (YMLP) API into Symfony projects., (*1)

Latest Stable Version Build Status SensioLabsInsight, (*2)

Installation

Use Composer to install this bundle:, (*3)

composer require tilleuls/ymlp-bundle

Add the bundle in your application kernel:, (*4)

// app/AppKernel.php

public function registerBundles()
{
    return [
        // ...
        new CoopTilleuls\Bundle\YmlpBundle\CoopTilleulsYmlpBundle(),
        // ...
    ];
}

Configuration

# app/config/config.yml

coop_tilleuls_ymlp:
    # YMLP URL for API calls (default to https://www.ymlp.com/api/)
    api_url: https://www.ymlp.com/api/
    # Your YMLP API key (no default)
    api_key: YOURSECRETAPIKEY1234
    # Your YMLP username (no default)
    api_username: tilleuls

Usage

use CoopTilleuls\Bundle\YmlpBundle\Ymlp\Exception\YmlpException;

// Get an instance of the YMLP API client as a service
$ymlpClient = $this->get('coop_tilleuls_ymlp.client');

// Call the simple Ping() command of the YMLP API
$pingResponse = $ymlpClient->call('Ping');

// Add a new contact to one or more groups with exception handling
try {
    $contactsAddResponse = $ymlpClient->call('Contacts.Add', ['Email' => 'baptiste@les-tilleuls.coop', 'GroupID' => 1]);
} catch (YmlpException $e) {
    //...
}

The call() method returns an array containing the response or throws an exception of type \CoopTilleuls\Bundle\YmlpBundle\Ymlp\Exception\YmlpException., (*5)

You can obtain a list of all the commands of the API, their parameters and their responses on the YMLP API page (require YMLP credentials)., (*6)

Credits

This bundle has been written by Baptiste Meyer for Les-Tilleuls.coop., (*7)

The Versions

14/03 2017

dev-master

9999999-dev http://les-tilleuls.coop

Integrates YMLP API for Symfony

  Sources   Download

MIT

The Requires

 

The Development Requires

api newsletter guzzle customer ymlp

13/03 2017

v1.1.1

1.1.1.0 http://les-tilleuls.coop

Integrates YMLP API for Symfony

  Sources   Download

MIT

The Requires

 

The Development Requires

api newsletter guzzle customer ymlp

23/09 2014

v1.1.0

1.1.0.0 http://les-tilleuls.coop

Integrates YMLP API for Symfony2

  Sources   Download

MIT

The Requires

 

The Development Requires

api newsletter guzzle customer ymlp

28/07 2014

v1.0.0

1.0.0.0 http://les-tilleuls.coop

Integrates YMLP API for Symfony2

  Sources   Download

MIT

The Requires

 

The Development Requires

api newsletter guzzle customer ymlp