def initialize(options = Travis::Client::ORG_URI)
@headers = {}
@cache = {}
@instruments = []
@agent_info = []
@config = nil
@faraday_adapter = defined?(Typhoeus) ? :typhoeus : :net_http
@ssl = SSL_OPTIONS
options = { :uri => options } unless options.respond_to? :each_pair
options.each_pair { |key, value| public_send("#{key}=", value) }
raise ArgumentError, "neither :uri nor :connection specified" unless connection
headers['Accept'] = 'application/vnd.travis-ci.2+json'
set_user_agent
check_ssl
end