# HG changeset patch # User Paul Boddie # Date 1505771699 -7200 # Node ID 65e999dd88f08638eee54d3c6e69954fc1c12630 # Parent 4997a1dc6e66dda0b95dec7a296b14c839b59c93 Added a convenience method for loading objects. Added docstrings. diff -r 4997a1dc6e66 -r 65e999dd88f0 imiptools/client.py --- a/imiptools/client.py Mon Sep 18 22:48:58 2017 +0200 +++ b/imiptools/client.py Mon Sep 18 23:54:59 2017 +0200 @@ -425,6 +425,12 @@ self.sequence = obj and self.obj.get_value("SEQUENCE") self.dtstamp = obj and self.obj.get_value("DTSTAMP") + def load_object(self, uid, recurrenceid): + + "Load the object with the given 'uid' and 'recurrenceid'." + + self.set_object(self.get_stored_object(uid, recurrenceid)) + def set_identity(self, method): """ @@ -577,6 +583,10 @@ obj.set_datetime("DTSTART", p.get_start()) obj.set_datetime("DTEND", p.get_end()) + # Acquire the original recurrence identifier associated with + # this period. This may differ where the start of the period has + # changed. + dt, attr = p.get_recurrenceid_item() obj["RECURRENCE-ID"] = [(format_datetime(dt), attr)] @@ -883,6 +893,10 @@ If 'to_reschedule' is specified, a list of periods to be rescheduled is provided. + + Note that this method, although similar to get_message_parts, processes + the core object and the explicitly-specified objects, not the separate + recurrence instances that are already stored. """ # Here, the organiser should be the current user.