Documentation ¶
Overview ¶
根据OpenID列表群发消息.
Index ¶
- Constants
- type Client
- func (clt *Client) SendImage(msg *Image) (msgid int64, err error)
- func (clt *Client) SendNews(msg *News) (msgid int64, err error)
- func (clt *Client) SendText(msg *Text) (msgid int64, err error)
- func (clt *Client) SendVideo(msg *Video) (msgid int64, err error)
- func (clt *Client) SendVoice(msg *Voice) (msgid int64, err error)
- type CommonMessageHeader
- type Image
- type News
- type Text
- type Video
- type Voice
Constants ¶
View Source
const ( MsgTypeText = "text" MsgTypeImage = "image" MsgTypeVoice = "voice" MsgTypeVideo = "video" MsgTypeNews = "mpnews" )
View Source
const ToUserCountLimit = 10000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
mp.WechatClient
}
type CommonMessageHeader ¶
type CommonMessageHeader struct { ToUser []string `json:"touser,omitempty"` // 长度不能超过 ToUserCountLimit MsgType string `json:"msgtype"` }
func (*CommonMessageHeader) CheckValid ¶
func (header *CommonMessageHeader) CheckValid() (err error)
type Image ¶
type Image struct { CommonMessageHeader Image struct { MediaId string `json:"media_id"` } `json:"image"` }
type News ¶
type News struct { CommonMessageHeader News struct { MediaId string `json:"media_id"` } `json:"mpnews"` }
图文消息
type Text ¶
type Text struct { CommonMessageHeader Text struct { Content string `json:"content"` } `json:"text"` }
Click to show internal directories.
Click to hide internal directories.