Documentation ¶
Overview ¶
Package category 类目管理
Index ¶
- func AddCategory(ctx *miniprogram.Miniprogram, payload []byte) (resp []byte, err error)
- func DeleteCategory(ctx *miniprogram.Miniprogram, payload []byte) (resp []byte, err error)
- func GetAllCategories(ctx *miniprogram.Miniprogram) (resp []byte, err error)
- func GetCategory(ctx *miniprogram.Miniprogram) (resp []byte, err error)
- func ModifyCategory(ctx *miniprogram.Miniprogram, payload []byte) (resp []byte, err error)
- func WxaCategory(ctx *miniprogram.Miniprogram) (resp []byte, err error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCategory ¶
func AddCategory(ctx *miniprogram.Miniprogram, payload []byte) (resp []byte, err error)
添加类目
调用本接口可以给小程序添加类目,添加的类目需要在所有可设置的类目列表中。使用过程中如遇到问题,可在开放平台服务商专区发帖交流。
POST https://api.weixin.qq.com/cgi-bin/wxopen/addcategory?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/Lead-NorthStar/miniprogram" "github.com/Lead-NorthStar/miniprogram/wxopen/apis/category" ) func main() { var ctx *miniprogram.Miniprogram payload := []byte("{}") resp, err := category.AddCategory(ctx, payload) fmt.Println(resp, err) }
Output:
func DeleteCategory ¶
func DeleteCategory(ctx *miniprogram.Miniprogram, payload []byte) (resp []byte, err error)
删除类目
调用本接口可以删除小程序的指定类目。使用过程中如遇到问题,可在开放平台服务商专区发帖交流。
POST https://api.weixin.qq.com/cgi-bin/wxopen/deletecategory?access_token=TOKEN
Example ¶
package main import ( "fmt" "github.com/Lead-NorthStar/miniprogram" "github.com/Lead-NorthStar/miniprogram/wxopen/apis/category" ) func main() { var ctx *miniprogram.Miniprogram payload := []byte("{}") resp, err := category.DeleteCategory(ctx, payload) fmt.Println(resp, err) }
Output:
func GetAllCategories ¶
func GetAllCategories(ctx *miniprogram.Miniprogram) (resp []byte, err error)
获取可以设置的所有类目
本接口可以获取该小程序允许设置的所有类目且仅支持获取一级类目和二级类目,注意不同主体所允许设置的类目不同。使用过程中如遇到问题,可在开放平台服务商专区发帖交流。
GET https://api.weixin.qq.com/cgi-bin/wxopen/getallcategories?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/Lead-NorthStar/miniprogram" "github.com/Lead-NorthStar/miniprogram/wxopen/apis/category" ) func main() { var ctx *miniprogram.Miniprogram resp, err := category.GetAllCategories(ctx) fmt.Println(resp, err) }
Output:
func GetCategory ¶
func GetCategory(ctx *miniprogram.Miniprogram) (resp []byte, err error)
获取已设置的所有类目
使用本接口获取小程序已设置的所有类目。使用过程中如遇到问题,可在开放平台服务商专区发帖交流。
GET https://api.weixin.qq.com/cgi-bin/wxopen/getcategory?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/Lead-NorthStar/miniprogram" "github.com/Lead-NorthStar/miniprogram/wxopen/apis/category" ) func main() { var ctx *miniprogram.Miniprogram resp, err := category.GetCategory(ctx) fmt.Println(resp, err) }
Output:
func ModifyCategory ¶
func ModifyCategory(ctx *miniprogram.Miniprogram, payload []byte) (resp []byte, err error)
修改类目资质信息
通过获取已设置的类目列表接口 可以获取当前小程序已设置的类目列表。如果某一下类目审核不通过需要补充或者修改资质信息,可以调用本接口进行处理。使用过程中如遇到问题,可在开放平台服务商专区发帖交流。
POST https://api.weixin.qq.com/cgi-bin/wxopen/modifycategory?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/Lead-NorthStar/miniprogram" "github.com/Lead-NorthStar/miniprogram/wxopen/apis/category" ) func main() { var ctx *miniprogram.Miniprogram payload := []byte("{}") resp, err := category.ModifyCategory(ctx, payload) fmt.Println(resp, err) }
Output:
func WxaCategory ¶
func WxaCategory(ctx *miniprogram.Miniprogram) (resp []byte, err error)
获取审核时可填写的类目信息
GET https://api.weixin.qq.com/wxa/get_category?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/Lead-NorthStar/miniprogram" "github.com/Lead-NorthStar/miniprogram/wxopen/apis/category" ) func main() { var ctx *miniprogram.Miniprogram resp, err := category.GetCategory(ctx) fmt.Println(resp, err) }
Output:
Types ¶
This section is empty.