【问题标题】:JavaScript - Google Calendar API Error 400 - location "alt" - Update Recurring Event SERIESJavaScript - Google Calendar API 错误 400 - 位置“alt” - 更新重复事件系列
【发布时间】:2017-05-04 06:09:28
【问题描述】:

谁能帮我更新一个重复事件系列,而不会收到我在下面遇到的location: alt 的错误 400?

当我尝试通过 Google 日历 API 系列更新所有定期事件时,我收到以下错误:

https://content.googleapis.com/calendar/v3/calendars/primary/events/_84qkagpj6oqj6b9o6gs30b9k8kr3aba28oo3cba46co42h236oq3cgpm60?alt=json400()

其中包含此消息:

{"error":
  {"errors":
  [{
   "domain":"global",
   "reason":"invalidAltValue",
   "message":"Unknown output format: json 400",
   "locationType":"parameter",
   "location":"alt"
  }],
  "code":400,
  "message":"Unknown output format: json 400"
  }
}

调用触发错误:

var recurringEvent = {
  'summary': 'Google I/O 2015',
  'location': '800 Howard St., San Francisco, CA 94103',
  'description': 'A chance to hear more about Google\'s developer products.',
  'start': {
    'dateTime': '2017-05-28T09:00:00-07:00',
    'timeZone': 'America/Los_Angeles'
  },
  'end': {
    'dateTime': '2017-05-28T17:00:00-07:00',
    'timeZone': 'America/Los_Angeles'
  },
  'recurrence': [
    'RRULE:FREQ=WEEKLY;INTERVAL=1;UNTIL=2017-06-06T03:59:59.000Z'
  ]
};

var eventId = this.props.user.calendarEventRecurringEventId;  // POSSIBLY THE ISSUE: I use the Recurring Event Id here because I am trying to update all events in the series rather than the individual event.
this.updateEvent(recurringEvent, eventId);

【问题讨论】:

    标签: javascript google-calendar-api


    【解决方案1】:

    错误invalidAltValue 表示alt 参数值指定了未知的输出格式。并且无法识别alt URL 参数的值。

    我已经尝试过你的代码,没有错误。

    【讨论】:

    • alt 参数在哪里设置?我没有在任何地方设置它,也没有在此处的文档中看到它 (developers.google.com/google-apps/calendar/v3/reference/events)。要重现我的问题:创建一个重复事件,然后尝试使用我的代码更新重复事件系列(与重复事件相关的所有事件,而不是重复事件的单个实例)。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多