lib/snoo/links_comments.rb in snoo-0.0.7 vs lib/snoo/links_comments.rb in snoo-0.1.0.pre.1

- old
+ new

@@ -121,10 +121,11 @@ # @return (see #clear_sessions) def unmark_nsfw id logged_in? post('/api/unmarknsfw', body: {id: id, uh: @modhash}) end + alias_method :mark_sfw, :unmark_nsfw # Vote on a comment or link # # @param direction [-1, 0, 1] The direction to vote in. -1 is a downvote, 1 is an upvote, 0 cancels any vote # @param id [String] The thing to target. @@ -136,16 +137,25 @@ end # Upvote # An alias for `vote 1, id` # + def upvote id + vote 1, id + end # Downvote # An alias for `vote -1, id` # + def downvote id + vote -1, id + end # Sidevote (clear your vote) # An alias for `vote 0, id` # + def sidevote id + vote 0, id + end end end