package
Version:
v1.0.1
Opens a new window with list of versions in this module.
Published: Jul 8, 2020
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"`
}
type WxCard struct {
WxCard struct {
CardId string `json:"card_id"`
CardExt string `json:"card_ext,omitempty"`
} `json:"wxcard"`
}
卡券消息
新建卡券, 特别注意: 目前该接口仅支持填入非自定义code的卡券和预存模式的自定义code卡券.
cardExt 可以为空
Source Files
¶
Click to show internal directories.
Click to hide internal directories.