钉钉机器人通知(支持加签)。dingtalk robot notification sdk.
composer require jetblink/dingtalk-notify -vvv
$dingTalk = new \JetBlink\DingtalkNotify\DingtalkNotify('your_dingtalk_robot_token');
$dingTalk->sendMessage([
'msgtype' => 'text',
'text' => [
'content' => '这是一条测试消息。',
],
'at' => [
'atMobiles' => [],
'isAtAll' => false,
]
]);
$dingTalk->sendTextMessage('这是一条文本测试消息。');
$dingTalk->sendMarkdownMessage(
'Markdown Test Title',
"### Markdown <font color='#ff0000'>测试消息</font>"
);
$dingTalk->sendLinkMessage(
'Link Test Title',
"这是一条链接测试消息",
'https://github.com/JetBlink',
'https://avatars0.githubusercontent.com/u/40748346'
);
文本消息和Markdown消息都支持**@指定手机号和@所有人**,参数位置见具体方法
每个机器人每分钟最多发送20条。