pub async fn tum_google_sync(
calendar_id: &str,
_: Option<String>,
_: Option<String>,
events: Vec<CalendarEvent>,
) -> Result<(), Box<dyn Error + Send + Sync>>Expand description
This is a callback which synchronizes your TUM Calendar to your Google Calender.
The event summaries will be shortened and the events themselves modifieable. As soon as you delete an event, it won’t come back. If you modify an event, your changes will only be overwritten if they’re changed in the TUM Calendar.
§Examples
let mut ics_watcher = ICSWatcher::new(
tum_url.as_str(),
vec![
Box::new(move |a, b, e| {
let calendar_id = google_calendar_id.clone();
Box::pin(async move { tum_google_sync(&calendar_id, a, b, e).await })
}),
],
);
// Try to load backup
let _ = ics_watcher.load_backup("TUM Calendar");
ics_watcher
.run(Option::from("TUM Calendar"))
.await
.expect("ICS Watcher crashed");