controllers / timeslots.php
Timeslots
Controller
Timeslots controller schedules player timeslots for shows.
public
delete
(
)
public
delete
(
)
Delete a timeslot by ID. Requires 'manage_timeslots' for the player ID linked to the timeslot.
id |
DELETE
/api/v2/timeslots/(:id:)
public
get
(
)
public
get
(
)
Get timeslot by ID. Requires 'manage_timeslots'.
id |
timeslot
GET
/api/v2/timeslots/(:id:)
public
get_last_player
(
)
public
get_last_player
(
)
Get the last selected player on the timeslots page for the current user.
player
public
save
(
)
public
save
(
)
Edit or save a timeslot.
id |
Optional when saving a new timeslot. |
user_id |
|
player_id |
|
mode |
One time, or every X interval. |
x_data |
When mode is set to an interval, x_data specifies every X. |
description |
|
start |
|
duration |
|
stop |
POST
/api/v2/timeslots
public
search
(
)
public
search
(
)
Get timeslot data between two given date/times. Also used to get timeslot data for provided user. This function is used for the UI/API, but also to detect potential scheduling collisions. Requires 'manage_timeslots' unless requesting information about logged in (i.e. current) user.
start |
|
end |
|
player |
|
user_id |
timeslots
GET
/api/v2/timeslots
public
set_last_player
(
)
public
set_last_player
(
)
Set the last selected player so we can view timeslots for that player immediately when loading the page again some other time. This will have to be generalized for other UI elements at some point. This is a user-specific setting, so no special permissions are necessary.
player |