Пример #1
0
 def getEventList(self, year):
     result = self._parse(self.FMS_API_EVENT_LIST_URL_PATTERN % (year),
                          FMSAPIEventListParser(year))
     if result:
         return result
     else:
         return [], []
Пример #2
0
 def getEventDetails(self, event_key):
     year = int(event_key[:4])
     event_short = event_key[4:]
     events, districts = self._parse(
         self.FMS_API_EVENT_DETAILS_URL_PATTERN %
         (year, self._get_event_short(event_short)),
         FMSAPIEventListParser(year))
     return events, districts
Пример #3
0
 def getSyncEnabledOffseasonEvents(self, year):
     result = self._parse(
         self.FMS_API_EVENT_LIST_URL_PATTERN % (year),
         FMSAPIEventListParser(
             year,
             event_types_override={
                 'offseasonwithazuresync': EventType.OFFSEASON,
             },
         ))
     return result
Пример #4
0
    def getEventDetails(self, event_key):
        year = int(event_key[:4])
        event_short = event_key[4:]

        event = Event.get_by_id(event_key)
        api_event_short = self._get_event_short(event_short, event)
        result = self._parse(
            self.FMS_API_EVENT_DETAILS_URL_PATTERN % (year, api_event_short),
            FMSAPIEventListParser(year, short=event_short))
        if result:
            return result
        else:
            return [], []
 def getEventList(self, year):
     events = self._parse(self.FMS_API_EVENT_LIST_URL_PATTERN % (year),
                          FMSAPIEventListParser(year))
     return events