gravis-floobs 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION.yml +1 -1
- data/lib/floobs/channel.rb +45 -14
- metadata +1 -1
data/VERSION.yml
CHANGED
data/lib/floobs/channel.rb
CHANGED
@@ -1,25 +1,56 @@
|
|
1
1
|
module Floobs
|
2
2
|
class Channel < Floobs::Base
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
|
4
|
+
# Finds a channel by its id
|
5
|
+
#
|
6
|
+
# Params:
|
7
|
+
# * +channel_id+ : Channel ID
|
8
|
+
#
|
9
|
+
# Options:
|
10
|
+
# * +live+ : (+true+ or +false+) Filter channels. Do not send the param if you don't want to filter
|
11
|
+
#
|
12
|
+
def self.find(channel_id, options)
|
13
|
+
query = {:id => channel_id}.merge(options)
|
10
14
|
get("/channels.service", query)
|
11
15
|
end
|
12
16
|
|
13
|
-
|
14
|
-
|
17
|
+
# Finds a channel by its username
|
18
|
+
#
|
19
|
+
# Params:
|
20
|
+
# * +username+ : Username as a #String
|
21
|
+
#
|
22
|
+
# Options:
|
23
|
+
# * +live+ : (+true+ or +false+) Filter channels. Do not send the param if you don't want to filter
|
24
|
+
#
|
25
|
+
def self.find_all_by_user_name(username,options)
|
26
|
+
query = {:username => username}.merge(options)
|
27
|
+
get("/channels.service", query)
|
15
28
|
end
|
16
29
|
|
17
|
-
|
18
|
-
|
30
|
+
# Finds a channel by its name
|
31
|
+
#
|
32
|
+
# Params:
|
33
|
+
# * +channel_name+ : Channel name as a #String
|
34
|
+
#
|
35
|
+
# Options:
|
36
|
+
# * +live+ : (+true+ or +false+) Filter channels. Do not send the param if you don't want to filter
|
37
|
+
#
|
38
|
+
def self.find_all_by_channel_name(channel_name,options)
|
39
|
+
query = {:channel_name => channel_name}.merge(options)
|
40
|
+
get("/channels.service", query)
|
19
41
|
end
|
20
|
-
|
21
|
-
|
22
|
-
|
42
|
+
|
43
|
+
# Finds a channel by its name
|
44
|
+
#
|
45
|
+
# Params:
|
46
|
+
# * +tag+ : A tag as a #String
|
47
|
+
#
|
48
|
+
# Options:
|
49
|
+
# * +live+ : (+true+ or +false+) Filter channels. Do not send the param if you don't want to filter
|
50
|
+
#
|
51
|
+
def self.find_all_by_tag(tag,options)
|
52
|
+
query = {:tag => tag}.merge(options)
|
53
|
+
get("/channels.service", query)
|
23
54
|
end
|
24
55
|
|
25
56
|
end
|