package
Version:
v0.0.0-...-7becda7
Opens a new window with list of versions in this module.
Published: Feb 25, 2017
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Send 发送消息, msg 是经过 encoding/json.Marshal 得到的结果符合微信消息格式的任何数据结构.
type Image struct {
Image struct {
MediaId string `json:"media_id"`
} `json:"image"`
}
type MsgHeader struct {
GroupId int64 `json:"group_id"`
} `json:"filter"`
}
type News struct {
News struct {
MediaId string `json:"media_id"`
} `json:"mpnews"`
}
图文消息
新建图文消息
NOTE: 对于临时素材, mediaId 应该通过 media.UploadNews 得到
type Text struct {
Text struct {
Content string `json:"content"`
} `json:"text"`
}
type Video struct {
Video struct {
MediaId string `json:"media_id"`
} `json:"mpvideo"`
}
新建视频消息
NOTE: 对于临时素材, mediaId 应该通过 media.UploadVideo2 得到
type Voice struct {
Voice struct {
MediaId string `json:"media_id"`
} `json:"voice"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.