Class: Pili::Hub

Inherits:
Object
  • Object
show all
Defined in:
lib/pili/hub.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(credentials, hub_name) ⇒ Hub

Returns a new instance of Hub.



8
9
10
11
# File 'lib/pili/hub.rb', line 8

def initialize(credentials, hub_name)
  @credentials = credentials
  @hub_name   = hub_name
end

Instance Attribute Details

#credentialsObject (readonly)

Returns the value of attribute credentials.



5
6
7
# File 'lib/pili/hub.rb', line 5

def credentials
  @credentials
end

#hub_nameObject (readonly)

Returns the value of attribute hub_name.



5
6
7
# File 'lib/pili/hub.rb', line 5

def hub_name
  @hub_name
end

Instance Method Details

#create_stream(options = {}) ⇒ Object



14
15
16
# File 'lib/pili/hub.rb', line 14

def create_stream(options = {})
  API.create_stream(@credentials, @hub_name, options)
end

#get_stream(stream_id) ⇒ Object



19
20
21
# File 'lib/pili/hub.rb', line 19

def get_stream(stream_id)
  API.get_stream(@credentials, stream_id)
end

#list_streams(options = {}) ⇒ Object



24
25
26
# File 'lib/pili/hub.rb', line 24

def list_streams(options = {})
  API.list_streams(@credentials, @hub_name, options)
end