Documentation ¶
Overview ¶
Package shelf 微信小店/货架管理
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 Mod(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/shelf/add?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/shelf" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := shelf.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/shelf/del?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/shelf" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := shelf.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/shelf/getall?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/shelf" ) func main() { var ctx *offiaccount.OffiAccount resp, err := shelf.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/shelf/getbyid?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/shelf" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := shelf.GetById(ctx, payload) fmt.Println(resp, err) }
Output:
func Mod ¶
func Mod(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/shelf/mod?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/shelf" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := shelf.Mod(ctx, payload) fmt.Println(resp, err) }
Output:
Types ¶
This section is empty.