gufy / livechat-api
简化版的PHP Livechatinc API
v1.0.0
2015-04-22 01:57 UTC
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: ~5
Requires (Dev)
- phpunit/phpunit: ~4
This package is auto-updated.
Last update: 2024-09-13 19:16:29 UTC
README
PHP库,带有可用的LiveChat API实现。
安装
通过运行以下命令将此包添加到您的 composer.json
composer require gufy/livechat-api
或手动将此包添加到您的 composer.json
{ "require":{ "gufy/livechat-api":"~1" } }
可用模型
以下模型可用并可使用
- 客服代表
- cannedResponse
- 聊天
- 目标
- 问候语
- 组
- 报告
- 状态
- 标签
- 票务
- 访客
- Webhook
用法
尝试以下代码
<?php include 'vendor/autoload.php' use Gufy\LivechatApi\LivechatApi; use Gufy\LivechatApi\Models\Agent; $api = new LivechatApi('your-user-name', 'your-api-key'); // retrieving all agents $agents = $api->agent->get(); print_r($agents); // or the other way, and of course you have to declare LivechatApi configuration first before using class below $class = new Agent; $agents = $class->get(); // it will have the same result as the code above print_r($agents);