给三方IM添加源官方地址链接 (#42)
This commit is contained in:
parent
7deb1ce0e8
commit
91194b04a9
|
@ -114,6 +114,7 @@ wecom:
|
||||||
corp-secret: "xxxxx" # 企业微信中创建的应用secret
|
corp-secret: "xxxxx" # 企业微信中创建的应用secret
|
||||||
enable-sync: false # 是否开启定时同步企业微信的任务
|
enable-sync: false # 是否开启定时同步企业微信的任务
|
||||||
feishu:
|
feishu:
|
||||||
|
# 配置获取详细文档参考:http://ldapdoc.eryajf.net/pages/83c90b/
|
||||||
flag: "feishu" # 作为飞书在平台的标识
|
flag: "feishu" # 作为飞书在平台的标识
|
||||||
app-id: "xxxxxxx" # 飞书的app-id
|
app-id: "xxxxxxx" # 飞书的app-id
|
||||||
app-secret: "xxxxxxxxxxx" # 飞书的app-secret
|
app-secret: "xxxxxxxxxxx" # 飞书的app-secret
|
|
@ -7,6 +7,8 @@ import (
|
||||||
"github.com/zhaoyunxing92/dingtalk/v2/request"
|
"github.com/zhaoyunxing92/dingtalk/v2/request"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 官方文档地址: https://open.dingtalk.com/document/orgapp-server/obtain-the-department-list
|
||||||
|
// GetAllDepts 获取所有部门
|
||||||
func GetAllDepts(deptId int) (result []*DingTalkDept, err error) {
|
func GetAllDepts(deptId int) (result []*DingTalkDept, err error) {
|
||||||
depts, err := InitDingTalkClient().FetchDeptList(deptId, true, "zh_CN")
|
depts, err := InitDingTalkClient().FetchDeptList(deptId, true, "zh_CN")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -24,6 +26,8 @@ func GetAllDepts(deptId int) (result []*DingTalkDept, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 官方文档地址: https://open.dingtalk.com/document/orgapp-server/queries-the-complete-information-of-a-department-user
|
||||||
|
// GetAllUsers 获取所有员工信息
|
||||||
func GetAllUsers() (result []*DingTalkUser, err error) {
|
func GetAllUsers() (result []*DingTalkUser, err error) {
|
||||||
depts, err := GetAllDepts(1)
|
depts, err := GetAllDepts(1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -82,6 +86,7 @@ func GetAllUsers() (result []*DingTalkUser, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 官方文档:https://open.dingtalk.com/document/orgapp-server/intelligent-personnel-query-company-turnover-list
|
||||||
// GetLeaveUserIds 获取离职人员ID列表
|
// GetLeaveUserIds 获取离职人员ID列表
|
||||||
func GetLeaveUserIds() ([]string, error) {
|
func GetLeaveUserIds() ([]string, error) {
|
||||||
var ids []string
|
var ids []string
|
||||||
|
|
|
@ -6,6 +6,7 @@ import (
|
||||||
"github.com/chyroc/lark"
|
"github.com/chyroc/lark"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 官方文档: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/children
|
||||||
// GetAllDepts 获取所有部门
|
// GetAllDepts 获取所有部门
|
||||||
func GetAllDepts() (depts []*lark.GetDepartmentListRespItem, err error) {
|
func GetAllDepts() (depts []*lark.GetDepartmentListRespItem, err error) {
|
||||||
var (
|
var (
|
||||||
|
@ -32,6 +33,7 @@ func GetAllDepts() (depts []*lark.GetDepartmentListRespItem, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 官方文档: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/find_by_department
|
||||||
// GetAllUsers 获取所有员工信息
|
// GetAllUsers 获取所有员工信息
|
||||||
func GetAllUsers() (users []*lark.GetUserListRespItem, err error) {
|
func GetAllUsers() (users []*lark.GetUserListRespItem, err error) {
|
||||||
var (
|
var (
|
||||||
|
@ -62,6 +64,7 @@ func GetAllUsers() (users []*lark.GetUserListRespItem, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 官方文档: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/ehr/ehr-v1/employee/list
|
||||||
// GetLeaveUserIds 获取离职人员ID列表
|
// GetLeaveUserIds 获取离职人员ID列表
|
||||||
func GetLeaveUserIds() ([]string, error) {
|
func GetLeaveUserIds() ([]string, error) {
|
||||||
var ids []string
|
var ids []string
|
||||||
|
|
|
@ -6,6 +6,7 @@ import (
|
||||||
"github.com/wenerme/go-wecom/wecom"
|
"github.com/wenerme/go-wecom/wecom"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 官方文档: https://developer.work.weixin.qq.com/document/path/90208
|
||||||
// GetAllDepts 获取所有部门
|
// GetAllDepts 获取所有部门
|
||||||
func GetAllDepts() ([]wecom.ListDepartmentResponseItem, error) {
|
func GetAllDepts() ([]wecom.ListDepartmentResponseItem, error) {
|
||||||
depts, err := InitWeComClient().ListDepartment(
|
depts, err := InitWeComClient().ListDepartment(
|
||||||
|
@ -17,6 +18,7 @@ func GetAllDepts() ([]wecom.ListDepartmentResponseItem, error) {
|
||||||
return depts.Department, nil
|
return depts.Department, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 官方文档: https://developer.work.weixin.qq.com/document/path/90201
|
||||||
// GetAllUsers 获取所有员工信息
|
// GetAllUsers 获取所有员工信息
|
||||||
func GetAllUsers() ([]wecom.ListUserResponseItem, error) {
|
func GetAllUsers() ([]wecom.ListUserResponseItem, error) {
|
||||||
depts, err := GetAllDepts()
|
depts, err := GetAllDepts()
|
||||||
|
|
Loading…
Reference in New Issue