Sha256: 92f5417057ca0307a427fd57cc24c043eab94480b4e8ca86dacbdcdf1b0e11a4
Contents?: true
Size: 736 Bytes
Versions: 15
Compression:
Stored size: 736 Bytes
Contents
# frozen_string_literal: true module DiscourseApi module API module Search # Returns search results that match the specified term. # # @param term [String] a search term # @param options [Hash] A customizable set of options # @option options [String] :type_filter Returns results of the specified type. # @return [Array] Return results as an array of Hashes. def search(term, options = {}) raise ArgumentError.new("#{term} is required but not specified") unless term raise ArgumentError.new("#{term} is required but not specified") unless !term.empty? response = get('/search/query', options.merge(term: term)) response[:body] end end end end
Version data entries
15 entries across 15 versions & 1 rubygems