-
Notifications
You must be signed in to change notification settings - Fork 174
/
requestBroadcastingMedia.go
77 lines (56 loc) · 1.24 KB
/
requestBroadcastingMedia.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
package request
type MediaPreviewInterface interface {
GetMsgType() string
GetToUser() string
}
// ---------------------------------------------
type MediaPreview struct {
MediaPreviewInterface
ToUser string `json:"touser"`
ToWXName string `json:"towxname"`
MsgType string `json:"msgtype"`
}
func (media *MediaPreview) GetMsgType() string {
return media.MsgType
}
func (media *MediaPreview) GetToUser() string {
return media.ToUser
}
// ---------------------------------------------
type MediaInfo struct {
MediaID string `json:"media_id"`
}
type NPNews struct {
*MediaPreview
MPNews *MediaInfo `json:"mpnews"`
}
type Text struct {
*MediaPreview
Text MediaInfo `json:"text"`
}
type Voice struct {
*MediaPreview
Voice MediaInfo `json:"voice"`
}
type Image struct {
*MediaPreview
Image MediaInfo `json:"image"`
}
type MPVideo struct {
*MediaPreview
MPVideo MediaInfo `json:"mpvideo"`
}
type CardExt struct {
Code string `json:"code"`
Openid string `json:"openid "`
Timestamp string `json:"timestamp "`
Signature string `json:"signature "`
}
type WXCardInfo struct {
CardID string `json:"card_id"`
CardExt *CardExt `json:"card_ext"`
}
type WXCard struct {
*MediaPreview
WXCard *WXCardInfo `json:"wxcard"`
}