galen / PHP-Instagram-API

PHP 5.3+ wrapper for the Instagram API
338 stars 159 forks source link

Implement remaining requests check on the proxy/client #43

Open mpatnode opened 9 years ago

mpatnode commented 9 years ago

In short the ApiResponse copies the latest remainder count into the current client.

    $instagram = new Instagram\Instagram;
    $instagram->setClientID(INSIGHTS_INSTAGRAM_CLIENT_ID);

    / /  Make lots of requests....

    $count = $instagram->getRequestsRemaining();

    if ($count < 10) {
             //  Do something about it
    }