tp_wxa

package
v0.0.0-...-3b54ddd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

README

tp_wxa

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddWxTplToSelf

func AddWxTplToSelf(accessToken string, tplTitleId string, keywordIdList []int) (templateId string, err error)

组合模板并添加至帐号下的个人模板库

func ChangeVisitstatus

func ChangeVisitstatus(accessToken string, open bool) (err error)

10. 修改小程序线上代码的可见状态(仅供第三方代小程序调用) action: false:close/true:open

func CommitCode

func CommitCode(accessToken string, templateId int64, extJson string, userVersion string, userDesc string) (err error)

为授权的小程序帐号上传小程序代码 请注意其中ext_json必须是json的字符串, 而且里面的参数不能乱配置, 比如page参数的路径一定要是小程序模板里有的

func DelMsgTpl

func DelMsgTpl(accessToken string, id string) (err error)

删除帐号下的某个模板

func GetPage

func GetPage(accessToken string) (pages []string, err error)

获取小程序的第三方提交代码的页面配置(仅供第三方开发者代小程序调用)

func Release

func Release(accessToken string) (err error)

9. 发布已通过审核的小程序(仅供第三方代小程序调用)

func SendTpl

func SendTpl(accessToken string, toUserOpenId string, tplId string, formId string, page string, color string, data map[string]MsgTplArg, emphasisKeyword string) (err error)

touser 是 接收者(用户)的 openid template_id 是 所需下发的模板消息的id page 否 点击模板卡片后的跳转页面,仅限本小程序内的页面。支持带参数,(示例index?foo=bar)。该字段不填则模板无跳转。 form_id 是 表单提交场景下,为 submit 事件带上的 formId;支付场景下,为本次支付的 prepay_id data 是 模板内容,不填则下发空模板 color 否 模板内容字体的颜色,不填默认黑色 emphasis_keyword 否 模板需要放大的关键词,不填则默认无放大

func SubmitAudit

func SubmitAudit(accessToken string, auditItems []AuditItem) (auditid int64, err error)

将第三方提交的代码包提交审核

Types

type AuditItem

type AuditItem struct {
	Address     string `json:"address"`
	Tag         string `json:"tag"`
	FirstClass  string `json:"first_class"`
	SecondClass string `json:"second_class"`
	FirstId     int    `json:"first_id"`
	SecondId    int    `json:"second_id"`
	Title       string `json:"title"`
}

type AuthResponse

type AuthResponse struct {
	wx_open.WxResponse
	Openid     string `json:"openid"`
	SessionKey string `json:"session_key"`
}

func GetSessionKeyByCode

func GetSessionKeyByCode(appId string, code string) (r AuthResponse, err error)

微信登陆 code 换取 session_key 第三方平台开发者的服务器使用登录凭证 code 以及第三方平台的component_access_token 获取 session_key 和 openid。其中 session_key 是对用户数据进行加密签名的密钥。 为了自身应用安全,session_key 不应该在网络上传输。 appId: wxappid

type DomainRsp

type DomainRsp struct {
	wx_open.WxResponse
	Requestdomain   []string `json:"requestdomain"`
	Wsrequestdomain []string `json:"wsrequestdomain"`
	Uploaddomain    []string `json:"uploaddomain"`
	Downloaddomain  []string `json:"downloaddomain"`
}

func ModifyDomain

func ModifyDomain(accessToken string, action string, requestDomain, wsrequestdomain, uploaddomain, downloaddomain []string) (r DomainRsp, err error)

修改服务器地址 授权给第三方的小程序,其服务器域名只可以为第三方的服务器,当小程序通过第三方发布代码上线后, 小程序原先自己配置的服务器域名将被删除, 只保留第三方平台的域名,所以第三方平台在代替小程序发布代码之前, 需要调用接口为小程序添加第三方自身的域名。 action: add添加, delete删除, set覆盖, get获取。当参数是get时不需要填四个域名字段。

type Keyword

type Keyword struct {
	KeywordId int    `json:"keyword_id"`
	Name      string `json:"name"`
	Example   string `json:"example"`
}

func GetMsgTplLibKV

func GetMsgTplLibKV(accessToken string, tplTitleId string) (kvs []Keyword, err error)

获取模板库某个模板标题下关键词库

type LatestAuditstatusRsp

type LatestAuditstatusRsp struct {
	wx_open.WxResponse
	Auditid string  `json:"auditid"`
	Status  float64 `json:"status"`
	Reason  string  `json:"reason"`
}

func GetLatestAuditstatus

func GetLatestAuditstatus(accessToken string) (r LatestAuditstatusRsp, err error)

8. 查询最新一次提交的审核状态

type MessageTpl

type MessageTpl struct {
	TemplateId string `json:"template_id"`
	Title      string `json:"title"`
	Content    string `json:"content"`
	Example    string `json:"example"`
}

func GetMsgTpl

func GetMsgTpl(accessToken string, offset int, count int) (tplList []MessageTpl, err error)

获取帐号下已存在的模板列表

type MsgTplArg

type MsgTplArg struct {
	Value string `json:"value"`
	Color string `json:"color"`
}

type PageRsp

type PageRsp struct {
	wx_open.WxResponse
	PageList []string `json:"page_list"`
}

type SubmitAuditRsp

type SubmitAuditRsp struct {
	wx_open.WxResponse
	Auditid int64 `json:"auditid"`
}

type WxTplTitle

type WxTplTitle struct {
	Id    string `json:"id"`
	Title string `json:"title"`
}

func GetTplMsgLibTitleList

func GetTplMsgLibTitleList(accessToken string, offset int, count int) (tplList []WxTplTitle, total int64, err error)

获取小程序模板库标题列表 accessToken: 公众平台的token, 而不是第三方的token

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL