Module: DiscourseApi::API::Search
- Included in:
- Client
- Defined in:
- lib/discourse_api/api/search.rb
Instance Method Summary collapse
-
#search(term, options = {}) ⇒ Array
Returns search results that match the specified term.
Instance Method Details
#search(term, options = {}) ⇒ Array
Returns search results that match the specified term.
11 12 13 14 15 16 17 |
# File 'lib/discourse_api/api/search.rb', line 11 def search(term, = {}) raise ArgumentError.new("#{term} is required but not specified") unless term raise ArgumentError.new("#{term} is required but not specified") if term.empty? response = get("/search", .merge(q: term)) response[:body] end |