• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/googleapisync.php
  • Класс: BitrixCalendarSyncGoogleApiSync
  • Вызов: GoogleApiSync::startWatchEventsChannel
public function startWatchEventsChannel($calendarId = 'primary')
{
	$channel = $this->syncTransport->openEventsWatchChannel(
		$calendarId,
		$this->makeChannelParams($calendarId, self::SECTION_CHANNEL_TYPE)
	);

	if (!$this->syncTransport->getErrors())
	{
		$channel['expiration'] = TypeDateTime::createFromTimestamp($channel['expiration']/1000);
		return $channel;
	}

	if (($error = $this->getTransportConnectionError()) && is_string($error))
	{
		$this->updateLastResultConnection($error);
	}

	return false;
}