2017 © Pedro Peláez
 

library livespace-php

Livespace API client

image

livespace/livespace-php

Livespace API client

  • Thursday, March 16, 2017
  • by livespace
  • Repository
  • 0 Watchers
  • 0 Stars
  • 532 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 17 % Grown

The README.md

Installation

Requires PHP 5.3., (*1)

The recommended way to install is through Composer:, (*2)

First, install Composer:, (*3)

$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar require livespace/livespace-php

Finally, you can include the files in your PHP script:, (*4)

require "vendor/autoload.php";

Examples

use Livespace\Livespace;

$client = new Livespace(array(
    'api_url' => 'https://****.livespace.io',
    'api_key' => '*****',
    'api_secret' => '*****'
));

$contactData = array(
    'contact' => array(
        'firstname' => 'John',
        'lastname' => 'Smith',
        'company' => array(
            'name' => 'Company'
        )
    )
);

$result = $client->call('Contact/addContact', $contactData);
if ($result->getStatus()) {
    echo 'OK' . "\r\n";
    var_export($result->getResponseData());
} else {
    echo 'ERROR #' . $result->getResult()  . ":\r\n";
    print_r($result->getError());
}

The Versions

16/03 2017

dev-master

9999999-dev

Livespace API client

  Sources   Download

The Requires

  • ext-curl *
  • ext-json *
  • php ^5.3 || ^7.0