Documentation ¶
Index ¶
- type DingTalk
- func (ding *DingTalk) ActivateSuite(corpId, code string) (rsp response.CorpAuthInfo, err error)
- func (ding *DingTalk) AddDriveSpacesFilesPermissions(res *request.AddDriveSpacesFilesPermissions) (rsp response.DriveSpacesFilesPermissions, err error)
- func (ding *DingTalk) BatchAddUserRole(rs []int, us []string) (apps response.Response, err error)
- func (ding *DingTalk) BatchRemoveUserRole(roleIds []int, userIds []string) (apps response.Response, err error)
- func (ding *DingTalk) ChatFriendSwitch(chatId string, prohibit bool) (req response.Response, err error)
- func (ding *DingTalk) ChatSetSubAdmin(chatId, userId string, role int) (req response.Response, err error)
- func (ding *DingTalk) ChatSetUserNick(chatId, userId, nick string) (req response.Response, err error)
- func (ding *DingTalk) CreateAttendanceGroup(res *request.CreateAttendanceGroup) (rsp response.CreateAttendanceGroup, err error)
- func (ding *DingTalk) CreateChat(res *request.CreatChat) (rsp response.CreatChat, err error)
- func (ding *DingTalk) CreateCooperateCorp(req *request.CreateCooperateCorp) (rsp response.CreateCooperateCorp, err error)
- func (ding *DingTalk) CreateDept(res *request.CreateDept) (rsp response.CreateDept, err error)
- func (ding *DingTalk) CreateDriveSpaces(name, unionId string) (rsp response.CreateDriveSpaces, err error)
- func (ding *DingTalk) CreateDriveSpacesFiles(res *request.CreateDriveSpacesFiles) (rsp response.GetDriveSpacesFileInfo, err error)
- func (ding *DingTalk) CreateExtContact(res *request.CreateExtContact) (rsp response.CreateExtContact, err error)
- func (ding *DingTalk) CreateRole(name string, groupId int) (apps response.CreateRole, err error)
- func (ding *DingTalk) CreateRoleGroup(name string) (apps response.CreateRoleGroup, err error)
- func (ding *DingTalk) CreateTodo(res *request.CreateTodo) (req response.CreateTodo, err error)
- func (ding *DingTalk) CreateUser(user *request.CreateUser) (req response.CreateUser, err error)
- func (ding *DingTalk) DeleteDept(deptId int) (rsp response.Response, err error)
- func (ding *DingTalk) DeleteDriveSpaces(spaceId, unionId string) (rsp response.Response, err error)
- func (ding *DingTalk) DeleteDriveSpacesFiles(spaceId, fileId, unionId string, policy policy.DeletePolicy) (rsp response.Response, err error)
- func (ding *DingTalk) DeleteExtContact(userId string) (rsp response.Response, err error)
- func (ding *DingTalk) DeleteRegisterEvent() (res response.Response, err error)
- func (ding *DingTalk) DeleteRole(id int) (apps response.Response, err error)
- func (ding *DingTalk) DeleteTodo(unionId, taskId string) (req response.DeleteTodo, err error)
- func (ding *DingTalk) DeleteUser(userId string) (req response.Response, err error)
- func (ding *DingTalk) FetchDeptList(deptId int, fetch bool, lang language.Language) (rsp response.FetchDeptList, err error)
- func (ding *DingTalk) GetAccessToken() (token string, err error)
- func (ding *DingTalk) GetAgentInfo(agentId int, corpId string) (rsp response.AgentInfo, err error)
- func (ding *DingTalk) GetAttendanceGroupDetail(userId string, groupId int) (rsp response.GetAttendanceGroupDetail, err error)
- func (ding *DingTalk) GetAttendanceGroupMinimalism(userId string, cursor int) (rsp response.GetAttendanceGroupMinimalism, err error)
- func (ding *DingTalk) GetAttendanceGroups(offset, size int) (rsp response.GetAttendanceGroup, err error)
- func (ding *DingTalk) GetAttendanceUserGroup(userId string) (rsp response.GetAttendanceUserGroup, err error)
- func (ding *DingTalk) GetAuthInfo(corpId string) (rsp response.CorpAuthInfo, err error)
- func (ding *DingTalk) GetChatInfo(chatId string) (req response.GetChatInfo, err error)
- func (ding *DingTalk) GetChatMsgReadUser(messageId string, cursor, size int) (req response.ChatMsgReadUser, err error)
- func (ding *DingTalk) GetChatQRCode(chatId, userId string) (req response.ChatQRCode, err error)
- func (ding *DingTalk) GetContactUser(unionId string) (rsp response.ContactUser, err error)
- func (ding *DingTalk) GetCorpAccessToken() (token string, err error)
- func (ding *DingTalk) GetCorpConvMsgProgress(agentId, taskId int) (rsp response.MessageProgress, err error)
- func (ding *DingTalk) GetCorpDingIndex() (req response.CorpDingIndex, err error)
- func (ding *DingTalk) GetCorpPermanentCode(code string) (rsp response.CorpPermanentCode, err error)
- func (ding *DingTalk) GetCurrentUserByAccessToken(userAccessToken string) (rsp response.ContactUser, err error)
- func (ding *DingTalk) GetDeptDetail(res *request.DeptDetail) (rsp response.DeptDetail, err error)
- func (ding *DingTalk) GetDeptDetailUserInfo(res *request.DeptDetailUserInfo) (req response.DeptDetailUserInfo, err error)
- func (ding *DingTalk) GetDeptList(res *request.DeptList) (rsp response.DeptList, err error)
- func (ding *DingTalk) GetDeptSimpleUserInfo(res *request.DeptSimpleUserInfo) (req response.DeptSimpleUserInfo, err error)
- func (ding *DingTalk) GetDeptUserIds(du *request.DeptUserId) (req response.DeptUserId, err error)
- func (ding *DingTalk) GetDingTalkCrypto(token, aesKey string) (*crypto.DingTalkCrypto, error)
- func (ding *DingTalk) GetDriveSpaces(unionId string, spaceType spaces.SpaceType, token string, size int) (rsp response.GetDriveSpaces, err error)
- func (ding *DingTalk) GetDriveSpacesFileInfo(spaceId, fileId, unionId string) (rsp response.GetDriveSpacesFileInfo, err error)
- func (ding *DingTalk) GetDriveSpacesFiles(res *request.GetDriveSpacesFiles) (rsp response.GetDriveSpacesFiles, err error)
- func (ding *DingTalk) GetDriveSpacesFilesDownloadInfo(spaceId, fileId, unionId string) (rsp response.GetDriveSpacesFileInfo, err error)
- func (ding *DingTalk) GetDriveSpacesFilesPermissions(spaceId, fileId, unionId string) (rsp response.DriveSpacesFilesPermissions, err error)
- func (ding *DingTalk) GetDriveSpacesFilesUploadInfo(res *request.GetDriveSpacesFilesUploadInfo) (rsp response.GetDriveSpacesFileInfo, err error)
- func (ding *DingTalk) GetDriveSpacesInfo(spaceId, unionId string) (rsp response.CreateDriveSpaces, err error)
- func (ding *DingTalk) GetExtContact(offset, size int) (rsp response.GetExtContact, err error)
- func (ding *DingTalk) GetExtContactDetail(userId string) (rsp response.GetExtContactDetail, err error)
- func (ding *DingTalk) GetExtContactLabel(offset, size int) (rsp response.GetExtContactLabel, err error)
- func (ding *DingTalk) GetGroupRoles(groupId int) (apps response.GroupRole, err error)
- func (ding DingTalk) GetHrmEmpLeaveRecords(startTime string, endTime string, nextToken string, maxResults int) (res response.GetHrmEmployeeLevelRecord, err error)
- func (ding DingTalk) GetHrmEmployee(offset, size int, status []employee.Status) (res response.GetHrmEmployee, err error)
- func (ding DingTalk) GetHrmEmployeeField(agentId int, userIds []string, fields []string) (res response.GetHrmEmployeeField, err error)
- func (ding DingTalk) GetHrmField(agentId int) (res response.GetHrmField, err error)
- func (ding DingTalk) GetHrmMeta(agentId int) (res response.GetHrmMeta, err error)
- func (ding DingTalk) GetHrmResignEmployee(userIds []string) (res response.HrmResignEmployee, err error)
- func (ding DingTalk) GetHrmResignEmployeeIds(offset, size int) (res response.GetHrmEmployee, err error)
- func (ding DingTalk) GetHrmToBeHiredEmployee(offset, size int) (res response.GetHrmEmployee, err error)
- func (ding *DingTalk) GetInactiveUser(res *request.InactiveUser) (req response.InactiveUser, err error)
- func (ding *DingTalk) GetIndustryDept(deptId, offset, size int) (rsp response.GetIndustryDept, err error)
- func (ding *DingTalk) GetIndustryDeptDetail(deptId int) (rsp response.GetIndustryDeptDetail, err error)
- func (ding *DingTalk) GetJsApiTicket() (ticket string, err error)
- func (ding *DingTalk) GetMessageSendResult(agentId, taskId int) (rsp response.MessageSendResult, err error)
- func (ding *DingTalk) GetMicroAppByAgentId(agentId int) (domain.MicroApp, error)
- func (ding *DingTalk) GetMicroAppList() (rsp response.MicroAppList, err error)
- func (ding *DingTalk) GetMicroAppVisibleScopes(agentId int) (scopes response.MicroAppVisibleScopes, err error)
- func (ding *DingTalk) GetOrgAdminScope(res *request.AdminUserScope) (req response.AdminUserScope, err error)
- func (ding *DingTalk) GetOrgAdminUser() (req response.OrgAdminUser, err error)
- func (ding *DingTalk) GetParentIdsByDeptId(deptId int) (req response.GetParentIdsByDeptId, err error)
- func (ding *DingTalk) GetParentIdsByUserId(userId string) (req response.GetParentIdsByUserId, err error)
- func (ding *DingTalk) GetRegisterEvent() (res response.RegisterEvent, err error)
- func (ding *DingTalk) GetRegisterFailedEvent() (res response.FailedRegisterEvent, err error)
- func (ding *DingTalk) GetRoleDetail(roleId int) (apps response.RoleDetail, err error)
- func (ding *DingTalk) GetRoleList(offset, size int) (apps response.RoleList, err error)
- func (ding *DingTalk) GetRoleUserList(roleId, offset, size int) (apps response.RoleUser, err error)
- func (ding *DingTalk) GetSSOToken(corpId, secret string) (token string, err error)
- func (ding *DingTalk) GetSSOUserInfo(code string) (req response.SSOUserInfo, err error)
- func (ding *DingTalk) GetSnsUserInfo(code string) (req response.SnsUserInfo, err error)
- func (ding *DingTalk) GetSubDeptList(deptId int) (rsp response.SubDeptList, err error)
- func (ding *DingTalk) GetSuiteAccessToken() (token string, err error)
- func (ding *DingTalk) GetTodoDetail(unionId, taskId string) (req response.GetTodoDetail, err error)
- func (ding *DingTalk) GetTodoList(unionId, token string, done bool) (req response.GetTodoList, err error)
- func (ding *DingTalk) GetTodoListBySourceId(unionId, sourceId string) (req response.GetTodoDetail, err error)
- func (ding *DingTalk) GetUnactiveCorp(appId int) (rsp response.UnactiveCorp, err error)
- func (ding *DingTalk) GetUserAccessToken(authCode string) (res response.UserAccessToken, err error)
- func (ding *DingTalk) GetUserCanAccessApplet(appId int, userId string) (req response.UserCanAccessApplet, err error)
- func (ding *DingTalk) GetUserCount(res *request.UserCount) (req response.UserCont, err error)
- func (ding *DingTalk) GetUserDetail(user *request.UserDetail) (req response.UserDetail, err error)
- func (ding *DingTalk) GetUserIdByMobile(res *request.MobileGetUserId) (req response.MobileGetUserId, err error)
- func (ding *DingTalk) GetUserIdByUnionId(res *request.UnionIdGetUserId) (req response.UnionIdGetUserId, err error)
- func (ding *DingTalk) GetUserInfoByCode(code string) (req response.CodeGetUserInfo, err error)
- func (ding *DingTalk) GetUserMicroAppVisibleScopes(userId string) (scopes response.MicroAppList, err error)
- func (ding DingTalk) HrmCreateEmployee(req *request.HrmCreateEmployee) (res response.HrmCreateEmployee, err error)
- func (ding *DingTalk) MediaUpload(req request.UploadFile) (media response.MediaUpload, err error)
- func (ding *DingTalk) MoveDriveSpacesFiles(res *request.MoveDriveSpacesFiles) (rsp response.GetDriveSpacesFileInfo, err error)
- func (ding *DingTalk) OcrRecognize(ocrType, imageUrl string) (rsp domain.OcrStructuredResponse, err error)
- func (ding *DingTalk) ReauthCorp(appId int, corpId string, corpIds ...string) (rsp response.Response, err error)
- func (ding *DingTalk) RecallCorpConvMessage(agentId, taskId int) (rsp response.Response, err error)
- func (ding *DingTalk) RegisterEvent(req *request.RegisterEvent) (res response.Response, err error)
- func (ding *DingTalk) RenameDriveSpacesFiles(spaceId, fileId, newFileName, unionId string) (rsp response.GetDriveSpacesFileInfo, err error)
- func (ding *DingTalk) Request(method, path string, query url.Values, body interface{}, ...) (err error)
- func (ding *DingTalk) SearchAttendanceGroup(userId, groupName string) (rsp response.SearchAttendanceGroup, err error)
- func (ding *DingTalk) SendChatMessage(chatId string, msg message.Message) (req response.SendChatMessage, err error)
- func (ding *DingTalk) SendCorpConvMessage(req *request.CorpConvMessage) (rsp response.CorpConvMessage, err error)
- func (ding *DingTalk) SendMessage(senderId, chatId string, msg message.Message) (req response.SendMessage, err error)
- func (ding *DingTalk) SendTemplateMessage(req *request.SendTemplateMessage) (rsp response.SendTemplateMessage, err error)
- func (ding *DingTalk) SetUserRoleManageScope(res *request.SetUserRoleManageScope) (apps response.Response, err error)
- func (ding *DingTalk) Translate(query, sourceLanguage, targetLanguage string) (rsp domain.AiResponse, err error)
- func (ding *DingTalk) UpdateChat(res *request.UpdateChat) (req response.Response, err error)
- func (ding *DingTalk) UpdateCorpConvMessageStatus(req *request.UpdateCorpConvMsgStatus) (rsp response.Response, err error)
- func (ding *DingTalk) UpdateDept(res *request.UpdateDept) (rsp response.Response, err error)
- func (ding *DingTalk) UpdateExtContact(res *request.UpdateExtContact) (rsp response.CreateExtContact, err error)
- func (ding DingTalk) UpdateHrmEmployeeField(req *request.UpdateHrmEmpField) (res response.Response, err error)
- func (ding *DingTalk) UpdateRegisterEvent(req *request.RegisterEvent) (res response.Response, err error)
- func (ding *DingTalk) UpdateRole(id int, name string) (apps response.Response, err error)
- func (ding *DingTalk) UpdateTodo(res *request.UpdateTodo) (req response.UpdateTodo, err error)
- func (ding *DingTalk) UpdateTodoDone(res *request.UpdateTodoDone) (req response.UpdateTodo, err error)
- func (ding *DingTalk) UpdateUser(user *request.UpdateUser) (req response.Response, err error)
- func (ding *DingTalk) VoiceTranslate(mediaId string) (rsp domain.AiResponse, err error)
- type OptionFunc
- type Robot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DingTalk ¶ added in v2.0.5
func NewClient ¶
func NewClient(key, secret string, opts ...OptionFunc) (ding *DingTalk, err error)
NewClient new client
func (*DingTalk) ActivateSuite ¶ added in v2.0.5
func (ding *DingTalk) ActivateSuite(corpId, code string) (rsp response.CorpAuthInfo, err error)
ActivateSuite 激活应用
func (*DingTalk) AddDriveSpacesFilesPermissions ¶ added in v2.0.5
func (ding *DingTalk) AddDriveSpacesFilesPermissions(res *request.AddDriveSpacesFilesPermissions) (rsp response.DriveSpacesFilesPermissions, err error, )
AddDriveSpacesFilesPermissions 添加权限
func (*DingTalk) BatchAddUserRole ¶ added in v2.0.5
BatchAddUserRole 批量增加员工角色
func (*DingTalk) BatchRemoveUserRole ¶ added in v2.0.5
func (ding *DingTalk) BatchRemoveUserRole(roleIds []int, userIds []string) (apps response.Response, err error)
BatchRemoveUserRole 批量删除员工角色
func (*DingTalk) ChatFriendSwitch ¶ added in v2.0.5
func (ding *DingTalk) ChatFriendSwitch(chatId string, prohibit bool) (req response.Response, err error)
ChatFriendSwitch 设置禁止群成员私聊
func (*DingTalk) ChatSetSubAdmin ¶ added in v2.0.5
func (ding *DingTalk) ChatSetSubAdmin(chatId, userId string, role int) (req response.Response, err error)
ChatSetSubAdmin 设置群管理员
func (*DingTalk) ChatSetUserNick ¶ added in v2.0.5
func (ding *DingTalk) ChatSetUserNick(chatId, userId, nick string) (req response.Response, err error)
ChatSetUserNick 设置群成员昵称
func (*DingTalk) CreateAttendanceGroup ¶ added in v2.0.5
func (ding *DingTalk) CreateAttendanceGroup(res *request.CreateAttendanceGroup) (rsp response.CreateAttendanceGroup, err error)
CreateAttendanceGroup 创建考勤组
func (*DingTalk) CreateChat ¶ added in v2.0.5
CreateChat 创建群
func (*DingTalk) CreateCooperateCorp ¶ added in v2.0.5
func (ding *DingTalk) CreateCooperateCorp(req *request.CreateCooperateCorp) (rsp response.CreateCooperateCorp, err error, )
CreateCooperateCorp 创建合作空间
func (*DingTalk) CreateDept ¶ added in v2.0.5
func (ding *DingTalk) CreateDept(res *request.CreateDept) (rsp response.CreateDept, err error)
CreateDept 创建部门
func (*DingTalk) CreateDriveSpaces ¶ added in v2.0.5
func (ding *DingTalk) CreateDriveSpaces(name, unionId string) (rsp response.CreateDriveSpaces, err error)
CreateDriveSpaces 新建空间
func (*DingTalk) CreateDriveSpacesFiles ¶ added in v2.0.5
func (ding *DingTalk) CreateDriveSpacesFiles(res *request.CreateDriveSpacesFiles) (rsp response.GetDriveSpacesFileInfo, err error, )
CreateDriveSpacesFiles 添加文件(夹)
func (*DingTalk) CreateExtContact ¶ added in v2.0.5
func (ding *DingTalk) CreateExtContact(res *request.CreateExtContact) (rsp response.CreateExtContact, err error)
CreateExtContact 添加外部联系人
func (*DingTalk) CreateRole ¶ added in v2.0.5
CreateRole 创建角色
func (*DingTalk) CreateRoleGroup ¶ added in v2.0.5
func (ding *DingTalk) CreateRoleGroup(name string) (apps response.CreateRoleGroup, err error)
CreateRoleGroup 创建角色组
func (*DingTalk) CreateTodo ¶ added in v2.0.5
func (ding *DingTalk) CreateTodo(res *request.CreateTodo) (req response.CreateTodo, err error)
CreateTodo 新增钉钉待办任务
func (*DingTalk) CreateUser ¶ added in v2.0.5
func (ding *DingTalk) CreateUser(user *request.CreateUser) (req response.CreateUser, err error)
CreateUser 创建用户
func (*DingTalk) DeleteDept ¶ added in v2.0.5
DeleteDept 删除部门
func (*DingTalk) DeleteDriveSpaces ¶ added in v2.0.5
DeleteDriveSpaces 删除空间
func (*DingTalk) DeleteDriveSpacesFiles ¶ added in v2.0.5
func (ding *DingTalk) DeleteDriveSpacesFiles(spaceId, fileId, unionId string, policy policy.DeletePolicy) (rsp response.Response, err error, )
DeleteDriveSpacesFiles 删除文件(夹)
func (*DingTalk) DeleteExtContact ¶ added in v2.0.5
DeleteExtContact 删除外部联系人
func (*DingTalk) DeleteRegisterEvent ¶ added in v2.0.6
DeleteRegisterEvent 删除事件回调接口
func (*DingTalk) DeleteRole ¶ added in v2.0.5
DeleteRole 删除角色
func (*DingTalk) DeleteTodo ¶ added in v2.0.5
func (ding *DingTalk) DeleteTodo(unionId, taskId string) (req response.DeleteTodo, err error)
DeleteTodo 删除钉钉待办任务
func (*DingTalk) DeleteUser ¶ added in v2.0.5
DeleteUser 删除用户
func (*DingTalk) FetchDeptList ¶ added in v2.0.5
func (ding *DingTalk) FetchDeptList(deptId int, fetch bool, lang language.Language) (rsp response.FetchDeptList, err error)
FetchDeptList 支持递归获取部门列表 https://open.dingtalk.com/document/orgapp-server/obtain-the-department-list
func (*DingTalk) GetAccessToken ¶ added in v2.0.5
GetAccessToken 获取token
func (*DingTalk) GetAgentInfo ¶ added in v2.0.5
GetAgentInfo 获取授权应用的基本信息
func (*DingTalk) GetAttendanceGroupDetail ¶ added in v2.0.5
func (ding *DingTalk) GetAttendanceGroupDetail(userId string, groupId int) (rsp response.GetAttendanceGroupDetail, err error)
GetAttendanceGroupDetail 获取考勤组详情
func (*DingTalk) GetAttendanceGroupMinimalism ¶ added in v2.0.5
func (ding *DingTalk) GetAttendanceGroupMinimalism(userId string, cursor int) (rsp response.GetAttendanceGroupMinimalism, err error)
GetAttendanceGroupMinimalism 批量获取考勤组摘要
func (*DingTalk) GetAttendanceGroups ¶ added in v2.0.5
func (ding *DingTalk) GetAttendanceGroups(offset, size int) (rsp response.GetAttendanceGroup, err error)
GetAttendanceGroups 批量获取考勤组详情
func (*DingTalk) GetAttendanceUserGroup ¶ added in v2.0.5
func (ding *DingTalk) GetAttendanceUserGroup(userId string) (rsp response.GetAttendanceUserGroup, err error)
GetAttendanceUserGroup 获取用户考勤组
func (*DingTalk) GetAuthInfo ¶ added in v2.0.5
func (ding *DingTalk) GetAuthInfo(corpId string) (rsp response.CorpAuthInfo, err error)
GetAuthInfo 获取企业授权信息
func (*DingTalk) GetChatInfo ¶ added in v2.0.5
func (ding *DingTalk) GetChatInfo(chatId string) (req response.GetChatInfo, err error)
GetChatInfo 获取群会话信息
func (*DingTalk) GetChatMsgReadUser ¶ added in v2.0.5
func (ding *DingTalk) GetChatMsgReadUser(messageId string, cursor, size int) (req response.ChatMsgReadUser, err error)
GetChatMsgReadUser 查询群消息已读人员列表
func (*DingTalk) GetChatQRCode ¶ added in v2.0.5
func (ding *DingTalk) GetChatQRCode(chatId, userId string) (req response.ChatQRCode, err error)
GetChatQRCode 获取入群二维码链接
func (*DingTalk) GetContactUser ¶ added in v2.1.1
func (ding *DingTalk) GetContactUser(unionId string) (rsp response.ContactUser, err error)
GetContactUser 获取用户通讯录个人信息 调用本接口获取企业用户通讯录中的个人信息。 @see https://open.dingtalk.com/document/orgapp/dingtalk-retrieve-user-information?spm=ding_open_doc.document.0.0.58b9492dZxH66f
func (*DingTalk) GetCorpAccessToken ¶ added in v2.0.5
GetCorpAccessToken 服务商获取第三方应用授权企业的access_token
func (*DingTalk) GetCorpConvMsgProgress ¶ added in v2.0.5
func (ding *DingTalk) GetCorpConvMsgProgress(agentId, taskId int) (rsp response.MessageProgress, err error)
GetCorpConvMsgProgress 获取工作通知消息的发送进度
func (*DingTalk) GetCorpDingIndex ¶ added in v2.0.5
func (ding *DingTalk) GetCorpDingIndex() (req response.CorpDingIndex, err error)
GetCorpDingIndex 获取企业最新钉钉指数信息
func (*DingTalk) GetCorpPermanentCode ¶ added in v2.0.5
func (ding *DingTalk) GetCorpPermanentCode(code string) (rsp response.CorpPermanentCode, err error)
GetCorpPermanentCode 获取授权企业的永久授权码
func (*DingTalk) GetCurrentUserByAccessToken ¶ added in v2.1.1
func (ding *DingTalk) GetCurrentUserByAccessToken(userAccessToken string) (rsp response.ContactUser, err error)
GetCurrentUserByAccessToken 通UserAccessToken获取当前授权人的信息
func (*DingTalk) GetDeptDetail ¶ added in v2.0.5
func (ding *DingTalk) GetDeptDetail(res *request.DeptDetail) (rsp response.DeptDetail, err error)
GetDeptDetail 获取部门详情
func (*DingTalk) GetDeptDetailUserInfo ¶ added in v2.0.5
func (ding *DingTalk) GetDeptDetailUserInfo(res *request.DeptDetailUserInfo) (req response.DeptDetailUserInfo, err error, )
GetDeptDetailUserInfo 获取部门用户详情
func (*DingTalk) GetDeptList ¶ added in v2.0.5
GetDeptList 获取部门列表
func (*DingTalk) GetDeptSimpleUserInfo ¶ added in v2.0.5
func (ding *DingTalk) GetDeptSimpleUserInfo(res *request.DeptSimpleUserInfo) (req response.DeptSimpleUserInfo, err error, )
GetDeptSimpleUserInfo 获取部门用户基础信息
func (*DingTalk) GetDeptUserIds ¶ added in v2.0.5
func (ding *DingTalk) GetDeptUserIds(du *request.DeptUserId) (req response.DeptUserId, err error)
GetDeptUserIds 获取部门用户userid列表
func (*DingTalk) GetDingTalkCrypto ¶ added in v2.0.5
func (ding *DingTalk) GetDingTalkCrypto(token, aesKey string) (*crypto.DingTalkCrypto, error)
GetDingTalkCrypto 钉钉事件解密类
func (*DingTalk) GetDriveSpaces ¶ added in v2.0.5
func (ding *DingTalk) GetDriveSpaces(unionId string, spaceType spaces.SpaceType, token string, size int) (rsp response.GetDriveSpaces, err error, )
GetDriveSpaces 获取空间列表
func (*DingTalk) GetDriveSpacesFileInfo ¶ added in v2.0.5
func (ding *DingTalk) GetDriveSpacesFileInfo(spaceId, fileId, unionId string) (rsp response.GetDriveSpacesFileInfo, err error)
GetDriveSpacesFileInfo 查询文件(夹)信息
func (*DingTalk) GetDriveSpacesFiles ¶ added in v2.0.5
func (ding *DingTalk) GetDriveSpacesFiles(res *request.GetDriveSpacesFiles) (rsp response.GetDriveSpacesFiles, err error, )
GetDriveSpacesFiles 查询文件(夹)列表 order 取值: createTimeAsc:按创建时间升序 createTimeDesc:按创建时间降序 modifyTimeAsc:按修改时间升序 modifyTimeDesc:按修改时间降序 nameAsc:按名称升序 nameDesc:按名称降序 sizeAsc:按大小升序 sizeDesc:按大小降序 默认值:createTimeDesc
func (*DingTalk) GetDriveSpacesFilesDownloadInfo ¶ added in v2.0.5
func (ding *DingTalk) GetDriveSpacesFilesDownloadInfo(spaceId, fileId, unionId string) (rsp response.GetDriveSpacesFileInfo, err error, )
GetDriveSpacesFilesDownloadInfo 获取文件下载信息
func (*DingTalk) GetDriveSpacesFilesPermissions ¶ added in v2.0.5
func (ding *DingTalk) GetDriveSpacesFilesPermissions(spaceId, fileId, unionId string) (rsp response.DriveSpacesFilesPermissions, err error, )
GetDriveSpacesFilesPermissions 获取权限列表
func (*DingTalk) GetDriveSpacesFilesUploadInfo ¶ added in v2.0.5
func (ding *DingTalk) GetDriveSpacesFilesUploadInfo(res *request.GetDriveSpacesFilesUploadInfo) (rsp response.GetDriveSpacesFileInfo, err error)
GetDriveSpacesFilesUploadInfo 获取文件上传信息
func (*DingTalk) GetDriveSpacesInfo ¶ added in v2.0.5
func (ding *DingTalk) GetDriveSpacesInfo(spaceId, unionId string) (rsp response.CreateDriveSpaces, err error)
GetDriveSpacesInfo 获取空间信息
func (*DingTalk) GetExtContact ¶ added in v2.0.5
func (ding *DingTalk) GetExtContact(offset, size int) (rsp response.GetExtContact, err error)
GetExtContact 获取外部联系人列表
func (*DingTalk) GetExtContactDetail ¶ added in v2.0.5
func (ding *DingTalk) GetExtContactDetail(userId string) (rsp response.GetExtContactDetail, err error)
GetExtContactDetail 获取外部联系人详情
func (*DingTalk) GetExtContactLabel ¶ added in v2.0.5
func (ding *DingTalk) GetExtContactLabel(offset, size int) (rsp response.GetExtContactLabel, err error)
GetExtContactLabel 获取外部联系人标签列表
func (*DingTalk) GetGroupRoles ¶ added in v2.0.5
GetGroupRoles 获取角色组列表
func (DingTalk) GetHrmEmpLeaveRecords ¶ added in v2.1.1
func (ding DingTalk) GetHrmEmpLeaveRecords(startTime string, endTime string, nextToken string, maxResults int) (res response.GetHrmEmployeeLevelRecord, err error)
GetHrmResignEmployeeIds 获取时间范围内离职员工记录
func (DingTalk) GetHrmEmployee ¶ added in v2.0.5
func (ding DingTalk) GetHrmEmployee(offset, size int, status []employee.Status) (res response.GetHrmEmployee, err error)
GetHrmEmployee 获取在职员工列表
func (DingTalk) GetHrmEmployeeField ¶ added in v2.0.5
func (ding DingTalk) GetHrmEmployeeField(agentId int, userIds []string, fields []string) (res response.GetHrmEmployeeField, err error)
GetHrmEmployeeField 获取员工花名册字段信息
func (DingTalk) GetHrmField ¶ added in v2.0.5
func (ding DingTalk) GetHrmField(agentId int) (res response.GetHrmField, err error)
GetHrmField 获取花名册字段组详情
func (DingTalk) GetHrmMeta ¶ added in v2.0.5
func (ding DingTalk) GetHrmMeta(agentId int) (res response.GetHrmMeta, err error)
GetHrmMeta 获取花名册元数据
func (DingTalk) GetHrmResignEmployee ¶ added in v2.0.5
func (ding DingTalk) GetHrmResignEmployee(userIds []string) (res response.HrmResignEmployee, err error)
GetHrmResignEmployee 获取员工离职信息
func (DingTalk) GetHrmResignEmployeeIds ¶ added in v2.0.5
func (ding DingTalk) GetHrmResignEmployeeIds(offset, size int) (res response.GetHrmEmployee, err error)
GetHrmResignEmployeeIds 获取离职员工列表
func (DingTalk) GetHrmToBeHiredEmployee ¶ added in v2.0.5
func (ding DingTalk) GetHrmToBeHiredEmployee(offset, size int) (res response.GetHrmEmployee, err error)
GetHrmToBeHiredEmployee 获取待入职员工列表
func (*DingTalk) GetInactiveUser ¶ added in v2.0.5
func (ding *DingTalk) GetInactiveUser(res *request.InactiveUser) (req response.InactiveUser, err error)
GetInactiveUser 获取未登录钉钉的员工列表
func (*DingTalk) GetIndustryDept ¶ added in v2.0.5
func (ding *DingTalk) GetIndustryDept(deptId, offset, size int) (rsp response.GetIndustryDept, err error)
GetIndustryDept 获取部门列表,行业根部门传1
func (*DingTalk) GetIndustryDeptDetail ¶ added in v2.0.5
func (ding *DingTalk) GetIndustryDeptDetail(deptId int) (rsp response.GetIndustryDeptDetail, err error)
GetIndustryDeptDetail 获取部门详情
func (*DingTalk) GetJsApiTicket ¶ added in v2.0.5
GetJsApiTicket 获取jsapi_ticket
func (*DingTalk) GetMessageSendResult ¶ added in v2.0.5
func (ding *DingTalk) GetMessageSendResult(agentId, taskId int) (rsp response.MessageSendResult, err error)
GetMessageSendResult 获取工作通知消息的发送结果
func (*DingTalk) GetMicroAppByAgentId ¶ added in v2.0.5
GetMicroAppByAgentId 根据id获取应用
func (*DingTalk) GetMicroAppList ¶ added in v2.0.5
func (ding *DingTalk) GetMicroAppList() (rsp response.MicroAppList, err error)
GetMicroAppList 获取应用列表
func (*DingTalk) GetMicroAppVisibleScopes ¶ added in v2.0.5
func (ding *DingTalk) GetMicroAppVisibleScopes(agentId int) (scopes response.MicroAppVisibleScopes, err error)
GetMicroAppVisibleScopes 获取应用可见范围
func (*DingTalk) GetOrgAdminScope ¶ added in v2.0.5
func (ding *DingTalk) GetOrgAdminScope(res *request.AdminUserScope) (req response.AdminUserScope, err error)
GetOrgAdminScope 获取管理员通讯录权限范围
func (*DingTalk) GetOrgAdminUser ¶ added in v2.0.5
func (ding *DingTalk) GetOrgAdminUser() (req response.OrgAdminUser, err error)
GetOrgAdminUser 获取管理员列表
func (*DingTalk) GetParentIdsByDeptId ¶ added in v2.0.5
func (ding *DingTalk) GetParentIdsByDeptId(deptId int) (req response.GetParentIdsByDeptId, err error)
GetParentIdsByDeptId 获取指定部门的所有父部门列表
func (*DingTalk) GetParentIdsByUserId ¶ added in v2.0.5
func (ding *DingTalk) GetParentIdsByUserId(userId string) (req response.GetParentIdsByUserId, err error)
GetParentIdsByUserId 获取指定用户的所有父部门列表
func (*DingTalk) GetRegisterEvent ¶ added in v2.0.6
func (ding *DingTalk) GetRegisterEvent() (res response.RegisterEvent, err error)
GetRegisterEvent 查询订阅事件
func (*DingTalk) GetRegisterFailedEvent ¶ added in v2.0.6
func (ding *DingTalk) GetRegisterFailedEvent() (res response.FailedRegisterEvent, err error)
GetRegisterFailedEvent 获取推送失败的事件列表
func (*DingTalk) GetRoleDetail ¶ added in v2.0.5
func (ding *DingTalk) GetRoleDetail(roleId int) (apps response.RoleDetail, err error)
GetRoleDetail 获取角色详情
func (*DingTalk) GetRoleList ¶ added in v2.0.5
GetRoleList 获取角色列表
func (*DingTalk) GetRoleUserList ¶ added in v2.0.5
GetRoleUserList 获取指定角色的员工列表
func (*DingTalk) GetSSOToken ¶ added in v2.0.5
GetSSOToken 获取微应用后台免登的access_token
func (*DingTalk) GetSSOUserInfo ¶ added in v2.0.5
func (ding *DingTalk) GetSSOUserInfo(code string) (req response.SSOUserInfo, err error)
GetSSOUserInfo 获取应用管理员的身份信息
func (*DingTalk) GetSnsUserInfo ¶ added in v2.0.5
func (ding *DingTalk) GetSnsUserInfo(code string) (req response.SnsUserInfo, err error)
GetSnsUserInfo 根据sns临时授权码获取用户信息 该接口获取的用户信息仅用于扫码登录第三方网站、钉钉内免登第三方网站和使用钉钉账号登录第三方网站的场景。
func (*DingTalk) GetSubDeptList ¶ added in v2.0.5
func (ding *DingTalk) GetSubDeptList(deptId int) (rsp response.SubDeptList, err error)
GetSubDeptList 获取子部门列表
func (*DingTalk) GetSuiteAccessToken ¶ added in v2.0.5
GetSuiteAccessToken 获取第三方企业应用的suite_access_token
func (*DingTalk) GetTodoDetail ¶ added in v2.0.5
func (ding *DingTalk) GetTodoDetail(unionId, taskId string) (req response.GetTodoDetail, err error)
GetTodoDetail 获取钉钉待办任务详情
func (*DingTalk) GetTodoList ¶ added in v2.0.5
func (ding *DingTalk) GetTodoList(unionId, token string, done bool) (req response.GetTodoList, err error)
GetTodoList 查询企业下用户待办列表
func (*DingTalk) GetTodoListBySourceId ¶ added in v2.0.5
func (ding *DingTalk) GetTodoListBySourceId(unionId, sourceId string) (req response.GetTodoDetail, err error)
GetTodoListBySourceId 根据sourceId获取钉钉待办任务详情
func (*DingTalk) GetUnactiveCorp ¶ added in v2.0.5
func (ding *DingTalk) GetUnactiveCorp(appId int) (rsp response.UnactiveCorp, err error)
GetUnactiveCorp 获取应用未激活的企业列表
func (*DingTalk) GetUserAccessToken ¶ added in v2.1.1
func (ding *DingTalk) GetUserAccessToken(authCode string) (res response.UserAccessToken, err error)
GetUserAccessToken 通过oauth2临时授权码获取用户Token https://open.dingtalk.com/document/orgapp/obtain-user-token
func (*DingTalk) GetUserCanAccessApplet ¶ added in v2.0.5
func (ding *DingTalk) GetUserCanAccessApplet(appId int, userId string) (req response.UserCanAccessApplet, err error)
GetUserCanAccessApplet 获取管理员的应用管理权限
func (*DingTalk) GetUserCount ¶ added in v2.0.5
GetUserCount 获取员工人数
func (*DingTalk) GetUserDetail ¶ added in v2.0.5
func (ding *DingTalk) GetUserDetail(user *request.UserDetail) (req response.UserDetail, err error)
GetUserDetail 根据userid获取用户详情
func (*DingTalk) GetUserIdByMobile ¶ added in v2.0.5
func (ding *DingTalk) GetUserIdByMobile(res *request.MobileGetUserId) (req response.MobileGetUserId, err error)
GetUserIdByMobile 根据手机号获取userid
func (*DingTalk) GetUserIdByUnionId ¶ added in v2.0.5
func (ding *DingTalk) GetUserIdByUnionId(res *request.UnionIdGetUserId) (req response.UnionIdGetUserId, err error)
GetUserIdByUnionId 根据unionid获取用户userid
func (*DingTalk) GetUserInfoByCode ¶ added in v2.0.5
func (ding *DingTalk) GetUserInfoByCode(code string) (req response.CodeGetUserInfo, err error)
GetUserInfoByCode 通过免登码获取用户信息
func (*DingTalk) GetUserMicroAppVisibleScopes ¶ added in v2.0.6
func (ding *DingTalk) GetUserMicroAppVisibleScopes(userId string) (scopes response.MicroAppList, err error)
GetUserMicroAppVisibleScopes 获取员工可见的应用列表
func (DingTalk) HrmCreateEmployee ¶ added in v2.0.5
func (ding DingTalk) HrmCreateEmployee(req *request.HrmCreateEmployee) (res response.HrmCreateEmployee, err error)
HrmCreateEmployee 添加企业待入职员工
func (*DingTalk) MediaUpload ¶ added in v2.0.5
func (ding *DingTalk) MediaUpload(req request.UploadFile) (media response.MediaUpload, err error)
MediaUpload 上传媒体文件
func (*DingTalk) MoveDriveSpacesFiles ¶ added in v2.0.5
func (ding *DingTalk) MoveDriveSpacesFiles(res *request.MoveDriveSpacesFiles) (rsp response.GetDriveSpacesFileInfo, err error, )
MoveDriveSpacesFiles 移动文件(夹)
func (*DingTalk) OcrRecognize ¶ added in v2.0.5
func (ding *DingTalk) OcrRecognize(ocrType, imageUrl string) (rsp domain.OcrStructuredResponse, err error)
OcrRecognize:OCR文字识别 ocrType:识别类型 imageUrl:图片url
func (*DingTalk) ReauthCorp ¶ added in v2.0.5
func (ding *DingTalk) ReauthCorp(appId int, corpId string, corpIds ...string) (rsp response.Response, err error)
ReauthCorp 重新授权未激活应用的企业
func (*DingTalk) RecallCorpConvMessage ¶ added in v2.0.5
RecallCorpConvMessage 撤回工作通知消息
func (*DingTalk) RegisterEvent ¶ added in v2.0.6
RegisterEvent 注册事件
func (*DingTalk) RenameDriveSpacesFiles ¶ added in v2.0.5
func (ding *DingTalk) RenameDriveSpacesFiles(spaceId, fileId, newFileName, unionId string) (rsp response.GetDriveSpacesFileInfo, err error, )
RenameDriveSpacesFiles 修改文件(夹)名
func (*DingTalk) Request ¶ added in v2.0.5
func (ding *DingTalk) Request(method, path string, query url.Values, body interface{}, data response.Unmarshalled) (err error)
Request 统一请求
func (*DingTalk) SearchAttendanceGroup ¶ added in v2.0.5
func (ding *DingTalk) SearchAttendanceGroup(userId, groupName string) (rsp response.SearchAttendanceGroup, err error)
SearchAttendanceGroup 搜索考勤组摘要
func (*DingTalk) SendChatMessage ¶ added in v2.0.5
func (ding *DingTalk) SendChatMessage(chatId string, msg message.Message) (req response.SendChatMessage, err error)
SendChatMessage 发送消息到群
func (*DingTalk) SendCorpConvMessage ¶ added in v2.0.5
func (ding *DingTalk) SendCorpConvMessage(req *request.CorpConvMessage) (rsp response.CorpConvMessage, err error)
SendCorpConvMessage 发送工作通知
func (*DingTalk) SendMessage ¶ added in v2.0.5
func (ding *DingTalk) SendMessage(senderId, chatId string, msg message.Message) (req response.SendMessage, err error)
SendMessage 发送普通消息
func (*DingTalk) SendTemplateMessage ¶ added in v2.0.5
func (ding *DingTalk) SendTemplateMessage(req *request.SendTemplateMessage) (rsp response.SendTemplateMessage, err error)
SendTemplateMessage 使用模板发送工作通知消息
func (*DingTalk) SetUserRoleManageScope ¶ added in v2.0.5
func (ding *DingTalk) SetUserRoleManageScope(res *request.SetUserRoleManageScope) (apps response.Response, err error)
SetUserRoleManageScope 设定角色成员管理范围 todo:官方接口不通
func (*DingTalk) Translate ¶ added in v2.0.5
func (ding *DingTalk) Translate(query, sourceLanguage, targetLanguage string) (rsp domain.AiResponse, err error)
Translate:文本翻译
func (*DingTalk) UpdateChat ¶ added in v2.0.5
UpdateChat 修改群会话
func (*DingTalk) UpdateCorpConvMessageStatus ¶ added in v2.0.5
func (ding *DingTalk) UpdateCorpConvMessageStatus(req *request.UpdateCorpConvMsgStatus) (rsp response.Response, err error)
UpdateCorpConvMessageStatus 更新工作通知状态栏
func (*DingTalk) UpdateDept ¶ added in v2.0.5
UpdateDept 更新部门
func (*DingTalk) UpdateExtContact ¶ added in v2.0.5
func (ding *DingTalk) UpdateExtContact(res *request.UpdateExtContact) (rsp response.CreateExtContact, err error)
UpdateExtContact 更新外部联系人
func (DingTalk) UpdateHrmEmployeeField ¶ added in v2.0.5
func (ding DingTalk) UpdateHrmEmployeeField(req *request.UpdateHrmEmpField) (res response.Response, err error)
UpdateHrmEmployeeField 更新员工花名册信息
func (*DingTalk) UpdateRegisterEvent ¶ added in v2.0.6
func (ding *DingTalk) UpdateRegisterEvent(req *request.RegisterEvent) (res response.Response, err error)
UpdateRegisterEvent 更新事件接口
func (*DingTalk) UpdateRole ¶ added in v2.0.5
UpdateRole 更新角色
func (*DingTalk) UpdateTodo ¶ added in v2.0.5
func (ding *DingTalk) UpdateTodo(res *request.UpdateTodo) (req response.UpdateTodo, err error)
UpdateTodo 更新钉钉待办任务
func (*DingTalk) UpdateTodoDone ¶ added in v2.0.5
func (ding *DingTalk) UpdateTodoDone(res *request.UpdateTodoDone) (req response.UpdateTodo, err error)
UpdateTodoDone 更新钉钉待办执行者状态
func (*DingTalk) UpdateUser ¶ added in v2.0.5
UpdateUser 更新用户信息
func (*DingTalk) VoiceTranslate ¶ added in v2.0.5
func (ding *DingTalk) VoiceTranslate(mediaId string) (rsp domain.AiResponse, err error)
VoiceTranslate:ASR 一句话语音识别 mediaId:音频id
type OptionFunc ¶
type OptionFunc func(*DingTalk)
func WithCache ¶ added in v2.1.1
func WithCache(cache cache.Cache) OptionFunc
func WithCorpId ¶
func WithCorpId(corpId string) OptionFunc
func WithLevel ¶ added in v2.0.2
func WithLevel(level zapcore.Level) OptionFunc
func WithSSOSecret ¶ added in v2.0.2
func WithSSOSecret(secret string) OptionFunc
func WithTicket ¶
func WithTicket(ticket string) OptionFunc
Source Files ¶
- api_ai.go
- api_attendance.go
- api_auth.go
- api_chat.go
- api_cooperate_corp.go
- api_corp.go
- api_corp_conv_msg.go
- api_dept.go
- api_drive_spaces.go
- api_event.go
- api_extcontact.go
- api_file.go
- api_hrm.go
- api_industry.go
- api_micro_app.go
- api_msg.go
- api_robot.go
- api_role.go
- api_todo.go
- api_token.go
- api_union.go
- api_user.go
- api_work_notify.go
- dingtalk.go