assert6 / dingding-robot
There is no license information available for the latest version (1.0.4) of this package.
钉钉机器人
1.0.4
2020-07-20 02:47 UTC
Requires
- php: >=7.2
- ext-json: *
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.9
- mockery/mockery: ^1.2
- phpunit/phpunit: ^7.0.0
This package is not auto-updated.
Last update: 2025-03-25 23:38:18 UTC
README
安装组件
composer require zcmzc/dingding-robot
新建Robot 类
<?php namespace DingRobotTest\Robot; class TestRobot extends \DingRobot\AbstractRobot { public function getWebhook(): string { return 'https://oapi.dingtalk.com/robot/send?access_token='; } public function getName(): string { return '自定义'; } }
发送信息
<?php use DingRobotTest\Robot\TestRobot; use GuzzleHttp\Client; use DingRobot\Message\TextMessage; (new TestRobot(new Client()))->send(new TextMessage('这是测试消息'));