class Asterisk::ARI::DeviceStates

Defined in:

asterisk/ari/resources/device_states.cr
asterisk/ari/models/device_states_device_state.cr

Instance Method Summary

Instance methods inherited from class Asterisk::ARI::Resources

ari : ARI ari

Constructor methods inherited from class Asterisk::ARI::Resources

new(ari) new

Instance Method Detail

def delete(device_name : String) #

Destroy a device-state controlled by ARI.

Arguments:

  • device_name - name of the device. (required);

Error responses:

  • 404 - Device name is missing
  • 409 - Uncontrolled device specified

[View source]
def get(device_name : String) : HTTP::Client::Response | DeviceStates::DeviceState #

Retrieve the current state of a device.

Arguments:

  • device_name - name of the device. (required);

[View source]
def list : HTTP::Client::Response | Array(DeviceStates::DeviceState) #

List all ARI controlled device states.


[View source]
def update(device_name : String, device_state : String) #

Change the state of a device controlled by ARI. (Note - implicitly creates the device state).

Arguments:

  • device_name - name of the device. (required);
  • device_state - device state value. (required);

Error responses:

  • 404 - Device name is missing
  • 409 - Uncontrolled device specified

[View source]