for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the mingyoung/dingtalk.
*
* (c) 张铭阳 <[email protected]>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace EasyDingTalk\Chat;
use EasyDingTalk\Kernel\BaseClient;
class Client extends BaseClient
{
/**
* 发送群消息
* @param string $chatId
* @param string $message
* @return mixed
public function send($chatId, $message)
return $this->client->postJson('chat/send', [
'chatid' => $chatId, 'msg' => $message,
]);
}
* 查询群消息已读人员列表
* @param string $messageId
* @param int $cursor
* @param int $size
public function result($messageId, $cursor, $size)
return $this->client->get('chat/getReadList', [
'messageId' => $messageId, 'cursor' => $cursor, 'size' => $size,
* 创建会话
* @param array $params
public function create($params)
return $this->client->postJson('chat/create', $params);
* 修改会话
public function update($chatId, $params)
return $this->client->postJson('chat/update', ['chatid' => $chatId] + $params);
* 获取会话
public function get($chatId)
return $this->client->get('chat/get', ['chatid' => $chatId]);