group

package
v1.0.0-beta.10 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package group 微信小店/分组管理

Index

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.

Jump to

Keyboard shortcuts

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