Module: Redd::Client::Unauthenticated::Wiki
- Included in:
- Redd::Client::Unauthenticated
- Defined in:
- lib/redd/client/unauthenticated/wiki.rb
Instance Method Summary collapse
Instance Method Details
#get_wikipages(subreddit = nil) ⇒ Object
5 6 7 8 9 |
# File 'lib/redd/client/unauthenticated/wiki.rb', line 5 def get_wikipages(subreddit = nil) path = "/wiki/pages.json" path.prepend("/r/#{subreddit}") if subreddit get(path)[:data] end |
#wikipage(page, subreddit = nil, params = {}) ⇒ Object
11 12 13 14 15 |
# File 'lib/redd/client/unauthenticated/wiki.rb', line 11 def wikipage(page, subreddit = nil, params = {}) path = "/wiki/#{page}.json" path.prepend("/r/#{subreddit}") if subreddit object_from_response :get, path, params end |