tag

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package tag 标签管理

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TagError

type TagError struct {
	wechatgo.WXMsgError
	InvalidList  string `json:"invalidlist"`  // 非法的成员帐号列表
	InvalidParty []int  `json:"invalidparty"` // 非法的部门id列表
}

type TagInfo

type TagInfo struct {
	TagId   int    `json:"tagid"`   // 标签id
	TagName string `json:"tagname"` // 标签名
}

type UserInfo

type UserInfo struct {
	UserId string `json:"userid"` // 成员帐号
	Name   string `json:"name"`   // 成员名
}

type WechatTag

type WechatTag struct {
	Client *wecom.WechatClient
}

func NewWechatTag

func NewWechatTag(client *wecom.WechatClient) *WechatTag

func (WechatTag) AddUser

func (w WechatTag) AddUser(ctx context.Context, tagId int, userList []string, partyList []int) error

增加标签成员

参考文档:https://work.weixin.qq.com/api/doc#90000/90135/90214

func (WechatTag) Create

func (w WechatTag) Create(ctx context.Context, tagId int, tagName string) (id int, err error)

创建标签

参考文档:https://work.weixin.qq.com/api/doc#90000/90135/90210

func (WechatTag) Delete

func (w WechatTag) Delete(ctx context.Context, tagId int) error

删除标签

参考文档:https://work.weixin.qq.com/api/doc#90000/90135/90212

func (WechatTag) DeleteUser

func (w WechatTag) DeleteUser(ctx context.Context, tagId int, userList []string, partyList []int) error

删除标签成员

参考文档:https://work.weixin.qq.com/api/doc#90000/90135/90215

func (WechatTag) GetTagList

func (w WechatTag) GetTagList(ctx context.Context) (tagList []TagInfo, err error)

获取标签列表

参考文档:https://work.weixin.qq.com/api/doc#90000/90135/90216

func (WechatTag) GetUserList

func (w WechatTag) GetUserList(ctx context.Context, tagId int) (tagName string, userList []UserInfo, partyList []int, err error)

获取标签成员

参考文档:https://work.weixin.qq.com/api/doc#90000/90135/90213

func (WechatTag) Update

func (w WechatTag) Update(ctx context.Context, tagId int, tagName string) error

更新标签名字

参考文档:https://work.weixin.qq.com/api/doc#90000/90135/90211

Jump to

Keyboard shortcuts

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