BlueGit

ict rusty-teams

Files

rusty-teams / crates / chatsvc / examples / create_test_meeting.rs

create_test_meeting.rs

chore: cargo fmt the workspace
metis Daniel Däschle · pushed by metis · 2 weeks ago
a6592765 History
create_test_meeting.rs 640 B Download Raw
1//! Creates a "Native client test" Meet now meeting and prints its join link (call end-to-end test).
2use session::{DEFAULT_ENDPOINT, Session};
3
4const SUBJECT: &str = "Native client test";
5
6#[tokio::main]
7async fn main() {
8 let endpoint = std::env::var("CDP_ENDPOINT").unwrap_or_else(|_| DEFAULT_ENDPOINT.to_owned());
9 let session = Session::connect(&endpoint).await.expect("browser");
10 match chatsvc::Calendar::new(&session)
11 .create_meet_now(SUBJECT)
12 .await
13 {
14 Ok(link) => println!("{link}"),
15 Err(error) => {
16 eprintln!("{error}");
17 std::process::exit(1);
18 }
19 }
20}