Skip to content
Snippets Groups Projects
Verified Commit 53f8a956 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

fix: add example to calendar program view

parent 36564753
No related branches found
No related tags found
1 merge request!52new program endpoint
......@@ -200,6 +200,317 @@ class APIProgramCalendarViewSet(AbstractAPIProgramViewSet):
serializer_class = CalendarSchemaSerializer
@extend_schema(
examples=[
OpenApiExample(
"Example entry with virtual timeslots",
value={
"shows": [
{
"categoryIds": [5],
"cbaSeriesId": None,
"defaultPlaylistId": None,
"description": "",
"email": "ernesto@helsinki.at",
"fundingCategoryId": 1,
"hostIds": [1],
"id": 4,
"imageId": None,
"isActive": True,
"isPublic": True,
"languageIds": [1, 3],
"links": [{"typeId": 1, "url": "https://helsinki.at"}],
"logoId": None,
"musicFocusIds": [4],
"name": "DREI",
"predecessorId": None,
"shortDescription": "chores",
"slug": "drei",
"topicIds": [5],
"typeId": 2,
},
{
"categoryIds": [],
"cbaSeriesId": None,
"defaultPlaylistId": None,
"description": "",
"email": "",
"fundingCategoryId": 1,
"hostIds": [1],
"id": 2,
"imageId": None,
"isActive": True,
"isPublic": True,
"languageIds": [],
"links": [],
"logoId": None,
"musicFocusIds": [],
"name": "EINS",
"predecessorId": None,
"shortDescription": "shallow work",
"slug": "eins",
"topicIds": [],
"typeId": 5,
},
{
"categoryIds": [],
"cbaSeriesId": None,
"defaultPlaylistId": None,
"description": "",
"email": "",
"fundingCategoryId": 1,
"hostIds": [],
"id": 1,
"imageId": None,
"isActive": True,
"isPublic": True,
"languageIds": [],
"links": [],
"logoId": None,
"musicFocusIds": [],
"name": "Musikpool",
"predecessorId": None,
"shortDescription": "Musik aus der Dose",
"slug": "musikpool",
"topicIds": [],
"typeId": 3,
},
{
"categoryIds": [],
"cbaSeriesId": None,
"defaultPlaylistId": None,
"description": "",
"email": "",
"fundingCategoryId": 1,
"hostIds": [1],
"id": 3,
"imageId": None,
"isActive": True,
"isPublic": True,
"languageIds": [],
"links": [],
"logoId": None,
"musicFocusIds": [],
"name": "ZWEI",
"predecessorId": None,
"shortDescription": "deep work",
"slug": "zwei",
"topicIds": [],
"typeId": 5,
},
],
"timeslots": [
{
"playlistId": None,
"repetitionOfId": None,
"end": "2024-07-22T18:00:00-04:00",
"id": 146,
"noteId": 146,
"scheduleId": 2,
"showId": 3,
"start": "2024-07-22T15:30:00-04:00",
},
{
"playlistId": None,
"repetitionOfId": None,
"end": "2024-07-22T23:00:00-04:00",
"id": 267,
"noteId": 267,
"scheduleId": 3,
"showId": 4,
"start": "2024-07-22T20:30:00-04:00",
},
{
"playlistId": None,
"repetitionOfId": None,
"end": "2024-07-23T12:30:00-04:00",
"id": 16,
"noteId": 16,
"scheduleId": 1,
"showId": 2,
"start": "2024-07-23T10:00:00-04:00",
},
],
"profiles": [
{
"biography": "",
"email": "",
"id": 1,
"imageId": None,
"isActive": True,
"links": [],
"name": "Ernesto",
}
],
"categories": [
{
"description": "",
"id": 5,
"isActive": True,
"name": "Mehr-/Fremdsprachig",
"slug": "mehr-fremdsprachig",
"subtitle": "",
}
],
"fundingCategories": [
{"id": 1, "isActive": True, "name": "Standard", "slug": "standard"}
],
"types": [
{
"id": 5,
"isActive": True,
"name": "Experimentell",
"slug": "experimentell",
},
{
"id": 2,
"isActive": True,
"name": "Musiksendung",
"slug": "musiksendung",
},
{
"id": 3,
"isActive": True,
"name": "Unmoderiertes Musikprogramm",
"slug": "unmoderiertes-musikprogramm",
},
],
"images": [],
"topics": [
{
"id": 5,
"isActive": True,
"name": "Wissenschaft/Philosophie",
"slug": "wissenschaft-philosophie",
}
],
"languages": [
{"id": 1, "isActive": True, "name": "Deutsch"},
{"id": 3, "isActive": True, "name": "Spanisch"},
],
"musicFocuses": [
{"id": 4, "isActive": True, "name": "Rock/Indie", "slug": "rock-indie"}
],
"program": [
{
"id": "2024-07-22T15:26:44.738502+00:00...2024-07-22T19:30:00+00:00",
"start": "2024-07-22T11:26:44.738502-04:00",
"end": "2024-07-22T15:30:00-04:00",
"timeslotId": None,
"playlistId": None,
"showId": 1,
},
{
"id": "2024-07-22T19:30:00+00:00...2024-07-22T22:00:00+00:00",
"start": "2024-07-22T15:30:00-04:00",
"end": "2024-07-22T18:00:00-04:00",
"timeslotId": 146,
"playlistId": None,
"showId": 3,
},
{
"id": "2024-07-22T22:00:00+00:00...2024-07-23T00:30:00+00:00",
"start": "2024-07-22T18:00:00-04:00",
"end": "2024-07-22T20:30:00-04:00",
"timeslotId": None,
"playlistId": None,
"showId": 1,
},
{
"id": "2024-07-23T00:30:00+00:00...2024-07-23T03:00:00+00:00",
"start": "2024-07-22T20:30:00-04:00",
"end": "2024-07-22T23:00:00-04:00",
"timeslotId": 267,
"playlistId": None,
"showId": 4,
},
{
"id": "2024-07-23T03:00:00+00:00...2024-07-23T14:00:00+00:00",
"start": "2024-07-22T23:00:00-04:00",
"end": "2024-07-23T10:00:00-04:00",
"timeslotId": None,
"playlistId": None,
"showId": 1,
},
{
"id": "2024-07-23T14:00:00+00:00...2024-07-23T16:30:00+00:00",
"start": "2024-07-23T10:00:00-04:00",
"end": "2024-07-23T12:30:00-04:00",
"timeslotId": 16,
"playlistId": None,
"showId": 2,
},
{
"id": "2024-07-23T16:30:00+00:00...2024-07-23T15:26:44.738502+00:00",
"start": "2024-07-23T12:30:00-04:00",
"end": "2024-07-23T11:26:44.738502-04:00",
"timeslotId": None,
"playlistId": None,
"showId": 1,
},
],
"episodes": [
{
"cbaId": None,
"content": "",
"contributorIds": [],
"id": 146,
"imageId": None,
"languageIds": [],
"links": [],
"summary": "",
"tags": [],
"timeslotId": 146,
"title": "",
"topicIds": [],
},
{
"cbaId": None,
"content": "",
"contributorIds": [],
"id": 267,
"imageId": None,
"languageIds": [],
"links": [],
"summary": "",
"tags": [],
"timeslotId": 267,
"title": "",
"topicIds": [],
},
{
"cbaId": None,
"content": "",
"contributorIds": [],
"id": 16,
"imageId": None,
"languageIds": [],
"links": [],
"summary": "",
"tags": [],
"timeslotId": 16,
"title": "",
"topicIds": [],
},
],
"licenses": [],
"linkTypes": [
{"id": 2, "isActive": True, "name": "CBA"},
{"id": 11, "isActive": True, "name": "Facebook"},
{"id": 3, "isActive": True, "name": "Freie Radios Online"},
{"id": 4, "isActive": True, "name": "Funkwhale"},
{"id": 10, "isActive": True, "name": "Instagram"},
{"id": 7, "isActive": True, "name": "Internet Archive (archive.org)"},
{"id": 13, "isActive": True, "name": "Mastodon"},
{"id": 5, "isActive": True, "name": "Mixcloud"},
{"id": 6, "isActive": True, "name": "SoundCloud"},
{"id": 9, "isActive": True, "name": "Spotify"},
{"id": 12, "isActive": True, "name": "Twitter"},
{"id": 1, "isActive": True, "name": "Website"},
{"id": 8, "isActive": True, "name": "YouTube"},
],
},
)
],
summary=(
"List program for a specific date range. "
"Returns all relevant data for the specified time frame."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment