Documentation
¶
Index ¶
- Constants
- type ActionCardButton
- type BtnOrientation
- type Client
- func (c *Client) SendActionCardMsg(title, text string, hideAvatar bool, btnOrientation BtnOrientation, ...) error
- func (c *Client) SendFeedCardMsg(feedCards []FeedCard) error
- func (c *Client) SendLinkMsg(title, text, messageURL, picURL string, atAll bool, mobiles ...string) error
- func (c *Client) SendMarkdownMsg(title, text string, atAll bool, mobiles ...string) error
- func (c *Client) SendSingleActionCardMsg(title, text, singleTitle, singleURL string, btnOrientation BtnOrientation) error
- func (c *Client) SendTextMsg(text string, atAll bool, mobiles ...string) error
- type FeedCard
Constants ¶
const ( // BtnOrientationHorizonal 横排 BtnOrientationHorizonal = 0 // BtnOrientationVertical 横排 BtnOrientationVertical = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionCardButton ¶
ActionCardButton ActionCard的按钮内容
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client 钉钉消息推送机器人客户端
func (*Client) SendActionCardMsg ¶
func (c *Client) SendActionCardMsg(title, text string, hideAvatar bool, btnOrientation BtnOrientation, buttons ...ActionCardButton) error
SendActionCardMsg 发送 独立跳转ActionCard类型 消息 title: 首屏会话透出的展示内容 text: markdown格式的消息 hideAvatar: 是否隐藏头像 btnOrientation: BtnOrientationHorizonal:按钮竖直排列
BtnOrientationVertical:按钮横向排列
buttons: 按钮
func (*Client) SendFeedCardMsg ¶
SendFeedCardMsg 发送 FeedCard类型 消息 title: 首屏会话透出的展示内容 text: markdown格式的消息 hideAvatar: 是否隐藏头像 btnOrientation: BtnOrientationHorizonal:按钮竖直排列
BtnOrientationVertical:按钮横向排列
buttons: 按钮
func (*Client) SendLinkMsg ¶
func (c *Client) SendLinkMsg(title, text, messageURL, picURL string, atAll bool, mobiles ...string) error
SendLinkMsg 发送 link类型 消息 title: 消息标题 text: 消息内容,如果太长只会部分展示 messageURL: 点击消息跳转的URL picURL: 图片URL atAll: 是否@所有人 mobiles: 被@人的手机号
func (*Client) SendMarkdownMsg ¶
SendMarkdownMsg 发送 markdown类型 消息 title: 首屏会话透出的展示内容 text: markdown格式的消息 atAll: 是否@所有人 mobiles: 被@人的手机号
func (*Client) SendSingleActionCardMsg ¶
func (c *Client) SendSingleActionCardMsg(title, text, singleTitle, singleURL string, btnOrientation BtnOrientation) error
SendSingleActionCardMsg 发送 整体跳转ActionCard类型 消息 title: 首屏会话透出的展示内容 text: markdown格式的消息 singleTitle: 单个按钮的标题 singleURL: 点击singleTitle按钮触发的URL btnOrientation: BtnOrientationHorizonal:按钮竖直排列
BtnOrientationVertical:按钮横向排列