retailcrm/mg-bot-api-client-php
最新稳定版本:v1.4.22
Composer 安装命令:
composer require retailcrm/mg-bot-api-client-php
包简介
PHP client for MG Bot API
关键字:
README 文档
README
Message Gateway Bot API PHP client
Requirements
- PHP 7.3 and above
- PHP's cURL support
- PHP's JSON support
Install
-
Get composer
-
Run into your project directory:
composer require retailcrm/mg-bot-api-client-php ~1.*
If you have not used composer before, include autoloader into your project.
require 'path/to/vendor/autoload.php';
Usage
Assign dialog
<?php use RetailCrm\Common\Exception; use RetailCrm\Mg\Bot\Client; use RetailCrm\Mg\Bot\Model\Request\DialogAssignRequest; $client = new Client('https://mg.url.demo', 'T9DMPvuNt7FQJMszHUd', true); try { $request = new DialogAssignRequest(); $request->setDialogId(60); $request->setUserId(4); /* @var \RetailCrm\Mg\Bot\Model\Response\AssignResponse $response */ $response = $client->dialogAssign($request); } catch (Exception\LimitException | Exception\InvalidJsonException | Exception\UnauthorizedException $exception) { echo $exception->getMessage(); } echo $response->getPreviousResponsible();
统计信息
- 总下载量: 4.18k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-06-28