snoo 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/snoo.rb +0 -1
- data/lib/snoo/flair.rb +3 -4
- data/lib/snoo/version.rb +1 -1
- metadata +2 -2
data/lib/snoo.rb
CHANGED
data/lib/snoo/flair.rb
CHANGED
@@ -145,18 +145,17 @@ module Snoo
|
|
145
145
|
# Select a flair template and apply it to a user or link
|
146
146
|
#
|
147
147
|
# @param template_id [String] The template id to apply. Get this from {#flair_template_list}
|
148
|
-
# @param text [String] The flair text
|
149
148
|
# @param subreddit [String] The subreddit targeted.
|
150
149
|
# @param (see LinksComments#info)
|
151
150
|
# @option opts [String] :link The link id to apply to
|
152
151
|
# @option opts [String] :user The username to apply flair to
|
152
|
+
# @option opts [String] :text The flair text
|
153
153
|
# @return (see #clear_sessions)
|
154
|
-
def select_flair_template template_id,
|
154
|
+
def select_flair_template template_id, subreddit, opts = {}
|
155
155
|
logged_in?
|
156
|
-
raise ArgumentError, 'link or user, not both' if link && user
|
156
|
+
raise ArgumentError, 'link or user, not both' if opts[:link] && opts[:user]
|
157
157
|
params = {
|
158
158
|
flair_template_id: template_id,
|
159
|
-
text: text,
|
160
159
|
uh: @modhash,
|
161
160
|
r: subreddit
|
162
161
|
}
|
data/lib/snoo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snoo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|