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§
Structs§
- Calendar
- A remote CalDAV calendar.
- Event
- An event in a CalDAV calendar.
- Event
Builder - Property
Enums§
- Credentials
- Error
- Errors that may occur during minicalav operations.
Functions§
- get_
calendars - Get all calendars from the given CalDAV endpoint.
- get_
events - 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_
todos - 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. - parse_
ical - Parses the given string into the Ical struct.
- remove_
event - Remove the given event on the CalDAV server.
- save_
event - Save the given event on the CalDAV server.