implement auto reauth
This commit is contained in:
@ -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(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user