wujie/rong-client

融云接口

0.32 2021-05-28 10:19 UTC

This package is auto-updated.

Last update: 2024-11-28 18:02:05 UTC


README

配置文件

<?php
$config =  new Config($appKey,$appSecret);

//设置自定义的Client
$model->setClientClass(function(array $config) {
        return new Client($config);
    });

聊天室内容

文件地址Lib/Chatroom

<?php
$roomId = "1234qwe";
$roomName = "测试";


$roomModel = new Chatroom($config);
$data = $roomModel->create($roomId, $roomName);

聊天室回调消息结构体

lib/Obj/ChatroomObj.php

私人消息

文件地址Lib/Message

<?php
$person = new Person($config);
$message = new TxtMsg();
$message->setContent('我是测试');
$sendUser = UserObject::make(123, '测试', '');
$data = $person->send(123, 456, $message, $sendUser);