frankandoak/smooch-api

Smooch API客户端

v0.1.0 2016-04-29 20:21 UTC

This package is not auto-updated.

Last update: 2024-09-20 21:07:01 UTC


README

Build Status

Smooch API客户端

一个库,用于处理符合当前规范的Smooch REST API方法

安装

使用Composer管理依赖并下载Smooch API客户端

composer require frankandoak/smooch-api

用法

       $message = new Smooch\Model\Message([
           'text' => 'MESSAGE_CONTENT',
           'role' => 'appMaker'
       ]);

       $smoochClient = new Smooch\Client();
       $smoochClient->setCredentials('SECRET', 'KEY_ID');

       $smoochClient
           ->getAppUser('USER_ID_OR_SMOOCH_ID')
           ->conversation
           ->add($message);