livespace/livespace-php
最新稳定版本:1.0.1
Composer 安装命令:
composer require livespace/livespace-php
包简介
Livespace API client
README 文档
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());
}
统计信息
- 总下载量: 22.24k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-04