Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine-api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
engine-api
Commits
d7f7a58f
Commit
d7f7a58f
authored
4 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
Update API spec.
parent
ff444b97
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/rest/controllers/public_controller.py
+6
-5
6 additions, 5 deletions
src/rest/controllers/public_controller.py
src/rest/models/schedule.py
+18
-16
18 additions, 16 deletions
src/rest/models/schedule.py
with
24 additions
and
21 deletions
src/rest/controllers/public_controller.py
+
6
−
5
View file @
d7f7a58f
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
This diff is collapsed.
Click to expand it.
src/rest/models/schedule.py
+
18
−
16
View file @
d7f7a58f
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment