mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-28 21:40:50 +00:00
36 lines
838 B
PHP
36 lines
838 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace driver\bot\DingTalk;
|
|
|
|
use crmeb\services\bot\BaseBot;
|
|
|
|
class Driver extends BaseBot
|
|
{
|
|
public function sendText(string $content, array $options = []): bool
|
|
{
|
|
return $this->request([
|
|
'msgtype' => 'text',
|
|
'text' => ['content' => $content],
|
|
]);
|
|
}
|
|
|
|
public function sendMarkdown(string $title, string $content, array $options = []): bool
|
|
{
|
|
return $this->request([
|
|
'msgtype' => 'markdown',
|
|
'markdown' => [
|
|
'title' => $title,
|
|
'text' => $content,
|
|
],
|
|
]);
|
|
}
|
|
|
|
public function sendCard(array $card, array $options = []): bool
|
|
{
|
|
return $this->request([
|
|
'msgtype' => 'actionCard',
|
|
'actionCard' => $card,
|
|
]);
|
|
}
|
|
} |