def getAllowedFormats(cls): return Serializer.getAllFormats()
@HTTPAPIHook.register class ContributionHook(SessionContribHook): RE = r'(?P<event>[\w\s]+)/contribution/(?P<idlist>\w+(?:-\w+)*)' def _getParams(self): super(ContributionHook, self)._getParams() self._type = 'contribution' class ContributionFetcher(SessionContribFetcher): DETAIL_INTERFACES = { 'contributions': IContributionMetadataFossil, 'subcontributions': IContributionMetadataWithSubContribsFossil, } def contribution(self, idlist): ch = ConferenceHolder() event = ch.getById(self._eventId) def _iterate_objs(objIds): for objId in objIds: obj = event.getContributionById(objId) if obj is not None: yield obj return self._process(_iterate_objs(idlist)) Serializer.register('html', HTML4Serializer) Serializer.register('jsonp', JSONPSerializer) Serializer.register('ics', ICalSerializer) Serializer.register('atom', AtomSerializer)
RE = r'(?P<event>[\w\s]+)/contribution/(?P<idlist>\w+(?:-\w+)*)' def _getParams(self): super(ContributionHook, self)._getParams() self._type = 'contribution' class ContributionFetcher(SessionContribFetcher): DETAIL_INTERFACES = { 'contributions': IContributionMetadataFossil, 'subcontributions': IContributionMetadataWithSubContribsFossil, } def contribution(self, idlist): ch = ConferenceHolder() event = ch.getById(self._eventId) def _iterate_objs(objIds): for objId in objIds: obj = event.getContributionById(objId) if obj is not None: yield obj return self._process(_iterate_objs(idlist)) Serializer.register('html', HTML4Serializer) Serializer.register('jsonp', JSONPSerializer) Serializer.register('ics', ICalSerializer) Serializer.register('atom', AtomSerializer)