Sha256: c06612ef1b63ca1e4a18e1b7950f084a80b690ef8655c11bc4288f880c24b9e3

Contents?: true

Size: 665 Bytes

Versions: 2

Compression:

Stored size: 665 Bytes

Contents

require 'smartsheet/error'

module Smartsheet
  module API
    class RequestClient
      def initialize(token, client, base_url, assume_user: nil, logger: MuteRequestLogger.new)
        @token = token
        @client = client
        @assume_user = assume_user
        @logger = logger
        @base_url = base_url
      end

      def make_request(endpoint_spec, request_spec)
        request = Request.new(token, endpoint_spec, request_spec, base_url, assume_user: assume_user)

        logger.log_request(request)
        client.make_request(request)
      end

      private

      attr_reader :token, :client, :assume_user, :logger, :base_url
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
smartsheet-1.0.0.beta.2 lib/smartsheet/api/request_client.rb
smartsheet-1.0.0.beta.0 lib/smartsheet/api/request_client.rb