kitchen-freezer/src/bin/dummy.rs

18 lines
545 B
Rust
Raw Normal View History

2021-02-24 23:49:20 +01:00
use my_tasks::client::Client;
use my_tasks::settings::URL;
use my_tasks::settings::USERNAME;
use my_tasks::settings::PASSWORD;
#[tokio::main]
async fn main() {
// This is just a function to silence "unused function" warning
let mut client = Client::new(URL, USERNAME, PASSWORD).unwrap();
let calendars = client.get_calendars().await.unwrap();
let _ = calendars.iter()
.map(|cal| println!(" {}\t{}", cal.name(), cal.url().as_str()))
.collect::<()>();
let _ = client.get_tasks(&calendars[3].url()).await;
}