use chorus::instance::Instance;
use chorus::types::{IntoShared, LoginSchema};
#[tokio::main(flavor = "current_thread")]
async fn main() {
let instance = Instance::new("https://example.com/", None)
.await
.expect("Failed to connect to the Spacebar server")
.into_shared();
let login_schema = LoginSchema {
login: "user@example.com".to_string(),
password: "Correct-Horse-Battery-Staple".to_string(),
..Default::default()
};
let user = Instance::login_account(instance.clone(), login_schema)
.await
.expect("An error occurred during the login process");
dbg!(user.belongs_to);
dbg!(&user.object.read().unwrap().username);
}