Documentation ¶
Index ¶
- type Broadcast
- func (broadcast *Broadcast) Delete(msgID int64, articleIDx int64) error
- func (broadcast *Broadcast) SendImage(user *User, images *Image) (*Result, error)
- func (broadcast *Broadcast) SendNews(user *User, mediaID string, ignoreReprint bool) (*Result, error)
- func (broadcast *Broadcast) SendText(user *User, content string) (*Result, error)
- func (broadcast *Broadcast) SendVideo(user *User, mediaID string, title, description string) (*Result, error)
- func (broadcast *Broadcast) SendVoice(user *User, mediaID string) (*Result, error)
- func (broadcast *Broadcast) SendWxCard(user *User, cardID string) (*Result, error)
- type Image
- type MsgType
- type Result
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broadcast ¶
Broadcast 群发消息
func (*Broadcast) SendNews ¶
func (broadcast *Broadcast) SendNews(user *User, mediaID string, ignoreReprint bool) (*Result, error)
SendNews 发送图文
func (*Broadcast) SendText ¶
SendText 群发文本 user 为nil,表示全员发送 &User{TagID:2} 根据tag发送 &User{OpenID:[]string("xxx","xxx")} 根据openid发送
func (*Broadcast) SendVideo ¶
func (broadcast *Broadcast) SendVideo(user *User, mediaID string, title, description string) (*Result, error)
SendVideo 发送视频
type Image ¶
type Image struct { MediaIDs []string `json:"media_ids"` Recommend string `json:"recommend"` NeedOpenComment int32 `json:"need_open_comment"` OnlyFansCanComment int32 `json:"only_fans_can_comment"` }
Image 发送图片
type MsgType ¶
type MsgType string
MsgType 发送消息类型
const ( //MsgTypeNews 图文消息 MsgTypeNews MsgType = "mpnews" //MsgTypeText 文本 MsgTypeText MsgType = "text" //MsgTypeVoice 语音/音频 MsgTypeVoice MsgType = "voice" //MsgTypeImage 图片 MsgTypeImage MsgType = "image" //MsgTypeVideo 视频 MsgTypeVideo MsgType = "mpvideo" //MsgTypeWxCard 卡券 MsgTypeWxCard MsgType = "wxcard" )
Click to show internal directories.
Click to hide internal directories.