Documentation
¶
Index ¶
- type AddTagUsersRequest
- type AddTagUsersResponse
- type BatchInviteRequest
- type BatchInviteResponse
- type Client
- func (r *Client) AddTagUsers(req *AddTagUsersRequest) (*AddTagUsersResponse, error)
- func (r *Client) BatchInvite(req *BatchInviteRequest) (*BatchInviteResponse, error)
- func (r *Client) ConvertToOpenID(userID string) (string, error)
- func (r *Client) ConvertToUserID(openID string) (string, error)
- func (r *Client) CreateTag(req *CreateTagRequest) (*CreateTagResponse, error)
- func (r *Client) DelTagUsers(req *DelTagUsersRequest) (*DelTagUsersResponse, error)
- func (r *Client) DeleteTag(tagID int) error
- func (r *Client) DepartmentCreate(req *DepartmentCreateRequest) (*DepartmentCreateResponse, error)
- func (r *Client) DepartmentDelete(departmentID int) error
- func (r *Client) DepartmentGet(departmentID int) (*Department, error)
- func (r *Client) DepartmentList() ([]*Department, error)
- func (r *Client) DepartmentListByID(departmentID int) ([]*Department, error)
- func (r *Client) DepartmentSimpleList(departmentID int) ([]*DepartmentID, error)
- func (r *Client) DepartmentUpdate(req *DepartmentUpdateRequest) error
- func (r *Client) GetJoinQrcode(req *GetJoinQrcodeRequest) (*GetJoinQrcodeResponse, error)
- func (r *Client) GetLinkedCorpUser(req *GetLinkedCorpUserRequest) (*GetLinkedCorpUserResponse, error)
- func (r *Client) GetPermList() (*GetPermListResponse, error)
- func (r *Client) GetTag(tagID int) (*GetTagResponse, error)
- func (r *Client) GetUserid(req *GetUseridRequest) (*GetUseridResponse, error)
- func (r *Client) GetUseridByEmail(req *GetUseridByEmailRequest) (*GetUseridResponse, error)
- func (r *Client) LinkedCorpDepartmentList(req *LinkedCorpDepartmentListRequest) (*LinkedCorpDepartmentListResponse, error)
- func (r *Client) LinkedCorpSimpleList(req *LinkedCorpSimpleListRequest) (*LinkedCorpSimpleListResponse, error)
- func (r *Client) LinkedCorpUserList(req *LinkedCorpUserListRequest) (*LinkedCorpUserListResponse, error)
- func (r *Client) ListTag() (*ListTagResponse, error)
- func (r *Client) UpdateTag(req *UpdateTagRequest) error
- func (r *Client) UserAuthSucc(userID string) error
- func (r *Client) UserBatchDelete(req *UserBatchDeleteRequest) error
- func (r *Client) UserCreate(req *UserCreateRequest) (*UserCreateResponse, error)
- func (r *Client) UserDelete(userID string) (*UserDeleteResponse, error)
- func (r *Client) UserGet(UserID string) (*UserGetResponse, error)
- func (r *Client) UserListID(req *UserListIDRequest) (*UserListIDResponse, error)
- func (r *Client) UserSimpleList(departmentID int) ([]*UserList, error)
- func (r *Client) UserUpdate(req *UserUpdateRequest) error
- type CreateTagRequest
- type CreateTagResponse
- type DelTagUsersRequest
- type DelTagUsersResponse
- type Department
- type DepartmentCreateRequest
- type DepartmentCreateResponse
- type DepartmentGetResponse
- type DepartmentID
- type DepartmentListResponse
- type DepartmentSimpleListResponse
- type DepartmentUpdateRequest
- type DeptUser
- type Extattr
- type ExtattrItem
- type ExtattrItemText
- type ExtattrItemWeb
- type ExternalProfile
- type ExternalProfileAttr
- type ExtraAttr
- type GetJoinQrcodeRequest
- type GetJoinQrcodeResponse
- type GetLinkedCorpUserRequest
- type GetLinkedCorpUserResponse
- type GetPermListResponse
- type GetTagResponse
- type GetTagUserList
- type GetUseridByEmailRequest
- type GetUseridRequest
- type GetUseridResponse
- type LinkedCorpDepartment
- type LinkedCorpDepartmentListRequest
- type LinkedCorpDepartmentListResponse
- type LinkedCorpSimpleListRequest
- type LinkedCorpSimpleListResponse
- type LinkedCorpUser
- type LinkedCorpUserInfo
- type LinkedCorpUserListRequest
- type LinkedCorpUserListResponse
- type ListTagResponse
- type Tag
- type UpdateTagRequest
- type UserBatchDeleteRequest
- type UserCreateRequest
- type UserCreateResponse
- type UserDeleteResponse
- type UserGetResponse
- type UserList
- type UserListIDRequest
- type UserListIDResponse
- type UserSimpleListResponse
- type UserUpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddTagUsersRequest ¶ added in v2.1.5
type AddTagUsersRequest struct {
TagID int `json:"tagid"`
UserList []string `json:"userlist"`
PartyList []int `json:"partylist"`
}
AddTagUsersRequest 增加标签成员请求
type AddTagUsersResponse ¶ added in v2.1.5
type AddTagUsersResponse struct {
util.CommonError
InvalidList string `json:"invalidlist"`
InvalidParty []int `json:"invalidparty"`
}
AddTagUsersResponse 增加标签成员响应
type BatchInviteRequest ¶ added in v2.1.12
type BatchInviteRequest struct {
User []string `json:"user"`
Party []int `json:"party"`
Tag []int `json:"tag"`
}
BatchInviteRequest 邀请成员请求
type BatchInviteResponse ¶ added in v2.1.12
type BatchInviteResponse struct {
util.CommonError
InvalidUser []string `json:"invaliduser"`
InvalidParty []int `json:"invalidparty"`
InvalidTag []int `json:"invalidtag"`
}
BatchInviteResponse 邀请成员响应
type Client ¶
Client 通讯录管理接口实例
func (*Client) AddTagUsers ¶ added in v2.1.5
func (r *Client) AddTagUsers(req *AddTagUsersRequest) (*AddTagUsersResponse, error)
AddTagUsers 增加标签成员 see https://developer.work.weixin.qq.com/document/path/90214
func (*Client) BatchInvite ¶ added in v2.1.12
func (r *Client) BatchInvite(req *BatchInviteRequest) (*BatchInviteResponse, error)
BatchInvite 邀请成员 see https://developer.work.weixin.qq.com/document/path/90975
func (*Client) ConvertToOpenID ¶ added in v2.1.5
ConvertToOpenID userID转openID see https://developer.work.weixin.qq.com/document/path/90202
func (*Client) ConvertToUserID ¶ added in v2.1.5
ConvertToUserID openID转userID see https://developer.work.weixin.qq.com/document/path/90202
func (*Client) CreateTag ¶ added in v2.1.5
func (r *Client) CreateTag(req *CreateTagRequest) (*CreateTagResponse, error)
CreateTag 创建标签 see https://developer.work.weixin.qq.com/document/path/90210
func (*Client) DelTagUsers ¶ added in v2.1.5
func (r *Client) DelTagUsers(req *DelTagUsersRequest) (*DelTagUsersResponse, error)
DelTagUsers 删除标签成员 see https://developer.work.weixin.qq.com/document/path/90215
func (*Client) DeleteTag ¶ added in v2.1.5
DeleteTag 删除标签 @see https://developer.work.weixin.qq.com/document/path/90212
func (*Client) DepartmentCreate ¶ added in v2.1.6
func (r *Client) DepartmentCreate(req *DepartmentCreateRequest) (*DepartmentCreateResponse, error)
DepartmentCreate 创建部门 see https://developer.work.weixin.qq.com/document/path/90205
func (*Client) DepartmentDelete ¶ added in v2.1.8
DepartmentDelete 删除部门 @see https://developer.work.weixin.qq.com/document/path/90207
func (*Client) DepartmentGet ¶ added in v2.1.6
func (r *Client) DepartmentGet(departmentID int) (*Department, error)
DepartmentGet 获取单个部门详情 see https://developer.work.weixin.qq.com/document/path/95351
func (*Client) DepartmentList ¶ added in v2.1.6
func (r *Client) DepartmentList() ([]*Department, error)
DepartmentList 获取部门列表 @desc https://developer.work.weixin.qq.com/document/path/90208
func (*Client) DepartmentListByID ¶ added in v2.1.6
func (r *Client) DepartmentListByID(departmentID int) ([]*Department, error)
DepartmentListByID 获取部门列表
departmentID 部门id。获取指定部门及其下的子部门(以及子部门的子部门等等,递归)
@desc https://developer.work.weixin.qq.com/document/path/90208
func (*Client) DepartmentSimpleList ¶
func (r *Client) DepartmentSimpleList(departmentID int) ([]*DepartmentID, error)
DepartmentSimpleList 获取子部门ID列表 see https://developer.work.weixin.qq.com/document/path/95350
func (*Client) DepartmentUpdate ¶ added in v2.1.8
func (r *Client) DepartmentUpdate(req *DepartmentUpdateRequest) error
DepartmentUpdate 更新部门 see https://developer.work.weixin.qq.com/document/path/90206
func (*Client) GetJoinQrcode ¶ added in v2.1.12
func (r *Client) GetJoinQrcode(req *GetJoinQrcodeRequest) (*GetJoinQrcodeResponse, error)
GetJoinQrcode 获取加入企业二维码 see https://developer.work.weixin.qq.com/document/path/91714
func (*Client) GetLinkedCorpUser ¶ added in v2.1.6
func (r *Client) GetLinkedCorpUser(req *GetLinkedCorpUserRequest) (*GetLinkedCorpUserResponse, error)
GetLinkedCorpUser 获取互联企业成员详细信息 see https://developer.work.weixin.qq.com/document/path/93171
func (*Client) GetPermList ¶ added in v2.1.6
func (r *Client) GetPermList() (*GetPermListResponse, error)
GetPermList 获取应用的可见范围 see https://developer.work.weixin.qq.com/document/path/93172
func (*Client) GetTag ¶ added in v2.1.5
func (r *Client) GetTag(tagID int) (*GetTagResponse, error)
GetTag 获取标签成员 @see https://developer.work.weixin.qq.com/document/path/90213
func (*Client) GetUserid ¶ added in v2.1.12
func (r *Client) GetUserid(req *GetUseridRequest) (*GetUseridResponse, error)
GetUserid 手机号获取userid see https://developer.work.weixin.qq.com/document/path/95402
func (*Client) GetUseridByEmail ¶ added in v2.1.12
func (r *Client) GetUseridByEmail(req *GetUseridByEmailRequest) (*GetUseridResponse, error)
GetUseridByEmail 邮箱获取userid see https://developer.work.weixin.qq.com/document/path/95895
func (*Client) LinkedCorpDepartmentList ¶ added in v2.1.6
func (r *Client) LinkedCorpDepartmentList(req *LinkedCorpDepartmentListRequest) (*LinkedCorpDepartmentListResponse, error)
LinkedCorpDepartmentList 获取互联企业部门列表 see https://developer.work.weixin.qq.com/document/path/93170
func (*Client) LinkedCorpSimpleList ¶ added in v2.1.6
func (r *Client) LinkedCorpSimpleList(req *LinkedCorpSimpleListRequest) (*LinkedCorpSimpleListResponse, error)
LinkedCorpSimpleList 获取互联企业部门成员 see https://developer.work.weixin.qq.com/document/path/93168
func (*Client) LinkedCorpUserList ¶ added in v2.1.6
func (r *Client) LinkedCorpUserList(req *LinkedCorpUserListRequest) (*LinkedCorpUserListResponse, error)
LinkedCorpUserList 获取互联企业部门成员详情 see https://developer.work.weixin.qq.com/document/path/93169
func (*Client) ListTag ¶ added in v2.1.5
func (r *Client) ListTag() (*ListTagResponse, error)
ListTag 获取标签列表 @see https://developer.work.weixin.qq.com/document/path/90216
func (*Client) UpdateTag ¶ added in v2.1.5
func (r *Client) UpdateTag(req *UpdateTagRequest) error
UpdateTag 更新标签名字 see https://developer.work.weixin.qq.com/document/path/90211
func (*Client) UserAuthSucc ¶ added in v2.1.12
UserAuthSucc 登录二次验证 @see https://developer.work.weixin.qq.com/document/path/90203
func (*Client) UserBatchDelete ¶ added in v2.1.12
func (r *Client) UserBatchDelete(req *UserBatchDeleteRequest) error
UserBatchDelete 批量删除成员 see https://developer.work.weixin.qq.com/document/path/90199
func (*Client) UserCreate ¶ added in v2.1.6
func (r *Client) UserCreate(req *UserCreateRequest) (*UserCreateResponse, error)
UserCreate 创建成员 @see https://developer.work.weixin.qq.com/document/path/90195
func (*Client) UserDelete ¶ added in v2.1.6
func (r *Client) UserDelete(userID string) (*UserDeleteResponse, error)
UserDelete 删除成员 @see https://developer.work.weixin.qq.com/document/path/90334
func (*Client) UserGet ¶
func (r *Client) UserGet(UserID string) (*UserGetResponse, error)
UserGet 读取成员 @see https://developer.work.weixin.qq.com/document/path/90196
func (*Client) UserListID ¶ added in v2.1.5
func (r *Client) UserListID(req *UserListIDRequest) (*UserListIDResponse, error)
UserListID 获取成员ID列表 see https://developer.work.weixin.qq.com/document/path/96067
func (*Client) UserSimpleList ¶
UserSimpleList 获取部门成员 @see https://developer.work.weixin.qq.com/document/path/90200
func (*Client) UserUpdate ¶ added in v2.1.8
func (r *Client) UserUpdate(req *UserUpdateRequest) error
UserUpdate 更新成员 see https://developer.work.weixin.qq.com/document/path/90197
type CreateTagRequest ¶ added in v2.1.5
CreateTagRequest 创建标签请求
type CreateTagResponse ¶ added in v2.1.5
type CreateTagResponse struct {
util.CommonError
TagID int `json:"tagid"`
}
CreateTagResponse 创建标签响应
type DelTagUsersRequest ¶ added in v2.1.5
type DelTagUsersRequest struct {
TagID int `json:"tagid"`
UserList []string `json:"userlist"`
PartyList []int `json:"partylist"`
}
DelTagUsersRequest 删除标签成员请求
type DelTagUsersResponse ¶ added in v2.1.5
type DelTagUsersResponse struct {
util.CommonError
InvalidList string `json:"invalidlist"`
InvalidParty []int `json:"invalidparty"`
}
DelTagUsersResponse 删除标签成员响应
type Department ¶ added in v2.1.6
type Department struct {
ID int `json:"id"` // 创建的部门id
Name string `json:"name"` // 部门名称
NameEn string `json:"name_en"` // 英文名称
DepartmentLeader []string `json:"department_leader"` // 部门负责人的UserID
ParentID int `json:"parentid"` // 父部门id。根部门为1
Order int `json:"order"` // 在父部门中的次序值。order值大的排序靠前
}
Department 部门列表数据
type DepartmentCreateRequest ¶ added in v2.1.6
type DepartmentCreateRequest struct {
Name string `json:"name"`
NameEn string `json:"name_en,omitempty"`
ParentID int `json:"parentid"`
Order int `json:"order,omitempty"`
ID int `json:"id,omitempty"`
}
DepartmentCreateRequest 创建部门数据请求
type DepartmentCreateResponse ¶ added in v2.1.6
type DepartmentCreateResponse struct {
util.CommonError
ID int `json:"id"`
}
DepartmentCreateResponse 创建部门数据响应
type DepartmentGetResponse ¶ added in v2.1.6
type DepartmentGetResponse struct {
util.CommonError
Department Department `json:"department"`
}
DepartmentGetResponse 获取单个部门详情
type DepartmentID ¶
type DepartmentID struct {
ID int `json:"id"`
ParentID int `json:"parentid"`
Order int `json:"order"`
}
DepartmentID 子部门ID
type DepartmentListResponse ¶ added in v2.1.6
type DepartmentListResponse struct {
util.CommonError
Department []*Department `json:"department"`
}
DepartmentListResponse 获取部门列表响应
type DepartmentSimpleListResponse ¶
type DepartmentSimpleListResponse struct {
util.CommonError
DepartmentID []*DepartmentID `json:"department_id"`
}
DepartmentSimpleListResponse 获取子部门ID列表响应
type DepartmentUpdateRequest ¶ added in v2.1.8
type DepartmentUpdateRequest struct {
ID int `json:"id"`
Name string `json:"name,omitempty"`
NameEn string `json:"name_en,omitempty"`
ParentID int `json:"parentid,omitempty"`
Order int `json:"order,omitempty"`
}
DepartmentUpdateRequest 更新部门请求
type Extattr ¶ added in v2.1.6
type Extattr struct {
Attrs []ExtattrItem `json:"attrs"`
}
Extattr 互联企业成员详细信息扩展属性
type ExtattrItem ¶ added in v2.1.6
type ExtattrItem struct {
Name string `json:"name"`
Value string `json:"value,omitempty"`
Type int `json:"type"`
Text ExtattrItemText `json:"text,omitempty"`
Web ExtattrItemWeb `json:"web,omitempty"`
}
ExtattrItem 互联企业成员详细信息扩展属性条目
type ExtattrItemText ¶ added in v2.1.6
type ExtattrItemText struct {
Value string `json:"value"`
}
ExtattrItemText 互联企业成员详细信息自定义属性(文本)
type ExtattrItemWeb ¶ added in v2.1.6
ExtattrItemWeb 互联企业成员详细信息自定义属性(网页)
type ExternalProfile ¶ added in v2.1.6
type ExternalProfile struct {
ExternalCorpName string `json:"external_corp_name"`
WechatChannels struct {
Nickname string `json:"nickname"`
Status int `json:"status"`
} `json:"wechat_channels"`
ExternalAttr []ExternalProfileAttr `json:"external_attr"`
}
ExternalProfile 成员对外信息
type ExternalProfileAttr ¶ added in v2.1.6
type ExternalProfileAttr struct {
Type int `json:"type"`
Name string `json:"name"`
Text struct {
Value string `json:"value"`
} `json:"text,omitempty"`
Web struct {
URL string `json:"url"`
Title string `json:"title"`
} `json:"web,omitempty"`
Miniprogram struct {
Appid string `json:"appid"`
Pagepath string `json:"pagepath"`
Title string `json:"title"`
} `json:"miniprogram,omitempty"`
}
ExternalProfileAttr 成员对外信息属性
type ExtraAttr ¶ added in v2.1.6
type ExtraAttr struct {
Type int `json:"type"`
Name string `json:"name"`
Text struct {
Value string `json:"value"`
} `json:"text,omitempty"`
Web struct {
URL string `json:"url"`
Title string `json:"title"`
} `json:"web,omitempty"`
}
ExtraAttr 扩展属性
type GetJoinQrcodeRequest ¶ added in v2.1.12
type GetJoinQrcodeRequest struct {
SizeType int `json:"size_type"`
}
GetJoinQrcodeRequest 获取加入企业二维码请求
type GetJoinQrcodeResponse ¶ added in v2.1.12
type GetJoinQrcodeResponse struct {
util.CommonError
JoinQrcode string `json:"join_qrcode"`
}
GetJoinQrcodeResponse 获取加入企业二维码响应
type GetLinkedCorpUserRequest ¶ added in v2.1.6
type GetLinkedCorpUserRequest struct {
UserID string `json:"userid"`
}
GetLinkedCorpUserRequest 获取互联企业成员详细信息请求
type GetLinkedCorpUserResponse ¶ added in v2.1.6
type GetLinkedCorpUserResponse struct {
util.CommonError
UserInfo LinkedCorpUserInfo `json:"user_info"`
}
GetLinkedCorpUserResponse 获取互联企业成员详细信息响应
type GetPermListResponse ¶ added in v2.1.6
type GetPermListResponse struct {
util.CommonError
UserIDs []string `json:"userids"`
DepartmentIDs []string `json:"department_ids"`
}
GetPermListResponse 获取应用的可见范围响应
type GetTagResponse ¶ added in v2.1.5
type GetTagResponse struct {
util.CommonError
TagName string `json:"tagname"`
UserList []GetTagUserList `json:"userlist"`
PartyList []int `json:"partylist"`
}
GetTagResponse 获取标签成员响应
type GetTagUserList ¶ added in v2.1.5
GetTagUserList 标签中包含的成员列表
type GetUseridByEmailRequest ¶ added in v2.1.12
type GetUseridByEmailRequest struct {
Email string `json:"email"`
EmailType int `json:"email_type,omitempty"`
}
GetUseridByEmailRequest 邮箱获取userid请求
type GetUseridRequest ¶ added in v2.1.12
type GetUseridRequest struct {
Mobile string `json:"mobile"`
}
GetUseridRequest 手机号获取userid请求
type GetUseridResponse ¶ added in v2.1.12
type GetUseridResponse struct {
util.CommonError
Userid string `json:"userid"`
}
GetUseridResponse 获取userid响应
type LinkedCorpDepartment ¶ added in v2.1.6
type LinkedCorpDepartment struct {
DepartmentID string `json:"department_id"`
DepartmentName string `json:"department_name"`
ParentID string `json:"parentid"`
Order int `json:"order"`
}
LinkedCorpDepartment 互联企业部门
type LinkedCorpDepartmentListRequest ¶ added in v2.1.6
type LinkedCorpDepartmentListRequest struct {
DepartmentID string `json:"department_id"`
}
LinkedCorpDepartmentListRequest 获取互联企业部门列表请求
type LinkedCorpDepartmentListResponse ¶ added in v2.1.6
type LinkedCorpDepartmentListResponse struct {
util.CommonError
DepartmentList []LinkedCorpDepartment `json:"department_list"`
}
LinkedCorpDepartmentListResponse 获取互联企业部门列表响应
type LinkedCorpSimpleListRequest ¶ added in v2.1.6
type LinkedCorpSimpleListRequest struct {
DepartmentID string `json:"department_id"`
}
LinkedCorpSimpleListRequest 获取互联企业部门成员请求
type LinkedCorpSimpleListResponse ¶ added in v2.1.6
type LinkedCorpSimpleListResponse struct {
util.CommonError
Userlist []LinkedCorpUser `json:"userlist"`
}
LinkedCorpSimpleListResponse 获取互联企业部门成员响应
type LinkedCorpUser ¶ added in v2.1.6
type LinkedCorpUser struct {
UserID string `json:"userid"`
Name string `json:"name"`
Department []string `json:"department"`
CorpID string `json:"corpid"`
}
LinkedCorpUser 企业部门成员
type LinkedCorpUserInfo ¶ added in v2.1.6
type LinkedCorpUserInfo struct {
UserID string `json:"userid"`
Name string `json:"name"`
Department []string `json:"department"`
Mobile string `json:"mobile"`
Telephone string `json:"telephone"`
Email string `json:"email"`
Position string `json:"position"`
CorpID string `json:"corpid"`
Extattr Extattr `json:"extattr"`
}
LinkedCorpUserInfo 互联企业成员详细信息
type LinkedCorpUserListRequest ¶ added in v2.1.6
type LinkedCorpUserListRequest struct {
DepartmentID string `json:"department_id"`
}
LinkedCorpUserListRequest 获取互联企业部门成员详情请求
type LinkedCorpUserListResponse ¶ added in v2.1.6
type LinkedCorpUserListResponse struct {
util.CommonError
UserList []LinkedCorpUserInfo `json:"userlist"`
}
LinkedCorpUserListResponse 获取互联企业部门成员详情响应
type ListTagResponse ¶ added in v2.1.5
type ListTagResponse struct {
util.CommonError
TagList []Tag `json:"taglist"`
}
ListTagResponse 获取标签列表响应
type UpdateTagRequest ¶ added in v2.1.5
UpdateTagRequest 更新标签名字请求
type UserBatchDeleteRequest ¶ added in v2.1.12
type UserBatchDeleteRequest struct {
UseridList []string `json:"useridlist"`
}
UserBatchDeleteRequest 批量删除成员请求
type UserCreateRequest ¶ added in v2.1.6
type UserCreateRequest struct {
UserID string `json:"userid"`
Name string `json:"name"`
Alias string `json:"alias"`
Mobile string `json:"mobile"`
Department []int `json:"department"`
Order []int `json:"order"`
Position string `json:"position"`
Gender int `json:"gender"`
Email string `json:"email"`
BizMail string `json:"biz_mail"`
IsLeaderInDept []int `json:"is_leader_in_dept"`
DirectLeader []string `json:"direct_leader"`
Enable int `json:"enable"`
AvatarMediaid string `json:"avatar_mediaid"`
Telephone string `json:"telephone"`
Address string `json:"address"`
MainDepartment int `json:"main_department"`
Extattr struct {
Attrs []ExtraAttr `json:"attrs"`
} `json:"extattr"`
ToInvite bool `json:"to_invite"`
ExternalPosition string `json:"external_position"`
ExternalProfile ExternalProfile `json:"external_profile"`
}
UserCreateRequest 创建成员数据请求
type UserCreateResponse ¶ added in v2.1.6
type UserCreateResponse struct {
util.CommonError
}
UserCreateResponse 创建成员数据响应
type UserDeleteResponse ¶ added in v2.1.6
type UserDeleteResponse struct {
util.CommonError
}
UserDeleteResponse 删除成员数据响应
type UserGetResponse ¶
type UserGetResponse struct {
util.CommonError
UserID string `json:"userid"` // 成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节;第三方应用返回的值为open_userid
Name string `json:"name"` // 成员名称;第三方不可获取,调用时返回userid以代替name;代开发自建应用需要管理员授权才返回;对于非第三方创建的成员,第三方通讯录应用也不可获取;未返回name的情况需要通过通讯录展示组件来展示名字
Department []int `json:"department"` // 成员所属部门id列表,仅返回该应用有查看权限的部门id;成员授权模式下,固定返回根部门id,即固定为1。对授权了“组织架构信息”权限的第三方应用,返回成员所属的全部部门id
Order []int `json:"order"` // 部门内的排序值,默认为0。数量必须和department一致,数值越大排序越前面。值范围是[0, 2^32)。成员授权模式下不返回该字段
Position string `json:"position"` // 职务信息;代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取;上游企业不可获取下游企业成员该字段
Mobile string `json:"mobile"` // 手机号码,代开发自建应用需要管理员授权且成员oauth2授权获取;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取;上游企业不可获取下游企业成员该字段
Gender string `json:"gender"` // 性别。0表示未定义,1表示男性,2表示女性。代开发自建应用需要管理员授权且成员oauth2授权获取;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取;上游企业不可获取下游企业成员该字段。注:不可获取指返回值0
Email string `json:"email"` // 邮箱,代开发自建应用需要管理员授权且成员oauth2授权获取;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取;上游企业不可获取下游企业成员该字段
BizMail string `json:"biz_mail"` // 企业邮箱,代开发自建应用需要管理员授权且成员oauth2授权获取;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取;上游企业不可获取下游企业成员该字段
IsLeaderInDept []int `json:"is_leader_in_dept"` // 表示在所在的部门内是否为部门负责人,数量与department一致;第三方通讯录应用或者授权了“组织架构信息-应用可获取企业的部门组织架构信息-部门负责人”权限的第三方应用可获取;对于非第三方创建的成员,第三方通讯录应用不可获取;上游企业不可获取下游企业成员该字段
DirectLeader []string `json:"direct_leader"` // 直属上级UserID,返回在应用可见范围内的直属上级列表,最多有五个直属上级;第三方通讯录应用或者授权了“组织架构信息-应用可获取可见范围内成员组织架构信息-直属上级”权限的第三方应用可获取;对于非第三方创建的成员,第三方通讯录应用不可获取;上游企业不可获取下游企业成员该字段;代开发自建应用不可获取该字段
Avatar string `json:"avatar"` // 头像url。 代开发自建应用需要管理员授权且成员oauth2授权获取;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取;上游企业不可获取下游企业成员该字段
ThumbAvatar string `json:"thumb_avatar"` // 头像缩略图url。第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取;上游企业不可获取下游企业成员该字段
Telephone string `json:"telephone"` // 座机。代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取;上游企业不可获取下游企业成员该字段
Alias string `json:"alias"` // 别名;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取;上游企业不可获取下游企业成员该字段
Address string `json:"address"` // 地址。代开发自建应用需要管理员授权且成员oauth2授权获取;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取;上游企业不可获取下游企业成员该字段
OpenUserid string `json:"open_userid"` // 全局唯一。对于同一个服务商,不同应用获取到企业内同一个成员的open_userid是相同的,最多64个字节。仅第三方应用可获取
MainDepartment int `json:"main_department"` // 主部门,仅当应用对主部门有查看权限时返回。
Extattr struct {
Attrs []struct {
Type int `json:"type"`
Name string `json:"name"`
Text struct {
Value string `json:"value"`
} `json:"text,omitempty"`
Web struct {
URL string `json:"url"`
Title string `json:"title"`
} `json:"web,omitempty"`
} `json:"attrs"`
} `json:"extattr"` // 扩展属性,代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取;上游企业不可获取下游企业成员该字段
Status int `json:"status"` // 激活状态: 1=已激活,2=已禁用,4=未激活,5=退出企业。 已激活代表已激活企业微信或已关注微信插件(原企业号)。未激活代表既未激活企业微信又未关注微信插件(原企业号)。
QrCode string `json:"qr_code"` // 员工个人二维码,扫描可添加为外部联系人(注意返回的是一个url,可在浏览器上打开该url以展示二维码);代开发自建应用需要管理员授权且成员oauth2授权获取;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取;上游企业不可获取下游企业成员该字段
ExternalPosition string `json:"external_position"` // 对外职务,如果设置了该值,则以此作为对外展示的职务,否则以position来展示。代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取;上游企业不可获取下游企业成员该字段
ExternalProfile struct {
ExternalCorpName string `json:"external_corp_name"`
WechatChannels struct {
Nickname string `json:"nickname"`
Status int `json:"status"`
} `json:"wechat_channels"`
ExternalAttr []struct {
Type int `json:"type"`
Name string `json:"name"`
Text struct {
Value string `json:"value"`
} `json:"text,omitempty"`
Web struct {
URL string `json:"url"`
Title string `json:"title"`
} `json:"web,omitempty"`
Miniprogram struct {
Appid string `json:"appid"`
Pagepath string `json:"pagepath"`
Title string `json:"title"`
} `json:"miniprogram,omitempty"`
} `json:"external_attr"`
} `json:"external_profile"` // 成员对外属性,字段详情见对外属性;代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取;上游企业不可获取下游企业成员该字段
}
UserGetResponse 获取部门成员响应
type UserList ¶
type UserList struct {
UserID string `json:"userid"`
Name string `json:"name"`
Department []int `json:"department"`
OpenUserID string `json:"open_userid"`
}
UserList 部门成员
type UserListIDRequest ¶ added in v2.1.5
UserListIDRequest 获取成员ID列表请求
type UserListIDResponse ¶ added in v2.1.5
type UserListIDResponse struct {
util.CommonError
NextCursor string `json:"next_cursor"`
DeptUser []*DeptUser `json:"dept_user"`
}
UserListIDResponse 获取成员ID列表响应
type UserSimpleListResponse ¶
type UserSimpleListResponse struct {
util.CommonError
UserList []*UserList
}
UserSimpleListResponse 获取部门成员响应
type UserUpdateRequest ¶ added in v2.1.8
type UserUpdateRequest struct {
UserID string `json:"userid"`
NewUserID string `json:"new_userid"`
Name string `json:"name"`
Alias string `json:"alias"`
Mobile string `json:"mobile"`
Department []int `json:"department"`
Order []int `json:"order"`
Position string `json:"position"`
Gender int `json:"gender"`
Email string `json:"email"`
BizMail string `json:"biz_mail"`
BizMailAlias struct {
Item []string `json:"item"`
} `json:"biz_mail_alias"`
IsLeaderInDept []int `json:"is_leader_in_dept"`
DirectLeader []string `json:"direct_leader"`
Enable int `json:"enable"`
AvatarMediaid string `json:"avatar_mediaid"`
Telephone string `json:"telephone"`
Address string `json:"address"`
MainDepartment int `json:"main_department"`
Extattr struct {
Attrs []ExtraAttr `json:"attrs"`
} `json:"extattr"`
ToInvite bool `json:"to_invite"`
ExternalPosition string `json:"external_position"`
ExternalProfile ExternalProfile `json:"external_profile"`
}
UserUpdateRequest 更新成员请求