Using DingTalk GroupBot with one line
So easy!
DingTalk Doc:https://developers.dingtalk.com/document/robots/custom-robot-access
//func Text(token string, content string, AtMobiles []string, AtUserIds []string, IsAtAll bool) error
dingbot.Text("123","hello",[]string{},[]string{},false)
//func Link(token string, content string, Title string, PicUrl string, MessageUrl string) error
dingbot.Link("123","Hello World!","Hello","https://github.com/fluidicon.png","https://github.com/EldersJavas/EsDingTalkBot_Go")
//func MD(token string, title string, content string, AtMobiles []string, AtUserIds []string, IsAtAll bool) error
dingbot.MD("123","# Hello",[]string{},[]string{},false)
//func AActionCard(token string, Title string, content string, BtnOrientation string, SingleTitle string, SingleURL string) error
dingbot.AActionCard("123","hello","Hello World!","1","EsDingTalkBot_Go","https://github.com/EldersJavas/EsDingTalkBot_Go")
/*
func DActionCard(token, Title, content, BtnOrientation string, Btns []struct {
Title string `json:"title"`
ActionURL string `json:"actionURL"`
}) error
*/
var Btn []struct {
Title string `json:"title"`
ActionURL string `json:"actionURL"`}
var Add struct{
Title string `json:"title"`
ActionURL string `json:"actionURL"`}
Add.Title="EsDingTalkBot_Go"
Add.ActionURL="https://github.com/EldersJavas/EsDingTalkBot_Go"
Btn = append(Btn, Add)
err := dingbot.DActionCard("123", "hello", "", "1", Btn)
/*
func func FeedCard(token string, Links []struct {
Title string `json:"title"`
MessageURL string `json:"messageURL"`
PicURL string `json:"picURL"`
}) error
*/
var Links []struct{
Title string `json:"title"`
MessageURL string `json:"messageURL"`
PicURL string `json:"picURL"`}
var Add struct{
Title string `json:"title"`
MessageURL string `json:"messageURL"`
PicURL string `json:"picURL"`}
Add.Title="EsDingTalkBot_Go"
Add.PicURL="https://github.com/fluidicon.png"
Add.MessageURL="https://github.com/EldersJavas/EsDingTalkBot_Go"
Links = append(Links, Add)
err := dingbot.FeedCard("123", Links)
err := FeedCard("123", Links)
if err != nil {
return
}