• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/office365/apiservice.php
  • Класс: BitrixCalendarSyncOffice365ApiService
  • Вызов: ApiService::getCalendarDelta
public function getCalendarDelta(SectionConnection $sectionConnection): Generator
{
	$baseUri = 'me/calendars/' . $sectionConnection->getVendorSectionId() . '/calendarView/delta?';
	$breakingFlag = false;
	do {
		$uri = $this->getDeltaUri($sectionConnection, $baseUri);

		try
		{
			$response = $this->apiClient->get($uri);
			if (!empty($response))
			{
				$breakingFlag = $this->processResponseAfterDelta($sectionConnection, $response);
			}
			if (!empty($response['value']))
			{
				yield $response['value'];
			}
			else
			{
				break;
			}
		}
		catch(GoneException $e)
		{
			if ($sectionConnection->getPageToken())
			{
				$sectionConnection->setPageToken(null);
			}
			elseif ($sectionConnection->getSyncToken())
			{
				$sectionConnection->setSyncToken(null);
			}
		}
	}
	while(!$breakingFlag);
}