Module: Snooby::Posts
Instance Method Summary collapse
-
#posts(count = 25, srlist = :posts) ⇒ Object
(also: #submissions)
Returns an array of structs containing the calling object’s posts.
Instance Method Details
#posts(count = 25, srlist = :posts) ⇒ Object Also known as: submissions
Returns an array of structs containing the calling object’s posts. Snooby-Plus adds the ‘srlist’ parameter. This can be any one of ‘:top’, ‘:new’, ‘:rising’, or ‘:contro’.
13 14 15 16 |
# File 'lib/snooby/actions.rb', line 13 def posts(count = 25, srlist = :posts) path = @name ? :"#{@kind}_#{@kind == :subreddit ? srlist : :posts}" : :reddit Snooby.build Post, path, @name, count end |