Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <<<<<<< c6576bec59c43a66ff96241ab8d7233a8f2242c2
- <<<<<<< 813fa8246c30760a3e884badaf9fa65e191a740d
- async def get_events_within_period(self, id: str, time_from: str, time_end: str, no_cache=False):
- =======
- async def get_events_on_time(self, id, time_from, time_end, no_cache=False):
- >>>>>>> Add maintenance module
- =======
- async def get_events_within_period(self, id, time_from, time_end, no_cache=False):
- >>>>>>> Fix in maintenance module
- """Вернуть список событий в календаре за указанный промежуток времени.
- :param id: Идентификатор календаря.
- :param no_cache: Если True, создаётся запрос в API, минуя кэш.
- <<<<<<< 813fa8246c30760a3e884badaf9fa65e191a740d
- :param time_from: Время начала поиска событий в формате %Y-%m-%dT%H:%M:%S
- :param time_end: Время конца поиска событий в формате %Y-%m-%dT%H:%M:%S
- """
- if no_cache:
- return await self._get_events_within_period(id, time_from, time_end)
- return self._calendars.get(id, [])[:]
- async def _get_events_within_period(self, id: str, time_from: str, time_end: str):
- =======
- """
- if no_cache:
- return await self._get_events_within_period(id, time_from, time_end)
- return self._calendars.get(id, [])[:]
- <<<<<<< c6576bec59c43a66ff96241ab8d7233a8f2242c2
- async def _get_events_on_time(self, id, time_from, time_end):
- >>>>>>> Add maintenance module
- =======
- async def _get_events_within_period(self, id, time_from, time_end):
- >>>>>>> Fix in maintenance module
- return await self.context.calendar.get_events(
- id, time_from, time_end, timeout=TIMEOUT)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement