Exemple #1
0
 def instances(self):
     """The collection of open extensions defined for the event. Nullable."""
     from office365.calendar.event_collection import EventCollection
     return self.properties.get(
         'instances',
         EventCollection(self.context,
                         ResourcePath("instances", self.resource_path)))
Exemple #2
0
    def get_calendar_view(self, start_dt, end_dt):
        """Get the occurrences, exceptions, and single instances of events in a calendar view defined by a time range,
           from the user's default calendar, or from some other calendar of the user's.

        :param datetime.datetime end_dt: The end date and time of the time range, represented in ISO 8601 format.
             For example, "2019-11-08T20:00:00-08:00".
        :param datetime.datetime start_dt: The start date and time of the time range, represented in ISO 8601 format.
            For example, "2019-11-08T19:00:00-08:00".

        """
        result = EventCollection(self.context, ResourcePath("calendarView", self.resource_path))
        qry = ServiceOperationQuery(self, "calendarView", None, None, None, result)
        self.context.add_query(qry)

        def _construct_request(request):
            request.method = HttpMethod.Get
            request.url += "?startDateTime={0}&endDateTime={1}".format(start_dt.isoformat(), end_dt.isoformat())
        self.context.before_execute(_construct_request)
        return result
Exemple #3
0
 def events(self):
     """Get an event collection or an event."""
     return self.properties.get(
         'events',
         EventCollection(self.context,
                         ResourcePath("events", self.resource_path)))
Exemple #4
0
 def calendarView(self):
     """The calendar view for the calendar. Navigation property. Read-only."""
     return self.properties.get(
         'calendarView',
         EventCollection(self.context,
                         ResourcePath("calendarView", self.resource_path)))
Exemple #5
0
 def events(self):
     """The events in the calendar. Navigation property. Read-only."""
     return self.properties.get(
         'events',
         EventCollection(self.context,
                         ResourcePath("events", self.resource_path)))
Exemple #6
0
 def events(self):
     """Get an event collection or an event."""
     if self.is_property_available('events'):
         return self.properties['events']
     else:
         return EventCollection(self.context, ResourcePath("events", self.resource_path))