implement auto reauth

This commit is contained in:
lemonsh
2023-04-30 19:43:34 +02:00
parent 6ad2534983
commit 7838ca1978
3 changed files with 63 additions and 33 deletions

View File

@ -11,11 +11,11 @@ async fn main() -> Result<()> {
let ip = args.next().expect("no ip specified");
let code = args.next().expect("no code specified");
let connect_box = ConnectBox::new(ip)?;
connect_box.login(&code).await?;
let connect_box = ConnectBox::new(ip, code)?;
connect_box.login().await?;
let devices = connect_box.get_devices().await?;
println!("{devices:?}");
println!("{devices:#?}");
Ok(())
}