Documentation ¶
Index ¶
- func Send(api *token.Api, req Customer) error
- func SendTyping(api *token.Api, req *Typing) error
- func SendWithBytes(api *token.Api, buf []byte) error
- type Content
- type CustomService
- type Customer
- type Head
- type Image
- type ImageMsg
- type Link
- type LinkMsg
- type Music
- type MusicMsg
- type Program
- type ProgramMsg
- type TextMsg
- type Typing
- type Video
- type VideoMsg
- type Voice
- type VoiceMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Send ¶
发送小程序客服消息 POST https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN
Types ¶
type CustomService ¶
type CustomService struct {
Account string `json:"kf_account"`
}
type Customer ¶
type Customer interface { SetToUser(toUser string) SetCustom(custom *CustomService) }
type Head ¶
type Head struct { ToUser string `json:"touser"` Type string `json:"msgtype"` Custom *CustomService `json:"customservice,omitempty"` }
func (*Head) SetCustom ¶
func (h *Head) SetCustom(custom *CustomService)
type LinkMsg ¶
{ "touser": "OPENID", "msgtype": "link", "link": { "title": "Happy Day", "description": "Is Really A Happy Day", "url": "URL", "thumb_url": "THUMB_URL" }
type ProgramMsg ¶
{ "touser":"OPENID", "msgtype":"miniprogrampage", "miniprogrampage": { "title":"title", "pagepath":"pagepath", "thumb_media_id":"thumb_media_id" } }
type TextMsg ¶
文本消息 { "touser": "openid", "msgtype": "text", "text": { "content": "Holiday Request For Pony(http://xxxxx)" }, }
func NewTextMsg ¶
type Typing ¶
type Typing struct { ToUser string `json:"touser"` Command string `json:"command"` //"Typing","CancelTyping" Custom *CustomService `json:"customservice,omitempty"` }
Click to show internal directories.
Click to hide internal directories.