From: Matthew Vernon Date: Fri, 5 Oct 2018 09:05:51 +0000 (+0100) Subject: Remove GlobalObjectId code X-Git-Tag: v0.1~36 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~matthewv/git?a=commitdiff_plain;h=a6e50d21fa82e2fcde3a080bbab5207016c2c811;p=gooswapper Remove GlobalObjectId code Firstly, we can use item_id instead; secondly, it doesn't always actually work :-/ --- diff --git a/gooswapper.py b/gooswapper.py index 0a8a050..25a84ef 100644 --- a/gooswapper.py +++ b/gooswapper.py @@ -51,17 +51,6 @@ class ex_gcal_link(exchangelib.ExtendedProperty): exchangelib.CalendarItem.register('gcal_link',ex_gcal_link) -#see docs for exchangelib.UID for why this is needed -class GlobalObjectId(exchangelib.ExtendedProperty): - distinguished_property_set_id = 'Meeting' - property_id = 3 - property_type = 'Binary' - -exchangelib.CalendarItem.register('global_object_id', GlobalObjectId) - -def get_ex_event_by_uid(calendar,uid): - return calendar.get(global_object_id=GlobalObjectId(exchangelib.UID(uid))) - def get_ex_event_by_itemid(calendar,itemid): return calendar.get(item_id=itemid)