Class: Wowza::REST::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/wowza/rest/server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#uriObject (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