OpenBroadcaster Documentation
controllers / timeslots.php

Timeslots

Controller

Timeslots controller schedules player timeslots for shows.

public  delete ( )

Delete a timeslot by ID. Requires 'manage_timeslots' for the player ID linked to the timeslot.

Parameters
id
API Route DELETE /api/v2/timeslots/(:id:)
public  get ( )

Get timeslot by ID. Requires 'manage_timeslots'.

Parameters
id
Returns timeslot
API Route GET /api/v2/timeslots/(:id:)
public  get_last_player ( )

Get the last selected player on the timeslots page for the current user.

Returns player
public  save ( )

Edit or save a timeslot.

Parameters
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
API Route POST /api/v2/timeslots
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.

Parameters
start
end
player
user_id
Returns timeslots
API Route GET /api/v2/timeslots
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.

Parameters
player