diff --git a/gcsa/_services/authentication.py b/gcsa/_services/authentication.py index 2058229..302d3ae 100644 --- a/gcsa/_services/authentication.py +++ b/gcsa/_services/authentication.py @@ -13,7 +13,6 @@ class AuthenticatedService: """Handles authentication of the `GoogleCalendar`""" _READ_WRITE_SCOPES = 'https://www.googleapis.com/auth/calendar' - _LIST_ORDERS = ("startTime", "updated") def __init__( self, diff --git a/gcsa/_services/events_service.py b/gcsa/_services/events_service.py index 798697b..0b6057c 100644 --- a/gcsa/_services/events_service.py +++ b/gcsa/_services/events_service.py @@ -27,6 +27,8 @@ class SendUpdatesMode: class EventsService(BaseService): """Event management methods of the `GoogleCalendar`""" + _EVENTS_LIST_ORDERS = ("startTime", "updated") + def _list_events( self, request_method: Callable, @@ -174,7 +176,7 @@ def __getitem__(self, r): if ( (time_min and not isinstance(time_min, (date, datetime))) or (time_max and not isinstance(time_max, (date, datetime))) - or (order_by and (not isinstance(order_by, str) or order_by not in self._LIST_ORDERS)) + or (order_by and (not isinstance(order_by, str) or order_by not in self._EVENTS_LIST_ORDERS)) ): raise ValueError('Calendar indexing is in the following format: time_min[:time_max[:order_by]],' ' where time_min and time_max are date/datetime objects'