Class: RubyAsterisk::ARI::Resources::Playback

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby-asterisk/ari/resources/playback.rb

Overview

Represents an ARI Playback resource with media-control action methods.

Instance Attribute Summary

Attributes inherited from Base

#client, #data

Instance Method Summary collapse

Methods inherited from Base

#id, #initialize

Constructor Details

This class inherits a constructor from RubyAsterisk::ARI::Resources::Base

Instance Method Details

#control(operation) ⇒ Object



12
13
14
# File 'lib/ruby-asterisk/ari/resources/playback.rb', line 12

def control(operation)
  client.post("/ari/playbacks/#{id}/control", { operation: operation })
end

#stopObject



8
9
10
# File 'lib/ruby-asterisk/ari/resources/playback.rb', line 8

def stop
  client.delete("/ari/playbacks/#{id}")
end