wujie / rong-client
融云接口
Installs: 1 512
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- ext-json: *
- guzzlehttp/guzzle: >=6.3
- nesbot/carbon: ^2.30
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpunit/phpunit: ^8.5
- vlucas/phpdotenv: ^4.1
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);