• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/tradingplatform/vk/api/api.php
  • Класс: BitrixSaleTradingPlatformVkApiApi
  • Вызов: Api::checkRequestsLimit
private function checkRequestsLimit()
{
//		we can do only LIMIT count of requests per second. If catched error - wait one second, clear error and do next
	if (isset($this->response["error"]) && $this->response["error"]["error_code"] == self::TOO_MANY_REQUESTS_ERROR_CODE)
	{
		sleep(1);
		$this->response = array();
		
		return true;
	}
	
	return false;
}