Documentation ¶
Index ¶
- Variables
- func AddCategory(clt *core.Client, list []*WxaActionCateInfo) (err error)
- func AddTemplate(clt *core.Client, id string, keyIds []int, desc string) (template_id string, err error)
- func AesDecrypt(crypted, key, iv []byte) ([]byte, error)
- func BindTester(clt *core.Client, wechatid string) (userstr string, err error)
- func ChangeSearchStatus(clt *core.Client, status int) (err error)
- func CheckNickName(clt *core.Client, nickname string) (wording string, hit bool, err error)
- func CommitCode(clt *core.Client, template_id int, extjson string, version, desc string) (err error)
- func DecryptWXOpenData(appId string, sessionKey, encryptData, iv string) (map[string]interface{}, error)
- func DeleteCategory(clt *core.Client, first, second int) (err error)
- func DeleteTemplate(clt *core.Client, template_id string) (err error)
- func GetAuditStatus(clt *core.Client, auditid int) (status int, reason string, err error)
- func GetBindTester(clt *core.Client) (list []string, err error)
- func GetExpQRCode(clt *core.Client, path string) (link string)
- func GetLatestAuditStatus(clt *core.Client, auditid int) (status int, reason string, err error)
- func GetPage(clt *core.Client) (list []string, err error)
- func GetPaidUnionId(clt *core.Client, openid string, transId string) (unionid string, err error)
- func ModifyCategory(clt *core.Client, item *WxaActionCateInfo) (err error)
- func ModifyDomain(clt *core.Client, action string, ...) (requst, ws, upload, download []string, err error)
- func ModifyHeadImage(clt *core.Client, head_img_media_id string) (err error)
- func ModifySignature(clt *core.Client, signature string) (err error)
- func QuerySearchStatus(clt *core.Client) (status int, err error)
- func ReleaseWxa(clt *core.Client) (err error)
- func RevertWxa(clt *core.Client) (err error)
- func SendMessage(clt *core.Client, touser, template_id, page, miniprogram_state string, ...) (err error)
- func SetNickName(clt *core.Client, info *WxaNameRequestInfo) (wording string, audit_id int, err error)
- func SetWebviewDomain(clt *core.Client, action string, domains []string) (list []string, err error)
- func SetWxSupportVersion(clt *core.Client, version string) (err error)
- func SubmitCode(clt *core.Client, list []*WxaPageInfo, feedinfo, feedstuff string) (auditid int, err error)
- func UnbindTester(clt *core.Client, wechatid string, userstr string) (err error)
- func UndoAudit(clt *core.Client) (err error)
- func UpdateShowWxaItem(clt *core.Client, open int, appid string) (err error)
- type CategoryItem
- type MpTemplateMsg
- type Template
- type TemplateCategory
- type TemplateKey
- type TemplateTitle
- type WxaActionCateInfo
- type WxaCategory
- type WxaCategoryInfo
- type WxaInfo
- type WxaItemInfo
- type WxaNameRequestInfo
- type WxaNameResultInfo
- type WxaPageInfo
- type WxaTemplateMsg
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AddTemplate ¶ added in v1.1.8
func AddTemplate(clt *core.Client, id string, keyIds []int, desc string) (template_id string, err error)
组合模板并添加至帐号下的个人模板库 id string 是 模板标题id,可通过接口获取,也可登录小程序后台查看获取 keyword_id_list []int 是 开发者自行组合好的模板关键词列表,关键词顺序可以自由搭配(例如[3,5,4]或[4,5,3]),最多支持10个关键词组合
func AesDecrypt ¶
func BindTester ¶
绑定微信用户为小程序体验者
func ChangeSearchStatus ¶
设置小程序隐私设置(是否可被搜索)
func CheckNickName ¶
微信认证名称检测
func CommitCode ¶
func CommitCode(clt *core.Client, template_id int, extjson string, version, desc string) (err error)
绑定微信用户为小程序体验者
func DecryptWXOpenData ¶
func DeleteTemplate ¶ added in v1.1.8
组合模板并添加至帐号下的个人模板库 template_id string 要删除的模板id
func GetAuditStatus ¶
获取小程序审核状态
func GetLatestAuditStatus ¶
查询最新一次提交的审核状态
func GetPaidUnionId ¶
获取支付的unionid信息
func ModifyCategory ¶
func ModifyCategory(clt *core.Client, item *WxaActionCateInfo) (err error)
添加类目
func ModifyDomain ¶
func ModifyDomain(clt *core.Client, action string, requestdomain, wsrequestdomain, uploaddoamin, downloaddomain []string) (requst, ws, upload, download []string, err error)
修改域名
func ModifyHeadImage ¶
修改小程序头像
func ModifySignature ¶
修改小程序功能介绍
func QuerySearchStatus ¶
设置小程序隐私设置(是否可被搜索)
func SendMessage ¶ added in v1.1.8
func SendMessage(clt *core.Client, touser, template_id, page, miniprogram_state string, data map[string]interface{}) (err error)
发送模板消息 data: { "k1":{"value":""}} miniprogram_state: developer为开发版;trial为体验版;formal为正式版;默认为正式版
func SetNickName ¶
func SetNickName(clt *core.Client, info *WxaNameRequestInfo) (wording string, audit_id int, err error)
小程序改名
func SetWebviewDomain ¶
设置webviewdomain
func SetWxSupportVersion ¶
设置最低基础库版本
func SubmitCode ¶
func SubmitCode(clt *core.Client, list []*WxaPageInfo, feedinfo, feedstuff string) (auditid int, err error)
提交小程序审核
func UnbindTester ¶
解除绑定小程序的体验者
Types ¶
type CategoryItem ¶
type CategoryItem struct { Quota int `json:"quota"` Limit int `json:"limit"` CategoryLimit int `json:"category_limit"` Categories []struct { First int `json:"first"` FirstName string `json:"first_name"` Second int `json:"second"` SecondName string `json:"second_name"` AuditStatus int `json:"audit_status"` AuditReason string `json:"audit_reason"` } `json:"categories"` }
func GetAccountCategory ¶
func GetAccountCategory(clt *core.Client) (item *CategoryItem, err error)
获取商户的设置类目
type MpTemplateMsg ¶ added in v1.1.8
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 ¶ added in v1.1.8
type TemplateCategory ¶ added in v1.1.8
type TemplateCategory struct { Id string `json:"id"` // 作为模板时返回 Name string `json:"name"` // 作为模板时和作为添加到模板库后都返回 }
func GetTemplateCategory ¶ added in v1.1.8
func GetTemplateCategory(clt *core.Client) (list []*TemplateCategory, err error)
获取模板的keyword列表 id string 是 模板标题id,可通过接口获取,也可登录小程序后台查看获取
type TemplateKey ¶ added in v1.1.8
type TemplateKey struct { Id string `json:"kid"` // 作为模板时返回 Name string `json:"name"` // 作为模板时和作为添加到模板库后都返回 TemplateId string `json:"template_id"` // 作为添加到模板库后返回 Rule string `json:"rule"` // 作为添加到模板库后返回 Example string `json:"example"` // 作为添加到模板库后返回 }
func GetPubTemplateKeywords ¶ added in v1.1.8
func GetPubTemplateKeywords(clt *core.Client, id string) (count int64, templates []*TemplateKey, err error)
获取模板的keyword列表 id string 是 模板标题id,可通过接口获取,也可登录小程序后台查看获取
type TemplateTitle ¶ added in v1.1.8
type TemplateTitle struct { Id string `json:"tid"` // 作为模板时返回 Title string `json:"title"` // 作为模板时和作为添加到模板库后都返回 Type int `json:"type"` // 作为添加到模板库后返回 CategoryId int `json:"categoryId"` // 作为添加到模板库后返回 }
func GetPubTemplateTitles ¶ added in v1.1.8
func GetPubTemplateTitles(clt *core.Client, ids string, page, count int) (total_count int64, list []*TemplateTitle, err error)
获取模板的keyword列表 id string 是 模板标题id,可通过接口获取,也可登录小程序后台查看获取
type WxaActionCateInfo ¶
type WxaCategory ¶
type WxaCategory struct { Id int `json:"id"` Name string `json:"name"` Father int `json:"father"` Level int `json:"level"` Children []int `json:"children"` SensitiveType int `json:"sensitive_type"` Qualify struct { ExterList []struct { InnerList []struct { Name string `json:"name"` Url string `json:"url"` } `json:"inner_list"` } `json:"exter_list"` } `json:"qualify"` }
func GetAllCategories ¶
func GetAllCategories(clt *core.Client) (list []*WxaCategory, err error)
获取所有可设置类目接口
type WxaCategoryInfo ¶
type WxaCategoryInfo struct { FirstClass string `json:"first_class"` SecondClass string `json:"second_class"` ThirdClass string `json:"third_class"` FirstId int `json:"first_id"` SecondId int `json:"second_id"` ThirdId int `json:"third_id"` }
func GetCategory ¶
func GetCategory(clt *core.Client) (list []*WxaCategoryInfo, err error)
获取当前小程序类目
type WxaInfo ¶
type WxaInfo struct { Appid string `json:"appid"` // 小程序gh_id AccountType int `json:"account_type"` //帐号类型(1:订阅号,2:服务号,3:小程序); PrincipalType int `json:"principal_type"` // 主体类型(1:企业) PrincipalName string `json:"principal_name"` // 主体名称 RealNameStatus int `json:"realname_status"` // 实名验证状态(1:实名验证成功,2:实名验证中,3:实名验证失败)调用接口1.1创建帐号时,realname_status会初始化为2对于注册方式为微信认证的帐号,资质认证成功时,realname_status会更新为1 注意!!!当realname_status不为1时,帐号只允许调用本文档内的以下API:(即无权限调用其他API) 微信认证相关接口(参考2.x) 帐号设置相关接口( WxVerifyInfo struct { QualificationVerify bool `json:"qualification_verify"` //是否资质认证(true:是,false:否)若是,拥有微信认证相关的权限 NamingVerify bool `json:"naming_verify"` // 是否名称认证(true:是,false:否)对于公众号(订阅号、服务号),是名称认证,微信客户端才会有微信认证打勾的标识 AnnualReview bool `json:"annual_review"` // 是否需要年审(true:是,false:否)(qualification_verify = true时才有该字段) AnnualReviewBeginTime int `json:"annual_review_begin_time"` // 年审开始时间,时间戳(qualification_verify = true时才有该字段) AnnualReviewEndTime int `json:"annual_review_end_time"` // 年审截止时间,时间戳(qualification_verify = true时才有该字段) } `json:"wx_verify_info"` SignatureInfo struct { Signature string `json:"signature"` // 功能介绍 ModifyUsedCount int `json:"modify_used_count"` // 功能介绍已使用修改次数(本月) ModifyQuota int `json:"modify_quota"` // 功能介绍修改次数总额度(本月) } `json:"signature_info"` HeadImageInfo struct { HeadImageUrl string `json:"head_image_url"` ModifyUsedCount int `json:"modify_used_count"` // 功能介绍已使用修改次数(本月) ModifyQuota int `json:"modify_quota"` // 功能介绍修改次数总额度(本月) } `json:"head_image_info"` }
type WxaItemInfo ¶
type WxaItemInfo struct { AppId string `json:"appid"` // 展示的公众号appid Nickname string `json:"nickname"` // 展示的公众号nickname Headimg string `json:"headimg"` // 展示的公众号头像 CanOpen int `json:"can_open"` // 是否可以设置 1 可以,0,不可以 IsOpen int `json:"is_open"` // 是否已经设置,1 已设置,0,未设置 }
func GetShowWxaItemList ¶
func GetShowWxaItemList(clt *core.Client, page, num int) (total int, list []*WxaItemInfo, err error)
获取可以用来设置的公众号列表
func QueryShowWxaItem ¶
func QueryShowWxaItem(clt *core.Client) (info *WxaItemInfo, err error)
获取展示的公众号信息
type WxaNameRequestInfo ¶
type WxaNameRequestInfo struct { NickName string `json:"nick_name"` // 昵称 IdCard string `json:"id_card"` // 身份证照片–临时素材mediaid 个人号必填 License string `json:"license"` // 组织机构代码证或营业执照–临时素材mediaid 组织号必填 NamingOtherStuff1 string `json:"naming_other_stuff_1"` // 其他证明材料---临时素材 mediaid 选填 NamingOtherStuff2 string `json:"naming_other_stuff_2"` // 其他证明材料---临时素材 mediaid 选填 }
type WxaNameResultInfo ¶
type WxaNameResultInfo struct { NickName string `json:"nickname"` // 昵称 AuditStat int `json:"audit_stat"` // 审核状态,1:审核中,2:审核失败,3:审核成功 FailReason string `json:"fail_reason"` // 失败原因 CreateTime int `json:"create_time"` // 审核提交时间 AuditTime int `json:"audit_time"` // 审核完成时间 }
func QuerySetNickStatus ¶
func QuerySetNickStatus(clt *core.Client, audit_id int) (info *WxaNameResultInfo, err error)
小程序改名
type WxaPageInfo ¶
type WxaPageInfo struct { Title string `json:"title"` Address string `json:"address"` Tag string `json:"tag"` WxaCategoryInfo }