function calls_left($response_headers) { return call_limit($response_headers) - calls_made($response_headers); }
function calls_left($response_headers) { if (calls_made($response_headers) >= 0 && call_limit($response_headers) > 0) { return call_limit($response_headers) - calls_made($response_headers); } else { return -1; } }