dingTalkKit

package
v0.2.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package dingTalkKit 钉钉开发群工具包

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DingTalkBot

type DingTalkBot struct {
	WebHookUrl string // 钉钉机器人webhook地址
	Secret     string // 钉钉机器人secret
}

func NewDingTalkBot

func NewDingTalkBot(webHookUrl, secret string) *DingTalkBot

NewDingTalkBot 创建一个钉钉机器人

func (*DingTalkBot) SendActionCardMessage

func (t *DingTalkBot) SendActionCardMessage(title, text string, btnOrientation int, singleTitle, singleURL string) error

SendActionCardMessage 发送actionCard消息

  • @param title 标题
  • @param text 发送内容
  • @param btnOrientation 按钮排序方向 0:按钮竖直排列,1:按钮横向排列
  • @param singleTitle 单标题
  • @param singleURL 单链接

func (*DingTalkBot) SendLinkMessage

func (t *DingTalkBot) SendLinkMessage(title, text, messageUrl, picUrl string, atIdType int, at ...string) error

SendLinkMessage 发送link消息

  • @param title 标题
  • @param text 发送内容
  • @param messageUrl 跳转地址
  • @param picUrl 图片地址
  • @param atIdType 1:@手机, 2:@userId, 3:@所有人, other:不@
  • @param at 传入的手机号或者用户id

func (*DingTalkBot) SendMarkdownMessage

func (t *DingTalkBot) SendMarkdownMessage(title, text string, atIdType int, at ...string) error

SendMarkdownMessage 发送markdown消息

  • @param title 标题(用于左侧显示消息列表中显示缩略消息,在具体的内容中不显示)
  • @param text 发送内容
  • @param atIdType 1:@手机, 2:@userId, 3:@所有人, other:不@
  • @param at 传入的手机号或者用户id

func (*DingTalkBot) SendTextMessage

func (t *DingTalkBot) SendTextMessage(text string, atIdType int, at ...string) error

SendTextMessage 发送文本消息

  • @param text 发送内容
  • @param atIdType 1:@手机, 2:@userId, 3:@所有人, other:不@
  • @param at 传入的手机号或者用户id

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL