lib/Imgur/Middleware/ErrorMiddleware.php
private function checkPostRateLimit(ResponseInterface $response)
    {
        $postRemaining = $response->getHeaderLine('X-Post-Rate-Limit-Remaining');
        $postLimit = $response->getHeaderLine('X-Post-Rate-Limit-Limit');

        if ('' !== $postRemaining && $postRemaining < 1) {
            // X-Post-Rate-Limit-Reset: Time in seconds until your POST ratelimit is reset
            $resetTime = date('Y-m-d H:i:s', $response->getHeaderLine('X-Post-Rate-Limit-Reset'));

            throw new RateLimitException('No post credits available. The limit is ' . $postLimit . ' and will be reset at ' . $resetTime);
        }
    }
private function checkPostRateLimit(ResponseInterface $response)
    {
        $postRemaining = $response->getHeaderLine('X-Post-Rate-Limit-Remaining');
        $postLimit = $response->getHeaderLine('X-Post-Rate-Limit-Limit');

        if ('' !== $postRemaining && $postRemaining < 1) {
            // X-Post-Rate-Limit-Reset: Time in seconds until your POST ratelimit is reset
            $resetTime = date('Y-m-d H:i:s', $response->getHeaderLine('X-Post-Rate-Limit-Reset'));

            throw new RateLimitException('No post credits available. The limit is ' . $postLimit . ' and will be reset at ' . $resetTime);
        }
    }
private function checkPostRateLimit ( ResponseInterface $ response ) { $ postRemaining = $ response -> getHeaderLine ( 'X-Post-Rate-Limit-Remaining' ) ; $ postLimit = $ response -> getHeaderLine ( 'X-Post-Rate-Limit-Limit' ) ; if ( '' !== $ postRemaining && $ postRemaining < 1 ) { // X-Post-Rate-Limit-Reset: Time in seconds until your POST ratelimit is reset $ resetTime = date ( 'Y-m-d H:i:s' , $ response -> getHeaderLine ( 'X-Post-Rate-Limit-Reset' ) ) ; throw new RateLimitException ( 'No post credits available. The limit is ' . $ postLimit . ' and will be reset at ' . $ resetTime ) ; } }
Check if client hit post limit.

@param ResponseInterface $response
Check if client hit post limit .