4

我正在尝试通过 API 创建一个事件,它大部分都在工作,除了在受邀者日历中创建新事件时,没有发送任何电子邮件。

从 Web 界面创建事件正在推动事件以及发送电子邮件(除了一个根本没有收到任何通知的帐户,但这与我当前的问题无关)。

我试图推动的事件是:

<entry xmlns='http://www.w3.org/2005/Atom'
    xmlns:gd='http://schemas.google.com/g/2005'>
  <category scheme='http://schemas.google.com/g/2005#kind'
    term='http://schemas.google.com/g/2005#event'></category>
  <title type='text'>test event</title>
  <content type='text'>content.</content>
  <gd:transparency
    value='http://schemas.google.com/g/2005#event.opaque'>
  </gd:transparency>
  <gd:eventStatus
    value='http://schemas.google.com/g/2005#event.confirmed'>
  </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'/></gd:who>
  <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'/></gd:who>
  <gd:when startTime='2010-05-18T15:30:00.000+10:00'
    endTime='2010-05-18T16:00:00.000+10:00'></gd:when>
</entry>

当我请求事件列表时,我看不出通过 API 创建的事件和通过 Web 界面创建的事件之间有什么大的区别。

编辑:身份验证是通过用户名/密码而不是 AuthSub 或 OAuth,但我怀疑这是否相关

4

1 回答 1

3

根据Trevor 在此线程中的消息,我在(文档记录不佳)gCal:sendEventNotifications属性之后(在我的示例中,需要<entry>扩展节点以包含 gCal 命名空间,因此示例变为:

<entry xmlns='http://www.w3.org/2005/Atom'
    xmlns:gd='http://schemas.google.com/g/2005'
    xmlns:gCal='http://schemas.google.com/gCal/2005'>
  <category scheme='http://schemas.google.com/g/2005#kind'
    term='http://schemas.google.com/g/2005#event'></category>
  <title type='text'>test event</title>
  <content type='text'>content.</content>
  <gd:transparency
    value='http://schemas.google.com/g/2005#event.opaque'>
  </gd:transparency>
  <gd:eventStatus
    value='http://schemas.google.com/g/2005#event.confirmed'>
  </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'/></gd:who>
  <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'/></gd:who>
  <gd:when startTime='2010-05-18T15:30:00.000+10:00'
    endTime='2010-05-18T16:00:00.000+10:00'></gd:when>
</entry>
于 2010-06-22T07:23:56.593 回答