Это мой код PHP ниже.
Не знаю, как установить параметр sendNotifications.
Поиск в Google не помог мне найти решение.
<?php
......
public function DeleteCalendarEvent($event_id, $calendar_id, $access_token) {
$url_events = 'https://www.googleapis.com/calendar/v3/calendars/' . $calendar_id . '/events/' . $event_id;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url_events);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer '. $access_token, 'Content-Type: application/json'));
$data = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);
if ($http_code != 204)
throw new Exception('Error : Failed to delete event');
}
......
?>






"sendNotifications" - это параметры запроса. https://developers.google.com/calendar/v3/reference/events/delete
Таким образом, вы можете просто добавить его в URL
$url_events = 'https://www.googleapis.com/calendar/v3/calendars/' . $calendar_id . '/events/' . $event_id.'?sendNotification=true';
не могу сейчас проверить. Попробуйте. '? SendNotification = 1',. '/? SendNotification = 1',. '/? SendNotification = True'
спасибо за ответ на мой запрос. Решение, которое я использовал раньше, но все еще не работает. Электронная почта не поступает.