Documentation ¶
Index ¶
- Constants
- func SendActionCard(accessToken string, text string, title string, hideAvatar string, ...) (string, error)
- func SendActionCardBtns(accessToken string, text string, title string, hideAvatar string, ...) (string, error)
- func SendFeedCard(accessToken string, links []Link) (string, error)
- func SendLink(accessToken string, text string, title string, picUrl string, ...) (string, error)
- func SendText(accessToken string, content string) (string, error)
- type ActionCard
- type ActionCardBtns
- type At
- type Btns
- type FeedCardLink
- type Link
- type MsgActionCard
- type MsgActionCardBtns
- type MsgFeedCard
- type MsgLink
- type MsgText
- type Text
Constants ¶
View Source
const API string = "https://oapi.dingtalk.com/robot/send?access_token="
Variables ¶
This section is empty.
Functions ¶
func SendActionCard ¶
func SendActionCard(accessToken string, text string, title string, hideAvatar string, btnOrientation string, singleTitle string, singleURL string) (string, error)
发送链接地址
整体跳转ActionCard类型 { "actionCard": { "title": "乔布斯 20 年前想打造一间苹果咖啡厅,而它正是 Apple Store 的前身", "text": "![screenshot](@lADOpwk3K80C0M0FoA) ### 乔布斯 20 年前想打造的苹果咖啡厅 Apple Store 的设计正从原来满满的科技感走向生活化,而其生活化的走向其实可以追溯到 20 年前苹果一个建立咖啡馆的计划", "hideAvatar": "0", "btnOrientation": "0", "singleTitle" : "阅读全文", "singleURL" : "https://www.dingtalk.com/" }, "msgtype": "actionCard" }
func SendActionCardBtns ¶
func SendActionCardBtns(accessToken string, text string, title string, hideAvatar string, btnOrientation string, btns []Btns) (string, error)
* 独立跳转ActionCard类型
{ "actionCard": { "title": "乔布斯 20 年前想打造一间苹果咖啡厅,而它正是 Apple Store 的前身", "text": "![screenshot](@lADOpwk3K80C0M0FoA) ### 乔布斯 20 年前想打造的苹果咖啡厅 Apple Store 的设计正从原来满满的科技感走向生活化,而其生活化的走向其实可以追溯到 20 年前苹果一个建立咖啡馆的计划", "hideAvatar": "0", "btnOrientation": "0", "btns": [ { "title": "内容不错", "actionURL": "https://www.dingtalk.com/" }, { "title": "不感兴趣", "actionURL": "https://www.dingtalk.com/" } ] }, "msgtype": "actionCard" }
Types ¶
type ActionCard ¶
type ActionCard struct { Text string `json:"text"` Tile string `json:"title"` HideAvatar string `json:"hideAvatar"` BtnOrientation string `json:"btnOrientation"` SingleTitle string `json:"singleTitle"` SingleURL string `json:"singleURL"` }
整体跳转ActionCard类型
type ActionCardBtns ¶
type ActionCardBtns struct { Text string `json:"text"` Tile string `json:"title"` HideAvatar string `json:"hideAvatar"` BtnOrientation string `json:"btnOrientation"` Btns []Btns `json:"btns"` }
独立跳转ActionCard类型
type FeedCardLink ¶
type FeedCardLink struct {
Links []Link `json:"links"`
}
type Link ¶
type Link struct { Text string `json:"text"` Title string `json:"title"` PicUrl string `json:"picUrl"` MessageUrl string `json:"messageUrl"` }
link 类型详细
type MsgActionCard ¶
type MsgActionCard struct { MsgType string `json:"msgtype"` ActionCard ActionCard `json:"actionCard"` }
整体跳转ActionCard类型
type MsgActionCardBtns ¶
type MsgActionCardBtns struct { MsgType string `json:"msgtype"` ActionCard ActionCardBtns `json:"actionCard"` }
type MsgFeedCard ¶
type MsgFeedCard struct { MsgType string `json:"msgtype"` FeedCardLink FeedCardLink `json:"feedCard"` }
FeedCard类型
Click to show internal directories.
Click to hide internal directories.