mass2group

package
v0.0.0-...-6321720 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2016 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

群发给分组的消息数据结构.

Index

Constants

View Source
const (
	MsgTypeText   = "text"
	MsgTypeImage  = "image"
	MsgTypeVoice  = "voice"
	MsgTypeVideo  = "mpvideo"
	MsgTypeNews   = "mpnews"
	MsgTypeWxCard = "wxcard"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	MessageHeader
	Image struct {
		MediaId string `json:"media_id"`
	} `json:"image"`
}

func NewImage

func NewImage(groupId int64, mediaId string) *Image

type MessageHeader

type MessageHeader struct {
	Filter struct {
		GroupId int64 `json:"group_id"`
	} `json:"filter"`
	MsgType string `json:"msgtype"`
}

type News

type News struct {
	MessageHeader
	News struct {
		MediaId string `json:"media_id"`
	} `json:"mpnews"`
}

图文消息

func NewNews

func NewNews(groupId int64, mediaId string) *News

新建图文消息

NOTE: 对于临时素材, mediaId 应该通过 media.Client.CreateNews 得到

type Text

type Text struct {
	MessageHeader
	Text struct {
		Content string `json:"content"`
	} `json:"text"`
}

func NewText

func NewText(groupId int64, content string) *Text

type Video

type Video struct {
	MessageHeader
	Video struct {
		MediaId string `json:"media_id"`
	} `json:"mpvideo"`
}

func NewVideo

func NewVideo(groupId int64, mediaId string) *Video

新建视频消息

NOTE: 对于临时素材, mediaId 应该通过 media.Client.CreateVideo 得到

type Voice

type Voice struct {
	MessageHeader
	Voice struct {
		MediaId string `json:"media_id"`
	} `json:"voice"`
}

func NewVoice

func NewVoice(groupId int64, mediaId string) *Voice

type WxCard

type WxCard struct {
	MessageHeader
	WxCard struct {
		CardId string `json:"card_id"`
	} `json:"wxcard"`
}

卡券消息

func NewWxCard

func NewWxCard(groupId int64, cardId string) *WxCard

新建卡券, 特别注意: 目前该接口仅支持填入非自定义code的卡券和预存模式的自定义code卡券.

Jump to

Keyboard shortcuts

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