Module: Redd::Client::Unauthenticated::Subreddits
- Included in:
- Redd::Client::Unauthenticated
- Defined in:
- lib/redd/client/unauthenticated/subreddits.rb
Instance Method Summary collapse
- #get_subreddits(where = :popular, params = {}) ⇒ Object
- #search_subreddits(query, params = {}) ⇒ Object
- #subreddit(title) ⇒ Object
Instance Method Details
#get_subreddits(where = :popular, params = {}) ⇒ Object
9 10 11 |
# File 'lib/redd/client/unauthenticated/subreddits.rb', line 9 def get_subreddits(where = :popular, params = {}) object_from_response :get, "/subreddits/#{where}.json", params end |
#search_subreddits(query, params = {}) ⇒ Object
13 14 15 16 |
# File 'lib/redd/client/unauthenticated/subreddits.rb', line 13 def search_subreddits(query, params = {}) params << {q: query} object_from_response :get, "/subreddits/search.json", params end |
#subreddit(title) ⇒ Object
5 6 7 |
# File 'lib/redd/client/unauthenticated/subreddits.rb', line 5 def subreddit(title) object_from_response :get, "/r/#{title}/about.json" end |