BlueGit

ict rusty-teams

Files

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

create_test_meeting.rs

create_test_meeting.rs 618 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).create_meet_now(SUBJECT).await {
11 Ok(link) => println!("{link}"),
12 Err(error) => {
13 eprintln!("{error}");
14 std::process::exit(1);
15 }
16 }
17}