Documentation ¶
Index ¶
- type Broadcast
- func (broadcast *Broadcast) Delete(msgID int64, articleIDx int64) error
- func (broadcast *Broadcast) GetMassStatus(msgID string) (*Result, error)
- func (broadcast *Broadcast) GetSpeed() (*SpeedResult, error)
- func (broadcast *Broadcast) Preview() *Broadcast
- 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)
- func (broadcast *Broadcast) SetSpeed(speed int) (*SpeedResult, error)
- type Image
- type MsgType
- type Result
- type SpeedResult
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broadcast ¶
Broadcast 群发消息
func (*Broadcast) GetMassStatus ¶ added in v2.0.4
GetMassStatus 获取群发状态
func (*Broadcast) GetSpeed ¶ added in v2.0.4
func (broadcast *Broadcast) GetSpeed() (*SpeedResult, error)
GetSpeed 获取群发速度
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 发送视频
func (*Broadcast) SendWxCard ¶
SendWxCard 发送卡券
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" )
type Result ¶
type Result struct { util.CommonError MsgID int64 `json:"msg_id"` MsgDataID int64 `json:"msg_data_id"` MsgStatus string `json:"msg_status"` }
Result 群发返回结果
type SpeedResult ¶ added in v2.0.4
type SpeedResult struct { util.CommonError Speed int64 `json:"speed"` RealSpeed int64 `json:"realspeed"` }
SpeedResult 群发速度返回结果
Click to show internal directories.
Click to hide internal directories.