From 631dbc67c31fa6f9fe12bc007e899c600dd16973 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 4 Apr 2012 12:04:37 +1200 Subject: [PATCH] Add a GetTodoByUid( $uid, $relative_url = '') method. --- inc/caldav-client-v2.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/inc/caldav-client-v2.php b/inc/caldav-client-v2.php index 94ec7d9a..42732e43 100644 --- a/inc/caldav-client-v2.php +++ b/inc/caldav-client-v2.php @@ -948,6 +948,34 @@ EOFILTER; } + /** + * Get the calendar entry by UID + * + * @param uid + * @param string $relative_url The URL relative to the base_url specified when the calendar was opened. Default ''. + * + * @return array An array of the relative URL, etag, and calendar data returned from DoCalendarQuery() @see DoCalendarQuery() + */ + function GetTodoByUid( $uid, $relative_url = '' ) { + $filter = ""; + if ( $uid ) { + $filter = << + + + + $uid + + + + +EOFILTER; + } + + return $this->DoCalendarQuery($filter, $relative_url); + } + + /** * Get the calendar entry by HREF *