Crates.io | minicaldav |
lib.rs | minicaldav |
version | 0.8.0 |
source | src |
created_at | 2022-03-16 19:07:35.199058 |
updated_at | 2023-07-02 20:41:07.084774 |
description | Minimal caldav client |
homepage | |
repository | https://gitlab.com/floers/minicaldav |
max_upload_size | |
id | 551363 |
size | 152,847 |
Small and easy CalDAV client.
minicaldav is a caldav client and basic ical parser with as little dependencies as possible (but practical).
use url::Url;
use ureq::Agent;
pub fn main() {
let agent = Agent::new();
let url = Url::parse("http://mycaldav.com/").unwrap();
let username = "foo";
let password = "s3cret!";
let calendars = minicaldav::get_calendars(agent.clone(), username, password, &url).unwrap();
for calendar in calendars {
println!("{:?}", calendar);
let (events, errors) = minicaldav::get_events(agent.clone(), username, password, &calendar).unwrap();
for event in events {
println!("{:?}", event);
}
for error in errors {
println!("Error: {:?}", error);
}
}
}
minicaldav can either provide a ready-to-use caldav client by using all features or provide only parts.
The bare minimum is just the ical types and parser:
minicaldav = { version = "*", default-features = false, features = [ "ical" ] }
If you want to have a caldav client:
minicaldav = { version = "*" }
If you do need serde:
minicaldav = { version = "*", features = [ "serde" ] }
If you want to compile a basic CLI:
cargo build --bin minicaldav-cli --features cli