Documentation
¶
Index ¶
- type AddMsgTemplateRequest
- type AddMsgTemplateResponse
- type AddMsgTemplateResponsedata
- type DelMsgTemplateRequest
- type DelMsgTemplateResponse
- type DelMsgTemplateResponsedata
- type GetMsgTemplateLibraryKeyWordRequest
- type GetMsgTemplateLibraryKeyWordResponse
- type GetMsgTemplateLibraryKeyWordResponsedata
- type GetMsgTemplateLibraryKeyWordResponsedatakeywordListItem
- type GetMsgTemplateLibraryListRequest
- type GetMsgTemplateLibraryListResponse
- type GetMsgTemplateLibraryListResponsedata
- type GetMsgTemplateLibraryListResponsedatalistItem
- type GetMsgTemplateListRequest
- type GetMsgTemplateListResponse
- type GetMsgTemplateListResponsedata
- type GetMsgTemplateListResponsedatalistItem
- type SendMsgRequest
- type SendMsgResponse
- type SendMsgResponsedata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddMsgTemplateRequest ¶
type AddMsgTemplateRequest struct {
AccessToken string // 授权小程序的接口调用凭据
ID string // 模板标题 id
KeywordIDList string // 模板关键词 id 列表,如[1,2,3];
}
AddMsgTemplateRequest 请求结构体
type AddMsgTemplateResponse ¶
type AddMsgTemplateResponse struct {
Data AddMsgTemplateResponsedata `json:"data"` // 响应参数
Errno int64 `json:"errno"` // 状态码
ErrMsg string `json:"msg"` // 错误信息
ErrorCode int64 `json:"error_code"` // openapi 错误码
ErrorMsg string `json:"error_msg"` // openapi 错误信息
}
type AddMsgTemplateResponsedata ¶
type AddMsgTemplateResponsedata struct {
TemplateID string `json:"template_id"` // 添加至帐号下的模板id,发送小程序模板消息时所需
}
func AddMsgTemplate ¶
func AddMsgTemplate(params *AddMsgTemplateRequest) (*AddMsgTemplateResponsedata, error)
AddMsgTemplate
type DelMsgTemplateRequest ¶
type DelMsgTemplateRequest struct {
AccessToken string // 授权小程序的接口调用凭据
TemplateID string // 模板 id ,发送小程序模板消息时所需
}
DelMsgTemplateRequest 请求结构体
type DelMsgTemplateResponse ¶
type DelMsgTemplateResponse struct {
Errno int64 `json:"errno"` // 状态码
ErrMsg string `json:"msg"` // 错误信息
ErrorCode int64 `json:"error_code"` // openapi 错误码
ErrorMsg string `json:"error_msg"` // openapi 错误信息
Data DelMsgTemplateResponsedata
}
type DelMsgTemplateResponsedata ¶
type DelMsgTemplateResponsedata struct {
Errno int64 `json:"errno"` // 状态码
Msg string `json:"msg"` // 状态描述
}
func DelMsgTemplate ¶
func DelMsgTemplate(params *DelMsgTemplateRequest) (*DelMsgTemplateResponsedata, error)
DelMsgTemplate
type GetMsgTemplateLibraryKeyWordRequest ¶
type GetMsgTemplateLibraryKeyWordRequest struct {
AccessToken string // 授权小程序的接口调用凭据
ID string // 模板标题id,可通过接口获取,也可登录小程序后台查看获取
}
GetMsgTemplateLibraryKeyWordRequest 请求结构体
type GetMsgTemplateLibraryKeyWordResponse ¶
type GetMsgTemplateLibraryKeyWordResponse struct {
Data GetMsgTemplateLibraryKeyWordResponsedata `json:"data"` // 响应参数
Errno int64 `json:"errno"` // 状态码
ErrMsg string `json:"msg"` // 错误信息
ErrorCode int64 `json:"error_code"` // openapi 错误码
ErrorMsg string `json:"error_msg"` // openapi 错误信息
}
type GetMsgTemplateLibraryKeyWordResponsedata ¶
type GetMsgTemplateLibraryKeyWordResponsedata struct {
ID string `json:"id"` // 模板标题 id
KeywordCount int64 `json:"keyword_count"` // 关键字条数
KeywordList []GetMsgTemplateLibraryKeyWordResponsedatakeywordListItem `json:"keyword_list"` //
Title string `json:"title"` // 模板标题
}
func GetMsgTemplateLibraryKeyWord ¶
func GetMsgTemplateLibraryKeyWord(params *GetMsgTemplateLibraryKeyWordRequest) (*GetMsgTemplateLibraryKeyWordResponsedata, error)
GetMsgTemplateLibraryKeyWord
type GetMsgTemplateLibraryListRequest ¶
type GetMsgTemplateLibraryListRequest struct {
AccessToken string // 授权小程序的接口调用凭据
Offset int64 // 用于分页,表示从offset开始,默认值为0
Count int64 // 用于分页,表示拉取count条记录,默认值为0,最大为20
}
GetMsgTemplateLibraryListRequest 请求结构体
type GetMsgTemplateLibraryListResponse ¶
type GetMsgTemplateLibraryListResponse struct {
Data GetMsgTemplateLibraryListResponsedata `json:"data"` // 响应参数
Errno int64 `json:"errno"` // 状态码
ErrMsg string `json:"msg"` // 错误信息
ErrorCode int64 `json:"error_code"` // openapi 错误码
ErrorMsg string `json:"error_msg"` // openapi 错误信息
}
type GetMsgTemplateLibraryListResponsedata ¶
type GetMsgTemplateLibraryListResponsedata struct {
List []GetMsgTemplateLibraryListResponsedatalistItem `json:"list"` //
TotalCount int64 `json:"total_count"` // 模板库标题总数
}
func GetMsgTemplateLibraryList ¶
func GetMsgTemplateLibraryList(params *GetMsgTemplateLibraryListRequest) (*GetMsgTemplateLibraryListResponsedata, error)
GetMsgTemplateLibraryList
type GetMsgTemplateListRequest ¶
type GetMsgTemplateListRequest struct {
AccessToken string // 授权小程序的接口调用凭据
Offset int64 // 用于分页,表示从offset开始,默认值为0
Count int64 // 用于分页,表示拉取count条记录,默认值为0,最大为20
}
GetMsgTemplateListRequest 请求结构体
type GetMsgTemplateListResponse ¶
type GetMsgTemplateListResponse struct {
Data GetMsgTemplateListResponsedata `json:"data"` // 响应参数
Errno int64 `json:"errno"` // 状态码
ErrMsg string `json:"msg"` // 错误信息
ErrorCode int64 `json:"error_code"` // openapi 错误码
ErrorMsg string `json:"error_msg"` // openapi 错误信息
}
type GetMsgTemplateListResponsedata ¶
type GetMsgTemplateListResponsedata struct {
List []GetMsgTemplateListResponsedatalistItem `json:"list"` // 模板对象数组,对象中包含模板 id 、模板标题 title 、模板内容 content 、模板内容示例 example
TotalCount int64 `json:"total_count"` // 模板库标题总数
}
func GetMsgTemplateList ¶
func GetMsgTemplateList(params *GetMsgTemplateListRequest) (*GetMsgTemplateListResponsedata, error)
GetMsgTemplateList
type SendMsgRequest ¶
type SendMsgRequest struct {
AccessToken string // 授权小程序的接口调用凭据
TemplateID string // 模板 id ,发送小程序模板消息时所需
TouserOpenID string // 接收者 open_id
Data string // {"keyword1": {"value": "2018-09-06"},"keyword2": {"value": "kfc"}}
Page interface{} // 点击模板卡片后的跳转页面,仅限本小程序内的页面。支持带参数,(示例index?foo=bar),该字段不填则模板无跳转。
SceneID string // 场景 id,例如表单 id 和订单 id
SceneType int64 // 场景type,1:表单;2:百度收银台订单;3:直连订单
Title string // 标题
Ext interface{} // {"xzh_id":111,"category_id":15}
}
SendMsgRequest 请求结构体
type SendMsgResponse ¶
type SendMsgResponse struct {
Data SendMsgResponsedata `json:"data"` // 响应参数
Errno int64 `json:"errno"` // 状态码
ErrMsg string `json:"msg"` // 错误信息
ErrorCode int64 `json:"error_code"` // openapi 错误码
ErrorMsg string `json:"error_msg"` // openapi 错误信息
}
type SendMsgResponsedata ¶
type SendMsgResponsedata struct {
MsgKey int64 `json:"msg_key"` // 消息 id
}
Click to show internal directories.
Click to hide internal directories.