diff --git a/schemas/openapi-tank.json b/schemas/openapi-tank.json index b19876a1b8afed2c750bcf2bc5c9bfab9b91ec0e..ca1010dc0491535fbb30a17a8431eeb9ea17df76 100644 --- a/schemas/openapi-tank.json +++ b/schemas/openapi-tank.json @@ -35,7 +35,7 @@ "metadata": { "$ref": "#/components/schemas/FileMetadata" }, - "show": { + "showName": { "type": "string" }, "size": { @@ -113,10 +113,10 @@ "id": { "type": "integer" }, - "playout-mode": { + "playoutMode": { "type": "string" }, - "show": { + "showName": { "type": "string" }, "updated": { diff --git a/src/aura_tank_api/models/file.py b/src/aura_tank_api/models/file.py index b408d50d2110fd027d0c1edd8337887a3b60579c..91a95e0a8f688f33f63e4e75cfb4a10537449235 100644 --- a/src/aura_tank_api/models/file.py +++ b/src/aura_tank_api/models/file.py @@ -20,7 +20,7 @@ class File: duration (Union[Unset, int]): id (Union[Unset, int]): metadata (Union[Unset, FileMetadata]): - show (Union[Unset, str]): + show_name (Union[Unset, str]): size (Union[Unset, int]): source (Union[Unset, FileSource]): updated (Union[Unset, str]): @@ -30,7 +30,7 @@ class File: duration: Union[Unset, int] = UNSET id: Union[Unset, int] = UNSET metadata: Union[Unset, "FileMetadata"] = UNSET - show: Union[Unset, str] = UNSET + show_name: Union[Unset, str] = UNSET size: Union[Unset, int] = UNSET source: Union[Unset, "FileSource"] = UNSET updated: Union[Unset, str] = UNSET @@ -44,7 +44,7 @@ class File: if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() - show = self.show + show_name = self.show_name size = self.size source: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.source, Unset): @@ -63,8 +63,8 @@ class File: field_dict["id"] = id if metadata is not UNSET: field_dict["metadata"] = metadata - if show is not UNSET: - field_dict["show"] = show + if show_name is not UNSET: + field_dict["showName"] = show_name if size is not UNSET: field_dict["size"] = size if source is not UNSET: @@ -93,7 +93,7 @@ class File: else: metadata = FileMetadata.from_dict(_metadata) - show = d.pop("show", UNSET) + show_name = d.pop("showName", UNSET) size = d.pop("size", UNSET) @@ -111,7 +111,7 @@ class File: duration=duration, id=id, metadata=metadata, - show=show, + show_name=show_name, size=size, source=source, updated=updated, diff --git a/src/aura_tank_api/models/playlist.py b/src/aura_tank_api/models/playlist.py index 426ed62b51e51f5b19fb25576027478d8de65cbf..2518550d2afd667bdd0487739b563b6eb6cead46 100644 --- a/src/aura_tank_api/models/playlist.py +++ b/src/aura_tank_api/models/playlist.py @@ -20,7 +20,7 @@ class Playlist: entries (Union[Unset, List['PlaylistEntry']]): id (Union[Unset, int]): playout_mode (Union[Unset, str]): - show (Union[Unset, str]): + show_name (Union[Unset, str]): updated (Union[Unset, str]): """ @@ -29,7 +29,7 @@ class Playlist: entries: Union[Unset, List["PlaylistEntry"]] = UNSET id: Union[Unset, int] = UNSET playout_mode: Union[Unset, str] = UNSET - show: Union[Unset, str] = UNSET + show_name: Union[Unset, str] = UNSET updated: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -46,7 +46,7 @@ class Playlist: id = self.id playout_mode = self.playout_mode - show = self.show + show_name = self.show_name updated = self.updated field_dict: Dict[str, Any] = {} @@ -61,9 +61,9 @@ class Playlist: if id is not UNSET: field_dict["id"] = id if playout_mode is not UNSET: - field_dict["playout-mode"] = playout_mode - if show is not UNSET: - field_dict["show"] = show + field_dict["playoutMode"] = playout_mode + if show_name is not UNSET: + field_dict["showName"] = show_name if updated is not UNSET: field_dict["updated"] = updated @@ -87,9 +87,9 @@ class Playlist: id = d.pop("id", UNSET) - playout_mode = d.pop("playout-mode", UNSET) + playout_mode = d.pop("playoutMode", UNSET) - show = d.pop("show", UNSET) + show_name = d.pop("showName", UNSET) updated = d.pop("updated", UNSET) @@ -99,7 +99,7 @@ class Playlist: entries=entries, id=id, playout_mode=playout_mode, - show=show, + show_name=show_name, updated=updated, ) diff --git a/tests/json/tank-api-v1-playlists-1.json b/tests/json/tank-api-v1-playlists-1.json index 8833a994cc937470d7a6163161abc60e8b899015..4c4b3348eb07b20930de9d785ffb1921c07452d4 100644 --- a/tests/json/tank-api-v1-playlists-1.json +++ b/tests/json/tank-api-v1-playlists-1.json @@ -3,8 +3,8 @@ "created":"2023-02-28T15:25:38.684803+01:00", "updated":"2023-02-28T15:25:38.684803+01:00", "description":"test", - "playout-mode":"linear", - "show":"musikprogramm", + "playoutMode":"linear", + "showName":"musikprogramm", "entries":[ { "uri":"file://musikprogramm/2", @@ -13,7 +13,7 @@ "id":2, "created":"2023-02-28T14:42:09.540485+01:00", "updated":"2023-02-28T14:42:17.564099+01:00", - "show":"musikprogramm", + "showName":"musikprogramm", "source":{ "uri":"upload://some-audio-file.flac", "hash":"sha256:b4e1922bad633ff0e11f55611f04cb3807d15d70bb09969d2b324373af47b574", diff --git a/tests/test_scheduling_api_fetcher.py b/tests/test_scheduling_api_fetcher.py index d4603422d6df90fcc66dc60c5b394999c42a61d4..872d57f03347190d9cc5584b476da5fe1378d591 100644 --- a/tests/test_scheduling_api_fetcher.py +++ b/tests/test_scheduling_api_fetcher.py @@ -107,9 +107,9 @@ class TestSchedulingApiFetcher(unittest.TestCase): self.assertEqual("Wurlitzer", ts1["title"]) self.assertEqual(1, ts1["playlist_id"]) self.assertEqual(1, ts1["playlist"]["id"]) - self.assertEqual("musikprogramm", ts1["playlist"]["show"]) + self.assertEqual("musikprogramm", ts1["playlist"]["showName"]) self.assertEqual("test", ts1["playlist"]["description"]) - self.assertEqual("linear", ts1["playlist"]["playout-mode"]) + self.assertEqual("linear", ts1["playlist"]["playoutMode"]) # Test Timeslot 2 ts2 = response[1] @@ -118,15 +118,15 @@ class TestSchedulingApiFetcher(unittest.TestCase): self.assertEqual("Pepi's Polka II", ts2["title"]) self.assertEqual(1, ts2["playlist_id"]) self.assertEqual(1, ts2["playlist"]["id"]) - self.assertEqual("musikprogramm", ts2["playlist"]["show"]) + self.assertEqual("musikprogramm", ts2["playlist"]["showName"]) self.assertEqual("test", ts2["playlist"]["description"]) - self.assertEqual("linear", ts2["playlist"]["playout-mode"]) - self.assertEqual("musikprogramm", ts2["default_schedule_playlist"]["show"]) + self.assertEqual("linear", ts2["playlist"]["playoutMode"]) + self.assertEqual("musikprogramm", ts2["default_schedule_playlist"]["showName"]) self.assertEqual("test", ts2["default_schedule_playlist"]["description"]) - self.assertEqual("linear", ts2["default_schedule_playlist"]["playout-mode"]) - self.assertEqual("musikprogramm", ts2["default_show_playlist"]["show"]) + self.assertEqual("linear", ts2["default_schedule_playlist"]["playoutMode"]) + self.assertEqual("musikprogramm", ts2["default_show_playlist"]["showName"]) self.assertEqual("test", ts2["default_show_playlist"]["description"]) - self.assertEqual("linear", ts2["default_show_playlist"]["playout-mode"]) + self.assertEqual("linear", ts2["default_show_playlist"]["playoutMode"]) if __name__ == "__main__": diff --git a/tests/test_scheduling_api_tank.py b/tests/test_scheduling_api_tank.py index a5873136fe22840bfd5c367f83a6d88f8cc0f549..06749ef62bd6cf6a58478ba9ffc184e5e3c90333 100644 --- a/tests/test_scheduling_api_tank.py +++ b/tests/test_scheduling_api_tank.py @@ -51,7 +51,7 @@ class TestApiTank(unittest.TestCase): self.assertIsNotNone(playlist.to_dict()) self.assertEqual(1, playlist.id) - self.assertEqual("musikprogramm", playlist.show) + self.assertEqual("musikprogramm", playlist.show_name) self.assertEqual("linear", playlist.playout_mode) self.assertEqual("test", playlist.description) self.assertEqual("2023-02-28T15:25:38.684803+01:00", playlist.created) @@ -69,6 +69,7 @@ class TestApiTank(unittest.TestCase): "sha256:b4e1922bad633ff0e11f55611f04cb3807d15d70bb09969d2b324373af47b574", file.source.hash_, ) + self.assertEqual("musikprogramm", file.show_name) self.assertEqual("upload://some-audio-file.flac", file.source.uri) self.assertEqual("Test Artist", file.metadata.artist) self.assertEqual("Test Track Title", file.metadata.title)