views:

194

answers:

1

I'm trying to create an event through the API and it is mostly working, with the exception that while the new events are being created in the invitees calendars, no emails are being sent.

Creating the event from the web interface is pushing the event through, as well as sending the email (except one account that doesn't get any notifications at all, but that's not relevant to my current problem).

The event I am trying to push in is:

<entry xmlns='http://www.w3.org/2005/Atom'
    xmlns:gd='http://schemas.google.com/g/2005'&gt;
  <category scheme='http://schemas.google.com/g/2005#kind'
    term='http://schemas.google.com/g/2005#event'&gt;&lt;/category&gt;
  <title type='text'>test event</title>
  <content type='text'>content.</content>
  <gd:transparency
    value='http://schemas.google.com/g/2005#event.opaque'&gt;
  </gd:transparency>
  <gd:eventStatus
    value='http://schemas.google.com/g/2005#event.confirmed'&gt;
  </gd:eventStatus>
  <gd:where valueString='somewhere'></gd:where>
  <gd:who email="[redacted]" rel='http://schemas.google.com/g/2005#event.attendee' valueString='Me'><gd:attendeeStatus value='http://schemas.google.com/g/2005#event.invited'/&gt;&lt;/gd:who&gt;
  <gd:who email="[redacted again]" rel='http://schemas.google.com/g/2005#event.organizer' valueString='Also Me'><gd:attendeeStatus value='http://schemas.google.com/g/2005#event.accepted'/&gt;&lt;/gd:who&gt;
  <gd:when startTime='2010-05-18T15:30:00.000+10:00'
    endTime='2010-05-18T16:00:00.000+10:00'></gd:when>
</entry>

And when I request event lists I can't see any large difference between events created through the API and through the web interface.

Edit: Authentication was via username/password rather than AuthSub or OAuth, but I doubt that would be relevant

A: 

As per Trevor's message in this thread I'm after the (poorly documented) gCal:sendEventNotifications property (which in my example's case requires the <entry> node to be extended to include the gCal namespace, so the example becomes:

<entry xmlns='http://www.w3.org/2005/Atom'
    xmlns:gd='http://schemas.google.com/g/2005'
    xmlns:gCal='http://schemas.google.com/gCal/2005'&gt;
  <category scheme='http://schemas.google.com/g/2005#kind'
    term='http://schemas.google.com/g/2005#event'&gt;&lt;/category&gt;
  <title type='text'>test event</title>
  <content type='text'>content.</content>
  <gd:transparency
    value='http://schemas.google.com/g/2005#event.opaque'&gt;
  </gd:transparency>
  <gd:eventStatus
    value='http://schemas.google.com/g/2005#event.confirmed'&gt;
  </gd:eventStatus>
  <gd:where valueString='somewhere'></gd:where>
  <gCal:sendEventNotifications value='true'></gCal:sendEventNotifications>
  <gd:who email="[redacted]" rel='http://schemas.google.com/g/2005#event.attendee' valueString='Me'><gd:attendeeStatus value='http://schemas.google.com/g/2005#event.invited'/&gt;&lt;/gd:who&gt;
  <gd:who email="[redacted again]" rel='http://schemas.google.com/g/2005#event.organizer' valueString='Also Me'><gd:attendeeStatus value='http://schemas.google.com/g/2005#event.accepted'/&gt;&lt;/gd:who&gt;
  <gd:when startTime='2010-05-18T15:30:00.000+10:00'
    endTime='2010-05-18T16:00:00.000+10:00'></gd:when>
</entry>
Cebjyre