|
|
|
@ -76,8 +76,9 @@ class calendar_api(API): |
|
|
|
page_token = calendar_list.get("nextPageToken") |
|
|
|
return cl |
|
|
|
|
|
|
|
def get_events(self, cal_id, **params): |
|
|
|
def get_events(self, **params): |
|
|
|
"""Return events with params""" |
|
|
|
cal_id = params.pop("cal_id") |
|
|
|
service = self.service |
|
|
|
try: |
|
|
|
cal_id = self.ids[cal_id] |
|
|
|
@ -103,11 +104,11 @@ class calendar_api(API): |
|
|
|
): |
|
|
|
"""Returns events in between the given time range""" |
|
|
|
if start_date is not None: |
|
|
|
start_date = to_dateTime(start_date) |
|
|
|
start_date = start_date.isoformat() |
|
|
|
if end_date is not None: |
|
|
|
end_date = to_dateTime(end_date) |
|
|
|
end_date = end_date.isoformat() |
|
|
|
|
|
|
|
self.get_events(self, cal_id=cal_id, timeMin=start_date, timeMax=end_date) |
|
|
|
yield from self.get_events(cal_id=cal_id, timeMin=start_date, timeMax=end_date) |
|
|
|
|
|
|
|
def get_event_by_id(self, cal_id, event_id): |
|
|
|
"""Retrieves event from cal_id and event_id""" |
|
|
|
|