2017 © Pedro Peláez
 

lib php-sdk

PHP client for Digitaleo's API

image

digitaleo/php-sdk

PHP client for Digitaleo's API

  • Saturday, August 20, 2016
  • by CaporalDead
  • Repository
  • 3 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

This package is still in development, please do not use it in production

Digitaleo PHP SDK

SensioLabsInsight Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

This library aims to give to developers a nice SDK to work with Digitaleo's APIs., (*2)

How to use it

In your project directory :, (*3)

Run, (*4)

composer require digitaleo/php-sdk, (*5)

And use it like this :, (*6)

<?php

require './vendor/autoload.php';

$credentials = new \Digitaleo\SDK\Api\Credentials(
    'your-client-id',
    'your-client-secret',
    'your-username',
    'your-password'
);
$adapter     = new \Digitaleo\SDK\Api\Authentication\OAuth2Adapter($credentials);
$client      = new \Digitaleo\SDK\Api\Client($adapter);

# How to post a contact
$response = $client->post('https://contacts.messengeo.net/rest/contacts', [
    'contacts' => [
        ['civility' => 'M', 'firstName' => 'Michel', 'lastName' => 'Patrick', 'phone' => '0605040302'],
    ],
]);

# How to retrieve your campaigns
$response = $client->get('https://api.messengeo.net/rest/campaigns');

Roadmap

  • [x] Basic HTTP Client with oAuth
  • [ ] Add tests
  • [ ] Add doc
  • [ ] Find a way to avoid passing the complete URL as a resource
  • [ ] Update HTTP Client to give a nice "Active Record" like interface

The Versions

20/08 2016

dev-master

9999999-dev

PHP client for Digitaleo's API

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Thomas SIEFFERT