message_mass

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageMassSendByOpenIdURL = "https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token=%s"
	MessageMassSendByTagURL    = "https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=%s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageByOpen

type MessageByOpen struct {
	Touser  []string `json:"touser"`
	Msgtype string   `json:"msgtype"`
	Text    struct {
		Content string `json:"content"`
	} `json:"text"`
	Mpnews struct {
		MediaID string `json:"media_id"`
	} `json:"mpnews"`
	Clientmsgid string `json:"clientmsgid"`
}

func NewTextMessage

func NewTextMessage(openids []string, content string, tag string) MessageByOpen

type MessageByTag

type MessageByTag struct {
	Filter struct {
		IsToAll bool `json:"is_to_all"`
		TagID   int  `json:"tag_id"`
	} `json:"filter"`
	Msgtype string `json:"msgtype"`
	Text    struct {
		Content string `json:"content"`
	} `json:"text"`
	Mpnews struct {
		MediaID string `json:"media_id"`
	} `json:"mpnews"`
	Clientmsgid string `json:"clientmsgid"`
}

func NewTextMessageByTag

func NewTextMessageByTag(tag string, wxTag int, content string) MessageByTag

type MessageMass

type MessageMass struct {
	*context.Context
}

func NewMessageMass

func NewMessageMass(context *context.Context) *MessageMass

func (*MessageMass) Send

func (service *MessageMass) Send(msg *MessageByOpen) (result MessageSassResult, err error)

func (*MessageMass) SendByTag

func (service *MessageMass) SendByTag(msg *MessageByTag) (result MessageSassResult, err error)

type MessageSassResult

type MessageSassResult struct {
	define.CommonError
	Type      string `json:"type"`
	MsgId     int64  `json:"msg_id"`
	MsgDataId int64  `json:"msg_data_id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL