Documentation ¶
Index ¶
- func AddTemplate(clt *core.Client, id string, keyIds []int) (template_id string, err error)
- func DeleteTemplate(clt *core.Client, template_id string) (err error)
- func Send(clt *core.Client, touser, template_id, page, form_id string, ...) (err error)
- func UniformSend(clt *core.Client, touser string, msg *WxaTemplateMsg, mpmsg *MpTemplateMsg) (err error)
- type Keyword
- type MpTemplateMsg
- type Template
- type WxaTemplateMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTemplate ¶
组合模板并添加至帐号下的个人模板库 id string 是 模板标题id,可通过接口获取,也可登录小程序后台查看获取 keyword_id_list []int 是 开发者自行组合好的模板关键词列表,关键词顺序可以自由搭配(例如[3,5,4]或[4,5,3]),最多支持10个关键词组合
func DeleteTemplate ¶
组合模板并添加至帐号下的个人模板库 template_id string 要删除的模板id
func Send ¶
func Send(clt *core.Client, touser, template_id, page, form_id string, data map[string]interface{}, emphasis_keyword string) (err error)
发送模板消息 data: { "k1":{"value":""}} emphasis_keyword: "keyword1.DATA"
func UniformSend ¶
func UniformSend(clt *core.Client, touser string, msg *WxaTemplateMsg, mpmsg *MpTemplateMsg) (err error)
统一发送接口
Types ¶
type Keyword ¶
type MpTemplateMsg ¶
type MpTemplateMsg struct { TemplateId string `json:"template_id"` // 模板id AppId string `json:"appid"` //跳转小程序页面 Url string `json:"url"` // formid Data map[string]interface{} `json:"data"` // 模板数据 MiniProgram struct { AppId string `json:"appid"` PagePath string `json:"pagepath"` } `json:"miniprogram"` }
type Template ¶
type Template struct { Id string `json:"id"` // 作为模板时返回 Title string `json:"title"` // 作为模板时和作为添加到模板库后都返回 TemplateId string `json:"template_id"` // 作为添加到模板库后返回 Content string `json:"content"` // 作为添加到模板库后返回 Example string `json:"example"` // 作为添加到模板库后返回 }
Click to show internal directories.
Click to hide internal directories.