webhook.go
func (w *Webhook) SendSingleActionCardMsg(title, content, linkTitle, linkURL string, hideAvatar, btnOrientation bool) error {
	var strHideAvatar = "0"
	if hideAvatar {
		strHideAvatar = "1"
	}
	var strBtnOrientation = "0"
	if btnOrientation {
		strBtnOrientation = "1"
	}

	return w.SendPayload(&Payload{
		MsgType: "actionCard",
		ActionCard: ActionCard{
			Text:           content,
			Title:          title,
			HideAvatar:     strHideAvatar,
			BtnOrientation: strBtnOrientation,
			SingleTitle:    linkTitle,
			SingleURL:      linkURL,
		},
	})
}
func (w *Webhook) SendSingleActionCardMsg(title, content, linkTitle, linkURL string, hideAvatar, btnOrientation bool) error {
	var strHideAvatar = "0"
	if hideAvatar {
		strHideAvatar = "1"
	}
	var strBtnOrientation = "0"
	if btnOrientation {
		strBtnOrientation = "1"
	}

	return w.SendPayload(&Payload{
		MsgType: "actionCard",
		ActionCard: ActionCard{
			Text:           content,
			Title:          title,
			HideAvatar:     strHideAvatar,
			BtnOrientation: strBtnOrientation,
			SingleTitle:    linkTitle,
			SingleURL:      linkURL,
		},
	})
}
func ( w * Webhook ) SendSingleActionCardMsg ( title , content , linkTitle , linkURL string , hideAvatar , btnOrientation bool ) error { var strHideAvatar = " " if hideAvatar { strHideAvatar = " " } var strBtnOrientation = " " if btnOrientation { strBtnOrientation = " " } return w . SendPayload ( & Payload { MsgType : " " , ActionCard : ActionCard { Text : content , Title : title , HideAvatar : strHideAvatar , BtnOrientation : strBtnOrientation , SingleTitle : linkTitle , SingleURL : linkURL , } , } ) }
// SendSingleActionCardMsg 发送整体跳转ActionCard类型消息
SendSingleActionCardMsg 发送整体跳转ActionCard类型消息