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, live) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/floobs/channel.rb', line 4

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

.find_all_by_channel_name(channel_name, live = true) ⇒ Object



17
18
19
# File 'lib/floobs/channel.rb', line 17

def self.find_all_by_channel_name(channel_name,live=true)
  get("/channels.service", :query => {:channelName => channel_name.to_a.join(' or '), :live => live})
end

.find_all_by_tag(tags, live = true) ⇒ Object



21
22
23
# File 'lib/floobs/channel.rb', line 21

def self.find_all_by_tag(tags,live=true)
  get("/channels.service", :query => {:tag => tags.to_a.join(' and '), :live => live})
end

.find_all_by_user_name(username, live = true) ⇒ Object



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

def self.find_all_by_user_name(username,live=true)
  get("/channels.service", :query => {:userName => username.to_a.join(' or '), :live => live})
end