diff --git a/program/views.py b/program/views.py index 4385c785edf57d4fa72e2439fd709689e0fd46b9..1b113ec632c002804d3dbdee4243675f83dce19f 100644 --- a/program/views.py +++ b/program/views.py @@ -107,10 +107,34 @@ class AbstractAPIProgramViewSet( @extend_schema_view( list=extend_schema( + examples=[ + OpenApiExample( + "Example entry", + value={ + "end": "2024-07-15T15:30:00-04:00", + "id": "2024-07-15T19:07:38.604349+00:00...2024-07-15T19:30:00+00:00", + "playlistId": None, + "showId": 1, + "start": "2024-07-15T15:07:38.604349-04:00", + "timeslotId": None, + }, + ), + OpenApiExample( + "Example virtual entry", + value={ + "end": "2024-07-15T18:00:00-04:00", + "id": "2024-07-15T19:30:00+00:00...2024-07-15T22:00:00+00:00", + "playlistId": None, + "showId": 3, + "start": "2024-07-15T15:30:00-04:00", + "timeslotId": 141, + }, + ), + ], summary=( "List program for a specific date range. " "Only returns the most basic data for clients that fetch other data themselves." - ) + ), ), ) class APIProgramBasicViewSet(AbstractAPIProgramViewSet): @@ -119,11 +143,53 @@ class APIProgramBasicViewSet(AbstractAPIProgramViewSet): @extend_schema_view( list=extend_schema( + examples=[ + OpenApiExample( + "Example entry", + value={ + "end": "2024-07-16T12:30:00-04:00", + "episode": {"id": 11, "title": ""}, + "id": "2024-07-16T14:00:00+00:00...2024-07-16T16:30:00+00:00", + "playlistId": None, + "schedule": {"defaultPlaylistId": None, "id": 1}, + "show": {"defaultPlaylistId": None, "id": 2, "name": "EINS"}, + "showId": 2, + "start": "2024-07-16T10:00:00-04:00", + "timeslot": { + "end": "2024-07-16T12:30:00-04:00", + "id": 11, + "memo": "", + "noteId": 11, + "playlistId": None, + "repetitionOfId": None, + "scheduleId": 1, + "showId": 2, + "start": "2024-07-16T10:00:00-04:00", + }, + "timeslotId": 11, + }, + ), + OpenApiExample( + "Example virtual entry", + value={ + "end": "2024-07-16T15:23:34.084852-04:00", + "episode": None, + "id": "2024-07-16T16:30:00+00:00...2024-07-16T19:23:34.084852+00:00", + "playlistId": None, + "schedule": None, + "show": {"defaultPlaylistId": None, "id": 1, "name": "Musikpool"}, + "showId": 1, + "start": "2024-07-16T12:30:00-04:00", + "timeslot": None, + "timeslotId": None, + }, + ), + ], summary=( "List program for a specific date range. " "Returns an extended program dataset for use in the AURA engine. " "Not recommended for other tools." - ) + ), ), ) class APIProgramPlayoutViewSet(AbstractAPIProgramViewSet):