• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/googleapisync.php
  • Класс: BitrixCalendarSyncGoogleApiSync
  • Вызов: GoogleApiSync::startWatchCalendarList
public function startWatchCalendarList($name)
{
	$channel = $this->syncTransport->openCalendarListChannel($this->makeChannelParams($name, self::CONNECTION_CHANNEL_TYPE));
	if (!$this->syncTransport->getErrors())
	{
		$channel['expiration'] = TypeDateTime::createFromTimestamp($channel['expiration']/1000);
		return $channel;
	}

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

	return [];
}