Class: Floobs::Channel

Inherits:
Base
  • Object
show all
Defined in:
lib/floobs/channel.rb

Class Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Floobs::Base

Class Method Details

.find(channel_id, options) ⇒ Object

Finds a channel by its id

Params:

  • channel_id : Channel ID

Options:

  • live : (true or false) Filter channels. Do not send the param if you don’t want to filter



12
13
14
15
# File 'lib/floobs/channel.rb', line 12

def self.find(channel_id, options)
  query = {:id => channel_id}.merge(options)
  get("/channels.service", query)
end

.find_all_by_channel_name(channel_name, options) ⇒ Object

Finds a channel by its name

Params:

  • channel_name : Channel name as a #String

Options:

  • live : (true or false) Filter channels. Do not send the param if you don’t want to filter



38
39
40
41
# File 'lib/floobs/channel.rb', line 38

def self.find_all_by_channel_name(channel_name,options)
  query = {:channel_name => channel_name}.merge(options)
  get("/channels.service", query)
end

.find_all_by_tag(tag, options) ⇒ Object

Finds a channel by its name

Params:

  • tag : A tag as a #String

Options:

  • live : (true or false) Filter channels. Do not send the param if you don’t want to filter



51
52
53
54
# File 'lib/floobs/channel.rb', line 51

def self.find_all_by_tag(tag,options)
  query = {:tag => tag}.merge(options)
  get("/channels.service", query)
end

.find_all_by_user_name(username, options) ⇒ Object

Finds a channel by its username

Params:

  • username : Username as a #String

Options:

  • live : (true or false) Filter channels. Do not send the param if you don’t want to filter



25
26
27
28
# File 'lib/floobs/channel.rb', line 25

def self.find_all_by_user_name(username,options)
  query = {:username => username}.merge(options)
  get("/channels.service", query)
end