| 1 | //! Creates a "Native client test" Meet now meeting and prints its join link (call end-to-end test). |
| 2 | use session::{DEFAULT_ENDPOINT, Session}; |
| 3 | |
| 4 | const SUBJECT: &str = "Native client test"; |
| 5 | |
| 6 | #[tokio::main] |
| 7 | async 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 | } |