Sha256: 2dd82cae79c354962d9a676f4846c124a8d3b24276d61245d1a5c80222c854d3

Contents?: true

Size: 524 Bytes

Versions: 10

Compression:

Stored size: 524 Bytes

Contents

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={})
        response = get('/search.json', options.merge(term: term))
        response[:body]
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
discourse_api-0.4.1 lib/discourse_api/api/search.rb
discourse_api-0.4.0 lib/discourse_api/api/search.rb
discourse_api-0.3.6 lib/discourse_api/api/search.rb
discourse_api-0.3.0 lib/discourse_api/api/search.rb
discourse_api-0.2.9 lib/discourse_api/api/search.rb
discourse_api-0.2.8 lib/discourse_api/api/search.rb
discourse_api-0.2.7 lib/discourse_api/api/search.rb
discourse_api-0.2.5 lib/discourse_api/api/search.rb
discourse_api-0.2.4 lib/discourse_api/api/search.rb
discourse_api-0.2.2 lib/discourse_api/api/search.rb