lib/Imgur/Middleware/ErrorMiddleware.php
private function checkClientRateLimit(ResponseInterface $response)
    {
        $clientRemaining = $response->getHeaderLine('X-RateLimit-ClientRemaining');
        $clientLimit = $response->getHeaderLine('X-RateLimit-ClientLimit');

        if ('' !== $clientRemaining && $clientRemaining < 1) {
            // X-RateLimit-UserReset: Timestamp (unix epoch) for when the credits will be reset.
            $resetTime = date('Y-m-d H:i:s', $response->getHeaderLine('X-RateLimit-UserReset'));

            throw new RateLimitException('No application credits available. The limit is ' . $clientLimit . ' and will be reset at ' . $resetTime);
        }
    }
private function checkClientRateLimit(ResponseInterface $response)
    {
        $clientRemaining = $response->getHeaderLine('X-RateLimit-ClientRemaining');
        $clientLimit = $response->getHeaderLine('X-RateLimit-ClientLimit');

        if ('' !== $clientRemaining && $clientRemaining < 1) {
            // X-RateLimit-UserReset: Timestamp (unix epoch) for when the credits will be reset.
            $resetTime = date('Y-m-d H:i:s', $response->getHeaderLine('X-RateLimit-UserReset'));

            throw new RateLimitException('No application credits available. The limit is ' . $clientLimit . ' and will be reset at ' . $resetTime);
        }
    }
private function checkClientRateLimit ( ResponseInterface $ response ) { $ clientRemaining = $ response -> getHeaderLine ( 'X-RateLimit-ClientRemaining' ) ; $ clientLimit = $ response -> getHeaderLine ( 'X-RateLimit-ClientLimit' ) ; if ( '' !== $ clientRemaining && $ clientRemaining < 1 ) { // X-RateLimit-UserReset: Timestamp (unix epoch) for when the credits will be reset. $ resetTime = date ( 'Y-m-d H:i:s' , $ response -> getHeaderLine ( 'X-RateLimit-UserReset' ) ) ; throw new RateLimitException ( 'No application credits available. The limit is ' . $ clientLimit . ' and will be reset at ' . $ resetTime ) ; } }
Check if client hit limit.

@param ResponseInterface $response
Check if client hit limit .