Class: Pili::Hub
- Inherits:
-
Object
- Object
- Pili::Hub
- Defined in:
- lib/pili/hub.rb
Instance Attribute Summary collapse
-
#credentials ⇒ Object
readonly
Returns the value of attribute credentials.
-
#hub_name ⇒ Object
readonly
Returns the value of attribute hub_name.
Instance Method Summary collapse
- #create_stream(options = {}) ⇒ Object
- #get_stream(stream_id) ⇒ Object
-
#initialize(credentials, hub_name) ⇒ Hub
constructor
A new instance of Hub.
- #list_streams(options = {}) ⇒ Object
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
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
5 6 7 |
# File 'lib/pili/hub.rb', line 5 def credentials @credentials end |
#hub_name ⇒ Object (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( = {}) API.create_stream(@credentials, @hub_name, ) 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( = {}) API.list_streams(@credentials, @hub_name, ) end |