Class: Wowza::REST::Applications
- Inherits:
-
Object
- Object
- Wowza::REST::Applications
- Defined in:
- lib/wowza/rest/applications.rb
Instance Method Summary collapse
- #all ⇒ Object
-
#initialize(conn) ⇒ Applications
constructor
A new instance of Applications.
Constructor Details
#initialize(conn) ⇒ Applications
Returns a new instance of Applications.
5 6 7 |
# File 'lib/wowza/rest/applications.rb', line 5 def initialize(conn) @conn = conn end |
Instance Method Details
#all ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/wowza/rest/applications.rb', line 9 def all resp = conn.get('/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications') JSON.parse(resp.body)['applications'].map do |attrs| Application.new({ id: attrs["id"], href: attrs["href"], app_type: attrs["appType"], dvr_enabled: attrs["dvrEnabled"], drm_enabled: attrs["drmEnabled"], transcoder_enabled: attrs["transcoderEnabled"], stream_targets_enabled: attrs["streamTargetsEnabled"], }).tap do |app| app.conn = conn end end end |