This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
devicehub-teal/ereuse_devicehub/resources/event/__init__.py

16 lines
386 B
Python

from ereuse_devicehub.resources.event.schemas import Snapshot, Event
from ereuse_devicehub.resources.event.views import EventView, SnapshotView
from teal.resource import Converters, Resource
class EventDef(Resource):
SCHEMA = Event
VIEW = EventView
AUTH = True
ID_CONVERTER = Converters.int
class SnapshotDef(EventDef):
SCHEMA = Snapshot
VIEW = SnapshotView