Я добавил возможность синхронизации гугл календаря с событиями моего приложения. Но проблема заключалась в том, что организатор/создатель мероприятия получал электронные письма от Google всякий раз, когда участник мероприятия отвечал на событие календаря Google. Я хотел получать уведомления по электронной почте только для создания/обновления событий. Я добавил notification_settings и оставил метод event_response пустым strong> но это не сработало.
CALENDAR_ID = 'primary'
CALENDAR_NOTIFIER = 'externalOnly'
gcal_event = client.insert_event(
CALENDAR_ID,
Google::Apis::CalendarV3::Event.new(gcal_event_params(gcal_event_attendees)),
send_updates: CALENDAR_NOTIFIER
)
-----------------------
// added notification_settings later so that the organizer should not receive event response, but no luck so far.
def gcal_event_params(gcal_event_attendees)
{
summary: event.name,
description: event.description,
location: event.location,
start: { date_time: event.start.to_datetime.to_s, time_zone: org_timezone },
end: { date_time: event.ends.to_datetime.to_s, time_zone: org_timezone },
attendees: gcal_event_attendees,
reminders: { use_default: true },
notification_settings: {
notifications: [
{type: 'event_creation', method: 'email'},
{type: 'event_change', method: 'email'},
{type: 'event_cancellation', method: 'email'},
{type: 'event_response', method: ''}
]
} }
end
gcal_event_attendees
? - person Rafa Guillermo   schedule 20.01.2020