def connection
      options = { proxy: proxy, ssl: { verify: false }, url: api_url }
      options.merge!(params: { apikey: api_key }) if authed?

      connection = Faraday.new(options) do |builder|
        builder.use Faraday::Response::RaiseESPNError
        builder.use FaradayMiddleware::Mashify
        builder.use FaradayMiddleware::ParseJson
        builder.adapter adapter
      end

      connection
    end
def connection
      options = { proxy: proxy, ssl: { verify: false }, url: api_url }
      options.merge!(params: { apikey: api_key }) if authed?

      connection = Faraday.new(options) do |builder|
        builder.use Faraday::Response::RaiseESPNError
        builder.use FaradayMiddleware::Mashify
        builder.use FaradayMiddleware::ParseJson
        builder.adapter adapter
      end

      connection
    end
Internal: Build a new instance of Faraday with some default options and
 return it.

 Returns a Faraday::Connection.