controllers / alerts.php
Alerts
Controller
Manages alerts, also commonly referred to as emergency broadcasts, priorities, or priority broadcasts.
public
delete
(
)
public
delete
(
)
Delete an alert. Requries the 'manage_alerts' permission.
id |
DELETE
/api/v2/alerts/(:id:)
public
get
(
)
public
get
(
)
Return data about a specific alert ID. 'manage_alerts' is a required permission.
id |
alert
GET
/api/v2/alerts/(:id:)
public
save
(
)
public
save
(
)
Save a new alert. The 'user_id' is set to the currently logged in user for the new broadcast. Requires the 'manage_alerts' permission.
id |
ID of alert. Update a pre-existing alert if set. |
item_id |
ID of the media item linked to the alert. |
player_id |
|
name |
|
frequency |
|
duration |
|
start |
|
stop |
PUT
/api/v2/alerts/(:id:)
public
search
(
)
public
search
(
)
Get all alerts for a specific player ID. 'manage_alerts' is a required permission.
player_id |
alerts
GET
/api/v2/alerts/search/(:player_id:)
public
get_last_player
(
)
public
get_last_player
(
)
Get the last selected player on the alerts page for the current user.
player
public
set_last_player
(
)
public
set_last_player
(
)
Set the last selected player so we can view alerts 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 |