diff --git a/program/views.py b/program/views.py index 01245a7fc6d5382f37fef288d64042b13815af41..79406df54f2c51dcbac843d573cd13973c0aa0e8 100644 --- a/program/views.py +++ b/program/views.py @@ -171,6 +171,20 @@ def json_day_schedule(request, year=None, month=None, day=None): ) +@extend_schema_view( + create=extend_schema(summary="List playout."), + list=extend_schema( + summary="List scheduled playout.", + description=( + "Returns a list of the scheduled playout." + "Expects parameters `start` (date), `end` (date), and `includeVirtual` (boolean)." + "- `start` is today by default." + "- `end` is one week after the start date by default." + "- `includeVirtual` is false by default." + "The schedule will include virtual timeslots to fill unscheduled gaps if requested." + ), + ), +) class APIPlayoutViewSet( mixins.ListModelMixin, viewsets.GenericViewSet, @@ -180,15 +194,6 @@ class APIPlayoutViewSet( def list(self, request, *args, **kwargs): """ Return a JSON representation of the scheduled playout. - - Expects GET parameters `start` (date), `end` (date), and `includeVirtual` (boolean). - - - `start` is today by default. - - `end` is one week after the start date by default. - - `includeVirtual` is false by default. - - The schedule will include virtual timeslots to fill unscheduled gaps if requested. - Called by - engine (playout) to retrieve timeslots within a given timerange - internal calendar to retrieve all timeslots for a week