livespace/livespace-php

Livespace API client

Installs: 22 240

Dependents: 0

Suggesters: 0

Security: 0

pkg:composer/livespace/livespace-php

1.0.1 2022-03-16 09:56 UTC

This package is auto-updated.

Last update: 2025-11-28 17:54:33 UTC


README

Requires PHP 5.3 or newer.

The recommended way to install is through Composer:

First, install Composer:

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

Finally, you can include the files in your PHP script:

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());
}