Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.81 KB | None | 0 0
  1. <<<<<<< c6576bec59c43a66ff96241ab8d7233a8f2242c2
  2. <<<<<<< 813fa8246c30760a3e884badaf9fa65e191a740d
  3.     async def get_events_within_period(self, id: str, time_from: str, time_end: str, no_cache=False):
  4. =======
  5.     async def get_events_on_time(self, id, time_from, time_end, no_cache=False):
  6. >>>>>>> Add maintenance module
  7. =======
  8.     async def get_events_within_period(self, id, time_from, time_end, no_cache=False):
  9. >>>>>>> Fix in maintenance module
  10.         """Вернуть список событий в календаре за указанный промежуток времени.
  11.  
  12.        :param id: Идентификатор календаря.
  13.        :param no_cache: Если True, создаётся запрос в API, минуя кэш.
  14. <<<<<<< 813fa8246c30760a3e884badaf9fa65e191a740d
  15.        :param time_from: Время начала поиска событий в формате %Y-%m-%dT%H:%M:%S
  16.        :param time_end: Время конца поиска событий в формате %Y-%m-%dT%H:%M:%S
  17.        """
  18.         if no_cache:
  19.             return await self._get_events_within_period(id, time_from, time_end)
  20.         return self._calendars.get(id, [])[:]
  21.  
  22.     async def _get_events_within_period(self,  id: str, time_from: str, time_end: str):
  23. =======
  24.         """
  25.        if no_cache:
  26.            return await self._get_events_within_period(id, time_from, time_end)
  27.        return self._calendars.get(id, [])[:]
  28.  
  29. <<<<<<< c6576bec59c43a66ff96241ab8d7233a8f2242c2
  30.    async def _get_events_on_time(self,  id, time_from, time_end):
  31. >>>>>>> Add maintenance module
  32. =======
  33.    async def _get_events_within_period(self,  id, time_from, time_end):
  34. >>>>>>> Fix in maintenance module
  35.        return await self.context.calendar.get_events(
  36.            id, time_from, time_end, timeout=TIMEOUT)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement