def get(url)
      begin
        response = perform_get(url)
      rescue RestClient::TooManyRequests => e
        # API uses HTTP 429 to notify us,
        # @see https://github.com/OpendataCH/Transport/blob/master/lib/Transport/Application.php

        return nil unless wait_for_quota

        sleep_until_quota_reset(e.response)
        response = perform_get(url)
      end

      response
    end
def get(url)
      begin
        response = perform_get(url)
      rescue RestClient::TooManyRequests => e
        # API uses HTTP 429 to notify us,
        # @see https://github.com/OpendataCH/Transport/blob/master/lib/Transport/Application.php

        return nil unless wait_for_quota

        sleep_until_quota_reset(e.response)
        response = perform_get(url)
      end

      response
    end
Performs HTTP queries while respecting the rate limit.
 @param wait_for_quota [Boolean] whether to wait for quota reset
        and query again if the rate limit (300 requests/s) is exceeded.
 @return The HTTP response or nil if we're hitting the rate limit and
         wait_for_quota is false (@see #initialize).