Sha256: 2d681e37d27421396587a91e0f2b99807ed9ce4b16df11b3e9195ce3d4864ef2

Contents?: true

Size: 520 Bytes

Versions: 1

Compression:

Stored size: 520 Bytes

Contents

require 'dogapi-demo'

module DogapiDemo
  class V1 # for namespacing

    class SearchService < DogapiDemo::APIService

      API_VERSION = "v1"

      def search(query)
        begin
          params = {
            :api_key => @api_key,
            :application_key => @application_key,
            :q => query
          }

          request(Net::HTTP::Get, "/api/#{API_VERSION}/search", params, nil, false)
        rescue Exception => e
          suppress_error_if_silent e
        end
      end

    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dogapi-demo-0.1.0 lib/dogapi-demo/v1/search.rb