Skip to content
Snippets Groups Projects
Commit d7f7a58f authored by David Trattnig's avatar David Trattnig
Browse files

Update API spec.

parent ff444b97
No related branches found
No related tags found
No related merge requests found
import datetime
import connexion
import six
from src.rest.models.play_log_entry import PlayLogEntry # noqa: E501
from src.rest import util
from src.server import track_service
def current_track(): # noqa: E501
"""Get current track
......@@ -16,7 +15,8 @@ def current_track(): # noqa: E501
:rtype: PlayLogEntry
"""
return track_service.current_track()
from src.server import service
return service.current_track()
def list_tracks(offset=None, limit=None): # noqa: E501
......@@ -31,4 +31,5 @@ def list_tracks(offset=None, limit=None): # noqa: E501
:rtype: List[PlayLogEntry]
"""
return track_service.list_tracks(offset, limit)
from src.server import service
return service.list_tracks(offset, limit)
\ No newline at end of file
......@@ -15,7 +15,7 @@ class Schedule(Model):
Do not edit the class manually.
"""
def __init__(self, show_name=None, schedule_id=None, schedule_start=None, schedule_end=None, playlist_id=None, fallback_type=None, entries=None): # noqa: E501
def __init__(self, show_name=None, schedule_id=None, schedule_start=None, schedule_end=None, playlist_id=None, fallback_type=None, playlist_entries=None): # noqa: E501
"""Schedule - a model defined in Swagger
:param show_name: The show_name of this Schedule. # noqa: E501
......@@ -30,8 +30,8 @@ class Schedule(Model):
:type playlist_id: int
:param fallback_type: The fallback_type of this Schedule. # noqa: E501
:type fallback_type: int
:param entries: The entries of this Schedule. # noqa: E501
:type entries: List[PlaylistEntry]
:param playlist_entries: The playlist_entries of this Schedule. # noqa: E501
:type playlist_entries: List[PlaylistEntry]
"""
self.swagger_types = {
'show_name': str,
......@@ -40,7 +40,7 @@ class Schedule(Model):
'schedule_end': datetime,
'playlist_id': int,
'fallback_type': int,
'entries': List[PlaylistEntry]
'playlist_entries': List[PlaylistEntry]
}
self.attribute_map = {
......@@ -50,7 +50,7 @@ class Schedule(Model):
'schedule_end': 'schedule_end',
'playlist_id': 'playlist_id',
'fallback_type': 'fallback_type',
'entries': 'entries'
'playlist_entries': 'playlist_entries'
}
self._show_name = show_name
self._schedule_id = schedule_id
......@@ -58,7 +58,7 @@ class Schedule(Model):
self._schedule_end = schedule_end
self._playlist_id = playlist_id
self._fallback_type = fallback_type
self._entries = entries
self._playlist_entries = playlist_entries
@classmethod
def from_dict(cls, dikt):
......@@ -204,22 +204,24 @@ class Schedule(Model):
self._fallback_type = fallback_type
@property
def entries(self):
"""Gets the entries of this Schedule.
def playlist_entries(self):
"""Gets the playlist_entries of this Schedule.
:return: The entries of this Schedule.
:return: The playlist_entries of this Schedule.
:rtype: List[PlaylistEntry]
"""
return self._entries
return self._playlist_entries
@entries.setter
def entries(self, entries):
"""Sets the entries of this Schedule.
@playlist_entries.setter
def playlist_entries(self, playlist_entries):
"""Sets the playlist_entries of this Schedule.
:param entries: The entries of this Schedule.
:type entries: List[PlaylistEntry]
:param playlist_entries: The playlist_entries of this Schedule.
:type playlist_entries: List[PlaylistEntry]
"""
if playlist_entries is None:
raise ValueError("Invalid value for `playlist_entries`, must not be `None`") # noqa: E501
self._entries = entries
self._playlist_entries = playlist_entries
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