Method: Logplex::Client#create_channel
- Defined in:
- lib/logplex/client.rb
#create_channel(name) ⇒ Object
Public: Create a channel.
Note: the ‘name’ of the channel lives in a global namespace. Choose wisely. Note: You must save the channel id if you wish to use the channel later.
name - the string name to give to the channel being created.
Examples
client.create_channel("my-example-channel")
Returns a Logplex::Channel Raises TODO(sissel): Raises what?
45 46 47 48 49 |
# File 'lib/logplex/client.rb', line 45 def create_channel(name) # TODO(sissel): Call the API result = @backend.create_channel(name) return Logplex::Channel.new(@url, result[:channel_id]) end |