-
Notifications
You must be signed in to change notification settings - Fork 1
/
external_contact.rs
41 lines (34 loc) · 1.16 KB
/
external_contact.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
use anyhow::Result;
use dotenv::dotenv;
use tracing::info;
use wecom_rs::Client;
#[tokio::main]
async fn main() -> Result<()> {
dotenv().ok();
tracing_subscriber::fmt::init();
let c = Client::new_from_env()?;
// use wecom_rs::EnterpriseServiceManager;
// let user_ids = c.get_follow_user_list().await?;
// info!("user_id: {}", serde_json::to_string(&user_ids)?);
// use wecom_rs::OnJobInheritManager;
// let params = wecom_rs::ParamsTransferResult::default(); // <- 修改参数
// let transfer_result = c.transfer_result(params).await?;
// info!(
// "transfer_result: {}",
// serde_json::to_string(&transfer_result)?
// );
// use wecom_rs::EnterpriseServiceManager;
// let contact_way_list = c.contact_way_list(None).await?;
// info!(
// "contact_way_list: {}",
// serde_json::to_string(&contact_way_list)?
// );
use wecom_rs::LeaveJobInheritManager;
let params = wecom_rs::ParamsUnassignedList::default();
let unassigned_list = c.unassigned_list(params).await?;
info!(
"unassigned_list: {}",
serde_json::to_string(&unassigned_list)?
);
Ok(())
}