ding

package
v0.0.0-...-06f9d85 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

钉钉 https://open.dingtalk.com/document/orgapp/learning-map https://open.dingtalk.com/document/orgapp/robot-overview

Index

Constants

View Source
const SendURL = "https://oapi.dingtalk.com/robot/send"

Variables

This section is empty.

Functions

func Send

func Send(token string, body any) error

Send 发送群消息,新创建resty客户端 每个机器人每分钟最多发送20条消息到群里,如果超过20条,会限流10分钟。 https://open.dingtalk.com/document/orgapp/custom-robots-send-group-messages

func SendText

func SendText(token string, content string, atMobiles []string) error

SendText 发送text类型群消息,新创建resty客户端 每个机器人每分钟最多发送20条消息到群里,如果超过20条,会限流10分钟。 https://open.dingtalk.com/document/orgapp/custom-robots-send-group-messages

Types

type Body

type Body struct {
	MsgType string `json:"msgtype"` // 消息类型
}

Body 基本请求体

type TextBody

type TextBody struct {
	Body
	At struct {
		AtMobiles []string `json:"atMobiles"` // 被@人的手机号
	} `json:"at"`
	Text struct {
		Content string `json:"content"` // 消息内容
	} `json:"text"`
}

TextBody text类型请求体

Jump to

Keyboard shortcuts

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