Can't find sendNotifications parameter Google Calendar api v3.NET
I am testing Google Calendar API v3
on .Net
. I was able to add an event to the calendar as follows:
Google.Apis.Calendar.v3.Data.EventAttendee attendee = new Google.Apis.Calendar.v3.Data.EventAttendee();
attendee.Email = "[email]@gmail.com";
List<Google.Apis.Calendar.v3.Data.EventAttendee> event_attendees = new List<Google.Apis.Calendar.v3.Data.EventAttendee>();
event_attendees.Add(attendee);
Google.Apis.Calendar.v3.Data.Event new_event = new Google.Apis.Calendar.v3.Data.Event();
new_event.Summary = "GoogleCalendarTest: Testing Event 4";
new_event.Description = "Testing .Net Google Calendar API";
new_event.Location = "Offices";
new_event.Start = new Google.Apis.Calendar.v3.Data.EventDateTime();
new_event.Start.DateTime = DateTime.Now;
new_event.End = new Google.Apis.Calendar.v3.Data.EventDateTime();
new_event.End.DateTime = new DateTime(2014, 12, 15, 12, 0, 0);
new_event.Attendees = event_attendees;
service.Events.Insert(new_event, "[email]@gmail.com").Execute();
I thought this would automatically send an invitation email to the visitor, but it doesn't seem to be sent by default as shown here in the documentation . Added parameter sendNotifications
- optional parameter, this question shows how to do this on PHP
but I can't figure out how to add this on .Net
.
UPDATE
Figured out how to install sendNotifications
on .Net
:
Google.Apis.Calendar.v3.EventsResource.InsertRequest insert_event = new EventsResource.InsertRequest(service, new_event, "[email]@gmail.com");
insert_event.SendNotifications = true;
insert_event.Execute();
Still not sending the invitation, although there might still be something wrong.
UPDATE 2
Version problem?
I found this question: Google Calendar API for .Net: Email notifications are not sent when a calendar event is created , which is very similar to the problem I have. Uninstalling and installing the API solved the problem ... I tried this but still have the same problem, currrent version: 1.9.0
source to share