1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// minicaldav: Small and easy CalDAV client.
// Copyright (C) 2022 Florian Loers
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

//! 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
//!
//! ```rust,no_run
//! let agent = ureq::Agent::new();
//! let url = 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);
//!     }
//! }
//! ```

#[macro_use]
extern crate log;

mod api;
pub mod caldav;
pub mod ical;
pub use api::*;