Struct dingtalk_rs::client::Client
source · pub struct Client { /* private fields */ }
Implementations§
Trait Implementations§
source§impl DepartmentManager for Client
impl DepartmentManager for Client
source§fn department_create<'life0, 'async_trait>(
&'life0 self,
params: ParamsDepartmentCreate
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn department_create<'life0, 'async_trait>(
&'life0 self,
params: ParamsDepartmentCreate
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
创建部门
https://open.dingtalk.com/document/orgapp-server/create-a-department-v2 Read more
source§fn department_update<'life0, 'async_trait>(
&'life0 self,
params: ParamsDepartmentUpdate
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn department_update<'life0, 'async_trait>(
&'life0 self,
params: ParamsDepartmentUpdate
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
更新部门
https://open.dingtalk.com/document/orgapp-server/update-a-department-v2 Read more
source§fn department_delete<'life0, 'async_trait>(
&'life0 self,
dept_id: i64
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn department_delete<'life0, 'async_trait>(
&'life0 self,
dept_id: i64
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
删除部门
https://open.dingtalk.com/document/orgapp-server/delete-a-department-v2 Read more
source§fn department_detail<'life0, 'async_trait>(
&'life0 self,
params: ParamsDepartmentList
) -> Pin<Box<dyn Future<Output = Result<DeptDetailResponse>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn department_detail<'life0, 'async_trait>(
&'life0 self,
params: ParamsDepartmentList
) -> Pin<Box<dyn Future<Output = Result<DeptDetailResponse>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
获取部门详情
https://open.dingtalk.com/document/orgapp-server/query-department-details0-v2 Read more
source§fn department_list<'life0, 'async_trait>(
&'life0 self,
params: Option<ParamsDepartmentList>
) -> Pin<Box<dyn Future<Output = Result<Vec<DeptBaseResponse>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn department_list<'life0, 'async_trait>(
&'life0 self,
params: Option<ParamsDepartmentList>
) -> Pin<Box<dyn Future<Output = Result<Vec<DeptBaseResponse>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
获取部门列表
https://open.dingtalk.com/document/orgapp-server/obtain-the-department-list-v2 Read more
source§fn department_list_sub_ids<'life0, 'async_trait>(
&'life0 self,
id: i64
) -> Pin<Box<dyn Future<Output = Result<Vec<i64>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn department_list_sub_ids<'life0, 'async_trait>(
&'life0 self,
id: i64
) -> Pin<Box<dyn Future<Output = Result<Vec<i64>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
获取子部门ID列表
https://open.dingtalk.com/document/orgapp-server/obtain-a-sub-department-id-list-v2 Read more
source§fn department_list_parent_ids_by_dept_id<'life0, 'async_trait>(
&'life0 self,
dept_id: i64
) -> Pin<Box<dyn Future<Output = Result<Vec<i64>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn department_list_parent_ids_by_dept_id<'life0, 'async_trait>(
&'life0 self,
dept_id: i64
) -> Pin<Box<dyn Future<Output = Result<Vec<i64>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
获取指定部门的所有父部门列表
https://open.dingtalk.com/document/orgapp-server/query-the-list-of-all-parent-departments-of-a-department Read more
source§fn department_list_parent_ids_by_userid<'life0, 'life1, 'async_trait>(
&'life0 self,
userid: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Vec<ParentDeptIdList>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn department_list_parent_ids_by_userid<'life0, 'life1, 'async_trait>(
&'life0 self,
userid: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Vec<ParentDeptIdList>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
获取指定用户的所有父部门列表
https://open.dingtalk.com/document/orgapp-server/queries-the-list-of-all-parent-departments-of-a-user Read more
source§impl EventSubscriber for Client
impl EventSubscriber for Client
source§fn callback_failed_result_get<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<CallbackFailedList>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn callback_failed_result_get<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<CallbackFailedList>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
获取推送失败的事件列表
api: https://open.dingtalk.com/document/orgapp-server/obtain-the-event-list-of-failed-push-messages Read more
source§impl UserManager for Client
impl UserManager for Client
source§fn user_create<'life0, 'async_trait>(
&'life0 self,
params: ParamsCreateUser
) -> Pin<Box<dyn Future<Output = Result<ResponseUserCreate>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn user_create<'life0, 'async_trait>(
&'life0 self,
params: ParamsCreateUser
) -> Pin<Box<dyn Future<Output = Result<ResponseUserCreate>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
创建用户
https://open.dingtalk.com/document/orgapp-server/user-information-creation Read more
source§fn user_update<'life0, 'async_trait>(
&'life0 self,
params: ParamsUpdateUser
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn user_update<'life0, 'async_trait>(
&'life0 self,
params: ParamsUpdateUser
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
更新用户
https://open.dingtalk.com/document/orgapp-server/user-information-update Read more
source§fn user_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
userid: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn user_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
userid: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
删除用户
https://open.dingtalk.com/document/orgapp-server/delete-a-user Read more
source§fn user_get<'life0, 'life1, 'async_trait>(
&'life0 self,
userid: &'life1 str,
language: Option<ParamLanguage>
) -> Pin<Box<dyn Future<Output = Result<UserDetail>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn user_get<'life0, 'life1, 'async_trait>(
&'life0 self,
userid: &'life1 str,
language: Option<ParamLanguage>
) -> Pin<Box<dyn Future<Output = Result<UserDetail>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
查询用户详情
https://open.dingtalk.com/document/orgapp-server/query-user-details Read more
source§fn user_get_by_mobile<'life0, 'life1, 'async_trait>(
&'life0 self,
mobile: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn user_get_by_mobile<'life0, 'life1, 'async_trait>(
&'life0 self,
mobile: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
根据手机号查询用户, 根据手机号可以查询在职员工的userId。如果员工离职,无法根据手机号获取用户的userId
https://open.dingtalk.com/document/orgapp-server/query-users-by-phone-number Read more
source§fn user_list_simple_by_dept<'life0, 'async_trait>(
&'life0 self,
params: ParamsUserList
) -> Pin<Box<dyn Future<Output = Result<PageResult<ListUserSimpleResponse>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn user_list_simple_by_dept<'life0, 'async_trait>(
&'life0 self,
params: ParamsUserList
) -> Pin<Box<dyn Future<Output = Result<PageResult<ListUserSimpleResponse>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
获取部门用户基础信息
https://open.dingtalk.com/document/orgapp-server/queries-the-simple-information-of-a-department-user Read more
source§fn user_list_ids<'life0, 'async_trait>(
&'life0 self,
dept_id: i64
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn user_list_ids<'life0, 'async_trait>(
&'life0 self,
dept_id: i64
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
获取部门用户userid列表
https://open.dingtalk.com/document/orgapp-server/query-the-list-of-department-userids Read more
source§fn user_list<'life0, 'async_trait>(
&'life0 self,
params: ParamsUserList
) -> Pin<Box<dyn Future<Output = Result<PageResult<UserDetail>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn user_list<'life0, 'async_trait>(
&'life0 self,
params: ParamsUserList
) -> Pin<Box<dyn Future<Output = Result<PageResult<UserDetail>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
获取部门用户详情
https://open.dingtalk.com/document/orgapp-server/queries-the-complete-information-of-a-department-user Read more
source§fn user_count<'life0, 'async_trait>(
&'life0 self,
only_active: bool
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn user_count<'life0, 'async_trait>(
&'life0 self,
only_active: bool
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
获取员工人数
https://open.dingtalk.com/document/orgapp-server/obtain-the-number-of-employees-v2
@params only_active: 是否包含未激活钉钉人数:
false:包含未激活钉钉的人员数量
true:只包含激活钉钉的人员数量 Read more
source§fn user_inactive_get<'life0, 'async_trait>(
&'life0 self,
params: ParamsUserInactiveGet
) -> Pin<Box<dyn Future<Output = Result<PageResult<Vec<String>>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn user_inactive_get<'life0, 'async_trait>(
&'life0 self,
params: ParamsUserInactiveGet
) -> Pin<Box<dyn Future<Output = Result<PageResult<Vec<String>>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
获取未登录钉钉的员工列表
https://open.dingtalk.com/document/orgapp-server/queries-the-inactive-users-or-active-users-under-an-enterprise Read more
source§fn user_get_by_unionid<'life0, 'life1, 'async_trait>(
&'life0 self,
unionid: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<UserGetByUnionIdResponse>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn user_get_by_unionid<'life0, 'life1, 'async_trait>(
&'life0 self,
unionid: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<UserGetByUnionIdResponse>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
根据unionid获取用户userid
https://open.dingtalk.com/document/orgapp-server/query-a-user-by-the-union-id Read more
source§fn user_admin_list<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<AdminResponse>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn user_admin_list<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<AdminResponse>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
获取管理员列表
https://open.dingtalk.com/document/orgapp-server/query-the-administrator-list Read more
source§fn user_admin_scope_get<'life0, 'life1, 'async_trait>(
&'life0 self,
userid: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Vec<i64>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn user_admin_scope_get<'life0, 'life1, 'async_trait>(
&'life0 self,
userid: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Vec<i64>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
获取管理员通讯录权限范围
https://open.dingtalk.com/document/orgapp-server/query-permissions-of-the-administrator-address-book Read more
source§fn emp_leave_record_list<'life0, 'async_trait>(
&'life0 self,
params: ParamsEmpLeaveRecordList
) -> Pin<Box<dyn Future<Output = Result<ResponseEmpLeaveRecordList>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn emp_leave_record_list<'life0, 'async_trait>(
&'life0 self,
params: ParamsEmpLeaveRecordList
) -> Pin<Box<dyn Future<Output = Result<ResponseEmpLeaveRecordList>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
查询离职记录列表
https://open.dingtalk.com/document/orgapp-server/query-the-details-of-employees-who-have-left-office Read more
source§impl WorkNotifier for Client
impl WorkNotifier for Client
source§fn work_notification_send<'life0, 'async_trait>(
&'life0 self,
params: ParamsWorkNotificationSend
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn work_notification_send<'life0, 'async_trait>(
&'life0 self,
params: ParamsWorkNotificationSend
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
发送工作通知
https://open.dingtalk.com/document/orgapp-server/asynchronous-sending-of-enterprise-session-messages
@return task_id Read more
source§fn status_bar_update<'life0, 'async_trait>(
&'life0 self,
params: ParamsStatusBarUpdate
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn status_bar_update<'life0, 'async_trait>(
&'life0 self,
params: ParamsStatusBarUpdate
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
更新工作通知状态栏
https://open.dingtalk.com/document/orgapp-server/update-work-notification-status-bar Read more
source§fn work_notification_send_progress_get<'life0, 'async_trait>(
&'life0 self,
agent_id: i64,
task_id: i64
) -> Pin<Box<dyn Future<Output = Result<AsyncSendProgress>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn work_notification_send_progress_get<'life0, 'async_trait>(
&'life0 self,
agent_id: i64,
task_id: i64
) -> Pin<Box<dyn Future<Output = Result<AsyncSendProgress>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
获取工作通知消息的发送进度
https://open.dingtalk.com/document/orgapp-server/obtain-the-sending-progress-of-asynchronous-sending-of-enterprise-session
@params
agent_id: 发送消息时使用的微应用的ID。
企业内部应用可在开发者后台的应用详情页面查看。
第三方企业应用可调用获取企业授权信息接口获取。
task_id: 发送消息时钉钉返回的任务ID。 Read more
source§fn work_notification_send_result_get<'life0, 'async_trait>(
&'life0 self,
agent_id: i64,
task_id: i64
) -> Pin<Box<dyn Future<Output = Result<AsyncSendResult>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn work_notification_send_result_get<'life0, 'async_trait>(
&'life0 self,
agent_id: i64,
task_id: i64
) -> Pin<Box<dyn Future<Output = Result<AsyncSendResult>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
获取工作通知消息的发送结果
https://open.dingtalk.com/document/orgapp-server/gets-the-result-of-sending-messages-asynchronously-to-the-enterprise
@params
agent_id: 发送消息时使用的微应用的ID。
企业内部应用可在开发者后台的应用详情页面查看。
第三方企业应用可调用获取企业授权信息接口获取。
task_id: 发送消息时钉钉返回的任务ID。 Read more
source§fn work_notification_recall_get<'life0, 'async_trait>(
&'life0 self,
agent_id: i64,
task_id: i64
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn work_notification_recall_get<'life0, 'async_trait>(
&'life0 self,
agent_id: i64,
task_id: i64
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
获取工作通知消息的发送结果
https://open.dingtalk.com/document/orgapp-server/gets-the-result-of-sending-messages-asynchronously-to-the-enterprise
@params
agent_id: 发送消息时使用的微应用的ID。
企业内部应用可在开发者后台的应用详情页面查看。
第三方企业应用可调用获取企业授权信息接口获取。
task_id: 发送消息时钉钉返回的任务ID。 Read more