Documentation ¶
Overview ¶
Package group 微信小店/分组管理
Index ¶
- func Add(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
- func Del(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
- func GetAll(ctx *offiaccount.OffiAccount) (resp []byte, err error)
- func GetById(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
- func ProductMod(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
- func PropertyMod(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
增加分组
See: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html
POST https://api.weixin.qq.com/merchant/group/add?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/group" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := group.Add(ctx, payload) fmt.Println(resp, err) }
Output:
func Del ¶
func Del(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
删除分组
See: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html
POST https://api.weixin.qq.com/merchant/group/del?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/group" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := group.Del(ctx, payload) fmt.Println(resp, err) }
Output:
func GetAll ¶
func GetAll(ctx *offiaccount.OffiAccount) (resp []byte, err error)
获取所有分组
See: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html
GET https://api.weixin.qq.com/merchant/group/getall?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/group" ) func main() { var ctx *offiaccount.OffiAccount resp, err := group.GetAll(ctx) fmt.Println(resp, err) }
Output:
func GetById ¶
func GetById(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
根据分组ID获取分组信息
See: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html
POST https://api.weixin.qq.com/merchant/group/getbyid?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/group" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := group.GetById(ctx, payload) fmt.Println(resp, err) }
Output:
func ProductMod ¶
func ProductMod(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
修改分组商品
See: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html
POST https://api.weixin.qq.com/merchant/group/productmod?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/group" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := group.ProductMod(ctx, payload) fmt.Println(resp, err) }
Output:
func PropertyMod ¶
func PropertyMod(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
修改分组属性
See: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html
POST https://api.weixin.qq.com/merchant/group/propertymod?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/group" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := group.PropertyMod(ctx, payload) fmt.Println(resp, err) }
Output:
Types ¶
This section is empty.