Add Api-Logic

- THIS COMMIT IS ONLY FOR DATA SAFETY PURPOSES
- Missing: corrent auth token generation
- clean format/ "use"
- will fix both in an upcoming commit
This commit is contained in:
CramMK
2020-01-14 09:40:22 +01:00
parent af876b3519
commit 49ceef2a7f
7 changed files with 319 additions and 91 deletions

27
examples/auth.rs Normal file
View File

@@ -0,0 +1,27 @@
use std::env;
use irssi_wire::net::wire_api::{
wire_client::WireClient,
auth::Config,
conversations::Conversations,
members::Members,
self_info::SelfInfo,
};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut client = WireClient::new(
env::var("EMAIL").unwrap(),
env::var("PW").unwrap(),
Config::Default,
);
let auth_response = client
.authentification()
.await
.unwrap();
dbg!(client);
Ok(())
}