Crate minicaldav
source ·Expand description
minicaldav
minicaldav is a caldav client and basic ical parser with as little dependencies as possible (but practical).
minicaldav should be
- Simple: Few dependencies, no async, the code is simple
minicaldav is work in progress
- The code is not feature complete
- The code is not correct
Quick Start
let agent = ureq::Agent::new();
let url = url::Url::parse("http://mycaldav.com/").unwrap();
let username = "foo";
let password = "s3cret!";
let credentials = minicaldav::Credentials::Basic(username.into(), password.into());
let calendars = minicaldav::get_calendars(agent.clone(), &credentials, &url).unwrap();
for calendar in calendars {
println!("{:?}", calendar);
let credentials = minicaldav::Credentials::Basic(username.into(), password.into());
let (events, errors) = minicaldav::get_events(agent.clone(), &credentials, &calendar).unwrap();
for event in events {
println!("{:?}", event);
}
for error in errors {
println!("Error: {:?}", error);
}
}
Modules
- CalDAV client implementation using ureq.
- Implementation of ICAL parsing.
Structs
- A remote CalDAV calendar.
- An event in a CalDAV calendar.
Enums
- Errors that may occur during minicalav operations.
Functions
- Get all calendars from the given CalDAV endpoint.
- Get all events in the given
Calendar
. This function returns a tuple of all events that could be parsed and all events that couldn’t. If anything besides parsing the event data fails, an Err will be returned. - Get all todos in the given
Calendar
. This function returns a tuple of all todos that could be parsed and all todos that couldn’t. If anything besides parsing the todo data fails, an Err will be returned. - Parses the given string into the Ical struct.
- Remove the given event on the CalDAV server.
- Save the given event on the CalDAV server.