1.0.4 • Published 11 months ago

@wx-sab/ding-talk-sdk v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

钉钉机器人消息发送

Install

npm install @wx-sab/ding-bot-sdk

Features

  • 仅支持加签机器人
  • 支持所有类型消息

Usage

import DingBot from '@wx-sab/ding-bot-sdk'

const dingBot = new DingBot({
  // 机器人密钥
  BOT_SECRET: string,
  ACCESS_TOKEN: string,
  BASE_URL?: string
})

dingBot.sendNotify({
  msgtype: string,
  at?: {
    atMobiles?: Array<string>,
    atUserIds?: Array<string>,
    isAtAll?: boolean
  },
  // 文本类型
  text?: {
    content: string,
  },
  // 链接类型
  link?: {
    text: string,
    title: string,
    picUrl?: string,
    messageUrl: string
  },
  // Markdown 类型
  markdown?: {
    title: string,
    text: string
  },
  // ActionCard 类型
  actionCard?: {
    title: string,
    text: string,
    btnOrientation?: string,
    singleTitle?: string,
    singleURL?: string,
    btns?: Array<actionCardBtns>,
  },
  // FeedCard 类型
  feedCard?: {
    links: Array<feedCardLinks>
  }
})
1.0.4

11 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago