Class: Wowza::REST::Application

Inherits:
Object
  • Object
show all
Includes:
Assignment::Attributes
Defined in:
lib/wowza/rest/application.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Application

Returns a new instance of Application.



11
12
13
14
# File 'lib/wowza/rest/application.rb', line 11

def initialize(attributes={})
  assign_attributes(attributes) if attributes
  super()
end

Instance Attribute Details

#app_typeObject

Returns the value of attribute app_type.



7
8
9
# File 'lib/wowza/rest/application.rb', line 7

def app_type
  @app_type
end

#connObject

Returns the value of attribute conn.



7
8
9
# File 'lib/wowza/rest/application.rb', line 7

def conn
  @conn
end

#drm_enabledObject

Returns the value of attribute drm_enabled.



7
8
9
# File 'lib/wowza/rest/application.rb', line 7

def drm_enabled
  @drm_enabled
end

#dvr_enabledObject

Returns the value of attribute dvr_enabled.



7
8
9
# File 'lib/wowza/rest/application.rb', line 7

def dvr_enabled
  @dvr_enabled
end

#hrefObject

Returns the value of attribute href.



7
8
9
# File 'lib/wowza/rest/application.rb', line 7

def href
  @href
end

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/wowza/rest/application.rb', line 7

def id
  @id
end

#server_nameObject

Returns the value of attribute server_name.



7
8
9
# File 'lib/wowza/rest/application.rb', line 7

def server_name
  @server_name
end

#stream_targets_enabledObject

Returns the value of attribute stream_targets_enabled.



7
8
9
# File 'lib/wowza/rest/application.rb', line 7

def stream_targets_enabled
  @stream_targets_enabled
end

#transcoder_enabledObject

Returns the value of attribute transcoder_enabled.



7
8
9
# File 'lib/wowza/rest/application.rb', line 7

def transcoder_enabled
  @transcoder_enabled
end

#vhost_nameObject

Returns the value of attribute vhost_name.



7
8
9
# File 'lib/wowza/rest/application.rb', line 7

def vhost_name
  @vhost_name
end

Instance Method Details

#attributesObject



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/wowza/rest/application.rb', line 16

def attributes
  {
    id: id,
    href: href,
    app_type: app_type,
    dvr_enabled: dvr_enabled,
    drm_enabled: drm_enabled,
    transcoder_enabled: transcoder_enabled,
    stream_targets_enabled: stream_targets_enabled,
  }
end

#instancesObject



28
29
30
# File 'lib/wowza/rest/application.rb', line 28

def instances
  Instances.new(conn, self)
end

#resource_pathObject



40
41
42
# File 'lib/wowza/rest/application.rb', line 40

def resource_path
  id && "#{vhost_path}/applications/#{id}"
end

#server_pathObject



48
49
50
# File 'lib/wowza/rest/application.rb', line 48

def server_path
  "/v2/servers/#{server_name}"
end

#vhost_pathObject



56
57
58
# File 'lib/wowza/rest/application.rb', line 56

def vhost_path
  "#{server_path}/vhosts/#{vhost_name}"
end