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:
27
examples/auth.rs
Normal file
27
examples/auth.rs
Normal 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(())
|
||||
}
|
||||
Reference in New Issue
Block a user