• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/icloud/apiservice.php
  • Класс: BitrixCalendarSyncIcloudApiService
  • Вызов: ApiService::sendPutAction
private function sendPutAction(string $path, $calendarData): ?array
{
	$result = (int)$this->apiClient->put($path, $calendarData);

	if ($this->davClient->getError())
	{
		$this->addError($this->davClient->getError());
	}

	if ($result === 201 || $result === 204)
	{
		$result = $this->davClient->GetCalendarItemsList(
			$path,
			null,
			false,
			2
		);

		if ($result && is_array($result))
		{
			return [
				'XML_ID' => $this->davClient::getBasenameWithoutExtension($result[0]['href']),
				'MODIFICATION_LABEL' => $result[0]['getetag'],
			];
		}
	}

	return null;
}