mod sharry; use log::info; use sharry::{Alias, File, NewShareRequest, Share}; use std::time::Duration; use ureq::Agent; fn main() { env_logger::init(); let agent: Agent = Agent::config_builder() .timeout_global(Some(Duration::from_secs(5))) .build() .into(); let alias = Alias::new( "sharry.yavook.de".into(), "G7RYoWME1W7-pcgipemJcr8-39FcMd92gBu-RgufeHc51z6", ); let share = NewShareRequest::new(Some("foo"), "", 10); let share = Share::create(&agent, &alias, share).unwrap(); info!("share: {:?}", share); let file = File::create(&agent, &share, "/lib/x86_64-linux-gnu/liblldb-14.so.1").unwrap(); info!("file: {:?}", file); share.notify(&agent).unwrap(); }