contacts

package
v0.0.0-...-a0c205e Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attrs

type Attrs struct {
	Type int    `json:"type"`
	Name string `json:"name"`
	Text Text   `json:"text"`
	Web  Web    `json:"web"`
}

type Extattr

type Extattr struct {
	Attrs []Attrs `json:"attrs"`
}

Extattr 扩展字段

type ExternalAttr

type ExternalAttr struct {
	Type        int         `json:"type"`
	Name        string      `json:"name"`
	Text        Text        `json:"text"`
	Web         Web         `json:"web"`
	MiniProgram MiniProgram `json:"miniprogram"`
}

type ExternalProfile

type ExternalProfile struct {
	ExternalCorpName string         `json:"external_corp_name"`
	WechatChannels   WechatChannels `json:"wechat_channels"` // 视频号
	ExternalAttr     []ExternalAttr `json:"external_attr"`
}

type Info

type Info struct {
	ErrCode          int             `json:"errcode"`
	ErrMsg           string          `json:"errmsg"`
	Userid           string          `json:"userid"`
	Name             string          `json:"name"`
	Department       []int           `json:"department"`
	Order            []int           `json:"order"`
	Position         string          `json:"position"`
	Mobile           string          `json:"mobile"`
	Gender           string          `json:"gender"`
	Email            string          `json:"email"`
	IsLeaderInDept   []int           `json:"is_leader_in_dept"`
	Avatar           string          `json:"avatar"`
	ThumbAvatar      string          `json:"thumb_avatar"`
	Telephone        string          `json:"telephone"`
	Alias            string          `json:"alias"`
	Address          string          `json:"address"`
	OpenUserid       string          `json:"open_userid"`
	MainDepartment   int             `json:"main_department"`
	ExtAttr          Extattr         `json:"extattr"` // 扩展属性,第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Status           int             `json:"status"`
	QrCode           string          `json:"qr_code"`
	ExternalPosition string          `json:"external_position"`
	ExternalProfile  ExternalProfile `json:"external_profile"` // 成员对外属性,字段详情见对外属性;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Enable           int             `json:"enable"`           // 启用/禁用成员。1表示启用成员,0表示禁用成员
	HideMobile       int             `json:"hide_mobile"`      // 是否隐藏手机 0-显示 1-隐藏
	Isleader         int             `json:"isleader"`         // 是否是领导 0: 不是 1: 是
}

Info 成员基本信息

type MiniProgram

type MiniProgram struct {
	AppId    string `json:"appid"`
	Title    string `json:"title"`
	PagePath string `json:"pagepath"`
}

type Text

type Text struct {
	Value string `json:"value"`
}

type User

type User struct {
	*context.Context
}

User 成员管理

func NewUser

func NewUser(context *context.Context) *User

NewUser 实例化成员管理

func (*User) GetUserInfo

func (user *User) GetUserInfo(userId string) (userInfo *Info, err error)

GetUserInfo 添加成员

type Web

type Web struct {
	Url   string `json:"url"`
	Title string `json:"title"`
}

type WechatChannels

type WechatChannels struct {
	Nickname string `json:"nickname"`
	Status   int    `json:"status"`
}

WechatChannels 视频号

Jump to

Keyboard shortcuts

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