2017 © Pedro Peláez
 

library x-dingtalk

钉钉机器人

image

limingxinleo/x-dingtalk

钉钉机器人

  • Friday, March 30, 2018
  • by limingxinleo
  • Repository
  • 1 Watchers
  • 3 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 7 % Grown

The README.md

钉钉组件

自定义机器人

  1. 初始化
<?php 
use Fan\DingTalk\Application;

$config = [
    // HTTP 请求的超时时间(秒)
    'timeout' => 5.0,
    // 机器人模块
    'robot' => [
        'gateways' => [
            'test' => [
                'url' => $url,
            ],
            'test2' => [
                'url' => $url,
            ],
        ],
    ],
];

$ding = new Application($config);
  1. 发送消息
<?php

/** @var \Psr\Http\Message\ResponseInterface[] $res */
$res = $ding->robot->sendText('测试sendText方法', [], ['test']);

/** @var \Psr\Http\Message\ResponseInterface[] $res */
$res = $this->ding->robot->sendMarkdown(
    '杭州天气',
    "#### 杭州天气 @156xxxx8827\n" .
    "> 9度,西北风1级,空气良89,相对温度73%\n\n" .
    "> ![screenshot](https://avatars0.githubusercontent.com/u/16648551?s=460&v=4)\n" .
    "> ###### 10点20分发布 [天气](http://www.thinkpage.cn/) \n",
    [],
    ['test']
);

The Versions

30/03 2018

dev-master

9999999-dev

钉钉机器人

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar limingxinleo

php snowflake

30/03 2018

1.0.0

1.0.0.0

钉钉机器人

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar limingxinleo

php snowflake

28/11 2017

0.0.2

0.0.2.0

钉钉机器人

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar limingxinleo

php snowflake