Sha256: c69830188d38eece92c4170c3bf0a813e240f8dcafe2d4119c3b06a19b7939b2

Contents?: true

Size: 423 Bytes

Versions: 3

Compression:

Stored size: 423 Bytes

Contents

require 'oxford_dictionary/request'
require 'oxford_dictionary/api_objects/list_response'

module OxfordDictionary
  module Endpoints
    # Interface to '/search' endpoint
    module SearchEndpoint
      include OxfordDictionary::Request
      ENDPOINT = 'search'.freeze

      def search(query, params = {})
        params[:q] = query
        ListResponse.new(request(ENDPOINT, query, params))
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
oxford_dictionary-1.0.1 lib/oxford_dictionary/endpoints/search_endpoint.rb
oxford_dictionary-1.0.0 lib/oxford_dictionary/endpoints/search_endpoint.rb
oxford_dictionary-0.1.0 lib/oxford_dictionary/endpoints/search_endpoint.rb