tag

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchTag

func BatchTag(clt *core.Client, openIdList []string, tagId int) (err error)

BatchTag 批量打标签.

func BatchUntag

func BatchUntag(clt *core.Client, openIdList []string, tagId int) (err error)

BatchUntag 批量取消标签.

func Delete

func Delete(clt *core.Client, tagId int) (err error)

Delete 删除Tag.

func Update

func Update(clt *core.Client, tagId int, name string) (err error)

Update 修改Tag名.

Types

type GetResult

type GetResult struct {
	Count int `json:"count"` // 拉取的OPENID个数, 最大值为10000

	Data struct {
		OpenIdList []string `json:"openid,omitempty"`
	} `json:"data"` // 列表数据, OPENID的列表

	// 拉取列表的最后一个用户的OPENID, 如果 next_openid == "" 则表示没有了用户数据
	NextOpenId string `json:"next_openid"`
}

获取用户列表返回的数据结构

func TagGet

func TagGet(clt *core.Client, tagId int, nextOpenId string) (rslt *GetResult, err error)

TagGet 根据TagId获取用户列表.

NOTE: 每次最多能获取 10000 个用户, 可以多次指定 nextOpenId 来获取以满足需求, 如果 nextOpenId == "" 则表示从头获取

type Tag

type Tag struct {
	Id        int    `json:"id"`    // tag id
	Name      string `json:"name"`  // tag name
	UserCount int    `json:"count"` // Tag内用户数量
}

func Create

func Create(clt *core.Client, name string) (tag *Tag, err error)

func List

func List(clt *core.Client) (tags []Tag, err error)

List 查询所有Tag.

Jump to

Keyboard shortcuts

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