xutl/yii2-dingtalk

The dingtalk extension for the Yii framework

Installs: 4 606

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 3

Open Issues: 0

Type:yii2-extension

1.0.1 2017-09-14 02:27 UTC

This package is auto-updated.

Last update: 2024-11-11 02:44:38 UTC


README

Latest Stable Version Total Downloads Dependency Status License

Installation

Next steps will guide you through the process of installing using composer. Installation is a quick and easy three-step process.

Step 1: Install component via composer

Either run

composer require --prefer-dist xutl/yii2-dingtalk

or add

"xutl/yii2-dingtalk": "~1.0.0"

to the require section of your composer.json.

Step 2: Configuring your application

Add following lines to your main configuration file:

    'components' => [
        'log' => [
            'targets' => [
                [
                    'class' => 'xutl\dingtalk\DingTalkTarget',
                    'dingTalk' => 'dingTalk',
                    'levels' => ['error', 'warning'],
                ],
            ],
        ],
        'dingTalk' => [
            'class' => 'xutl\dingtalk\DingTalk',
            'accessToken' => '1234567890',
        ],
    ],

Step 3: Start using

Yii::$app->dingTalk->sendText('我其实是一个机器人');
Yii::$app->dingTalk->sendLink('我其实是一个机器人','我其实是一个机器人我其实是一个机器人我其实是一个机器人我其实是一个机器人!','','https://www.dingtalk.com/');
Yii::$app->dingTalk->sendMarkdown('我其实是一个机器人','我其实是一个机器人');
Yii::$app->dingTalk->sendActionCard......

Read https://open-doc.dingtalk.com/docs/doc.htm?spm=a219a.7629140.0.0.p2lr6t&treeId=257&articleId=105733&docType=1 to continue

License

This is released under the MIT License. See the bundled LICENSE.md for details.