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
CalDAV client implementation using ureq.
ical
Implementation of ICAL parsing.

Structs§

Calendar
A remote CalDAV calendar.
Event
An event in a CalDAV calendar.
EventBuilder
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.