-
Notifications
You must be signed in to change notification settings - Fork 174
/
requestGroupRobot.go
94 lines (86 loc) · 3.22 KB
/
requestGroupRobot.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
package request
type RequestGroupRobotMsg struct {
MsgType string `json:"msgtype"`
Text GroupRobotMsgText `json:"text,omitempty"`
Markdown GroupRobotMsgMarkdown `json:"markdown,omitempty"`
Image GroupRobotMsgImage `json:"image,omitempty"`
News GroupRobotMsgNews `json:"news,omitempty"`
File GroupRobotMsgFile `json:"file"`
TemplateCard GroupRobotMsgTemplateCard `json:"template_card"`
}
type GroupRobotMsgText struct {
Content string `json:"content"`
MentionedList []string `json:"mentioned_list,omitempty"`
MentionedMobileList []string `json:"mentioned_mobile_list,omitempty"`
}
type GroupRobotMsgMarkdown struct {
Content string `json:"content"`
}
type GroupRobotMsgImage struct {
Base64 string `json:"base64"`
Md5 string `json:"md5"`
}
type GroupRobotMsgNews struct {
Articles []GroupRobotMsgNewsArticles `json:"articles"`
}
type GroupRobotMsgNewsArticles struct {
Title string `json:"title"`
Description string `json:"description,omitempty"`
Url string `json:"url"`
PicUrl string `json:"picurl,omitempty"`
}
type GroupRobotMsgFile struct {
MediaID string `json:"media_id"`
}
type GroupRobotMsgTemplateCard struct {
CardType string `json:"card_type"`
Source TemplateCardSource `json:"source,omitempty"`
MainTitle TemplateCardMainTitle `json:"main_title,omitempty"`
CardImage TemplateCardImage `json:"card_image,omitempty"`
VerticalContentList []TemplateCardVerticalContentListItem `json:"vertical_content_list"`
EmphasisContent TemplateCardEmphasisContent `json:"emphasis_content,omitempty"`
SubTitleText string `json:"sub_title_text"`
HorizontalContentList []TemplateCardHorizontalContentListItem `json:"horizontal_content_list,omitempty"`
JumpList []TemplateCardJumpListItem `json:"jump_list,omitempty"`
CardAction TemplateCardCardAction `json:"card_action,omitempty"`
}
type TemplateCardSource struct {
IconUrl string `json:"icon_url"`
Desc string `json:"desc"`
}
type TemplateCardMainTitle struct {
Title string `json:"title"`
Desc string `json:"desc"`
}
type TemplateCardImage struct {
Title string `json:"title"`
Desc string `json:"desc"`
}
type TemplateCardVerticalContentListItem struct {
Title string `json:"title"`
Desc string `json:"desc"`
}
type TemplateCardEmphasisContent struct {
Title string `json:"title"`
Desc string `json:"desc"`
}
type TemplateCardHorizontalContentListItem struct {
KeyName string `json:"keyname"`
Value string `json:"value"`
Type int `json:"type,omitempty"`
Url string `json:"url,omitempty"`
MediaID string `json:"media_id,omitempty"`
}
type TemplateCardJumpListItem struct {
Type int `json:"type"`
Url string `json:"url,omitempty"`
Title string `json:"title"`
AppID string `json:"appid,omitempty"`
PagePath string `json:"pagepath,omitempty"`
}
type TemplateCardCardAction struct {
Type int `json:"type"`
Url string `json:"url"`
AppID string `json:"appid"`
PagePath string `json:"pagepath"`
}