2017 © Pedro Peláez
 

library ding-robot

A php library for ding ding group robot. 钉钉群机器人库

image

ro4/ding-robot

A php library for ding ding group robot. 钉钉群机器人库

  • Friday, June 15, 2018
  • by ro4
  • Repository
  • 2 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

dingRobot

钉钉机器人 PHP 库
Build Status Scrutinizer Code Quality Code Coverage Build Status Code Intelligence Status, (*1)

使用前先阅读钉钉官方文档, (*2)

使用方法

  1. composer require ro4/ding-robot 引入。, (*3)

  2. demo, (*4)

<?php

require_once "./vendor/autoload.php";

d_web_hook('https://oapi.dingtalk.com/robot/send?access_token=YOURTOKEN');
$picUrl = "http://ww3.sinaimg.cn/mw600/0073tLPGgy1fsbnnn4ldvj30dw0k1n09.jpg";
$md     = new \DavidBadura\MarkdownBuilder\MarkdownBuilder();
$md->p($md->inlineImg($picUrl, '福利'));

// 测试文字消息
d_text('测试文字消息')->send();
//
// 测试 @所有人
d_text('测试 at 所有人')->atAll()->send();
//
// 测试 ActionCard
d_action_card('测试整体跳转Action Card', $md->getMarkdown(), '查看高清大图', $picUrl)->send();

// 测试 ActionCard Buttons
$acb = d_action_card_btn('测试带按钮的Action Card', $md->getMarkdown(),
    [d_make_btn('图1', $picUrl), d_make_btn('图2', $picUrl)]);

$acb->send();

$acb->showAvatar()->btnOrientationVertical()->title('按钮横向排列')->send();

$acb->hideAvatar()->title('隐藏头像')->send();

d_feed_card([d_make_link('测试 feed card', $picUrl, $picUrl), d_make_link('link2', $picUrl, $picUrl)])->send();

d_link('测试 link', $md->getMarkdown(), $picUrl, $picUrl)->send();

d_markdown('测试 markdown', $md->getMarkdown())->send();

The Versions

15/06 2018

dev-master

9999999-dev

A php library for ding ding group robot. 钉钉群机器人库

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fan

15/06 2018

dev-develop

dev-develop

A php library for ding ding group robot. 钉钉群机器人库

  Sources   Download

MIT

The Requires

 

The Development Requires

by Fan