require "excon"

module Support
  module QAHelpers
    module API
      class Client
        attr_reader :api_host

        Excon.defaults[:ciphers] = "DEFAULT"

        def initialize(params = {})
          @api_host = params[:api_host] || "https://api-dev.theorchard.io"
        end

        def call(method, url, params = {})
          Excon.send(method, "#{@api_host}#{url}", params)
        end
      end
    end
  end
end
