Documentation ¶
Index ¶
- type Broadcast
- func (broadcast *Broadcast) Delete(ctx context.Context, msgID int64, articleIDx int64) error
- func (broadcast *Broadcast) GetMassStatus(ctx context.Context, msgID string) (*Result, error)
- func (broadcast *Broadcast) GetSpeed(ctx context.Context) (*SpeedResult, error)
- func (broadcast *Broadcast) Preview() *Broadcast
- func (broadcast *Broadcast) SendImage(ctx context.Context, user *User, images *Image) (*Result, error)
- func (broadcast *Broadcast) SendNews(ctx context.Context, user *User, mediaID string, ignoreReprint bool) (*Result, error)
- func (broadcast *Broadcast) SendText(ctx context.Context, user *User, content string) (*Result, error)
- func (broadcast *Broadcast) SendVideo(ctx context.Context, user *User, mediaID string, title, description string) (*Result, error)
- func (broadcast *Broadcast) SendVoice(ctx context.Context, user *User, mediaID string) (*Result, error)
- func (broadcast *Broadcast) SendWxCard(ctx context.Context, user *User, cardID string) (*Result, error)
- func (broadcast *Broadcast) SetSpeed(ctx context.Context, 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 ¶
GetMassStatus 获取群发状态
func (*Broadcast) GetSpeed ¶
func (broadcast *Broadcast) GetSpeed(ctx context.Context) (*SpeedResult, error)
GetSpeed 获取群发速度
func (*Broadcast) SendImage ¶
func (broadcast *Broadcast) SendImage(ctx context.Context, user *User, images *Image) (*Result, error)
SendImage 发送图片
func (*Broadcast) SendNews ¶
func (broadcast *Broadcast) SendNews(ctx context.Context, user *User, mediaID string, ignoreReprint bool) (*Result, error)
SendNews 发送图文
func (*Broadcast) SendText ¶
func (broadcast *Broadcast) SendText(ctx context.Context, user *User, content string) (*Result, error)
SendText 群发文本 user 为nil,表示全员发送 &User{TagID:2} 根据tag发送 &User{OpenID:[]string("xxx","xxx")} 根据openid发送
func (*Broadcast) SendVideo ¶
func (broadcast *Broadcast) SendVideo(ctx context.Context, user *User, mediaID string, title, description string) (*Result, error)
SendVideo 发送视频
func (*Broadcast) SendVoice ¶
func (broadcast *Broadcast) SendVoice(ctx context.Context, user *User, mediaID string) (*Result, error)
SendVoice 发送语音
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 ¶
type SpeedResult struct { util.CommonError Speed int64 `json:"speed"` RealSpeed int64 `json:"realspeed"` }
SpeedResult 群发速度返回结果
Click to show internal directories.
Click to hide internal directories.