Class: Wowza::REST::Server
- Inherits:
-
Object
- Object
- Wowza::REST::Server
- Defined in:
- lib/wowza/rest/server.rb
Instance Attribute Summary collapse
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #connect(username:, password:) ⇒ Object
-
#initialize(host:, port:) ⇒ Server
constructor
A new instance of Server.
Constructor Details
#initialize(host:, port:) ⇒ Server
Returns a new instance of Server.
7 8 9 |
# File 'lib/wowza/rest/server.rb', line 7 def initialize(host:, port:) @uri = URI("http://#{host}:#{port}") end |
Instance Attribute Details
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
5 6 7 |
# File 'lib/wowza/rest/server.rb', line 5 def uri @uri end |
Instance Method Details
#connect(username:, password:) ⇒ Object
11 12 13 14 15 |
# File 'lib/wowza/rest/server.rb', line 11 def connect(username:, password:) auth = Authentication.new(username, password) conn = Connection.new(uri, auth) Client.new(conn) end |