Sha256: aa92f0a5a263c241aac2adadb4ee2d51d75a9c977be66518df1ac907b08dbc8e

Contents?: true

Size: 526 Bytes

Versions: 2

Compression:

Stored size: 526 Bytes

Contents

require 'uuid'

module YellowApi
  class Client
    module Request
      def get(path, options = {})
        # stuff that's sent with every request
        # but define by api initialization
        options[:apikey] = apikey
        options[:fmt] = fmt
        options[:UID] = uid

        request(:get, path, options)
      end

      def request(method, path, options)
        response = connection.send(method) do |request|
          request.url(path, options)
        end
        response.body
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yellow-api-wrapper-0.0.2 lib/yellow_api/client/request.rb
yellow-api-wrapper-0.0.1 lib/yellow_api/client/request.rb