【问题标题】:Google Calendar API - Missing End TimeGoogle Calendar API - 缺少结束时间
【发布时间】:2018-08-13 11:11:51
【问题描述】:

尝试使用 Google Calendar API 获取事件列表,返回 400 错误:缺少结束时间。详情如下。有什么建议吗?

身体

{"calendarId":"george.albrecht@xxx.com","timeMin":"2018-03-04T19:00:00+00:00","timeMax":"2018-03-07T19:00 :00+00:00","timeZone":"America/New_York","showDeleted":true}

标题

'内容类型','应用程序/json' '授权', '承载'+access_token

端点和方法

端点=https://www.googleapis.com/calendar/v3/calendars/george.albrecht%40xxx.com/events,方法=GET

【问题讨论】:

    标签: google-calendar-api


    【解决方案1】:

    startTimeendTime 的正文如下所示:

    var event = {
      'summary': 'This is a test Calendar invite using NodeJS',
      'location': 'Under the Bridge',
      'description': 'I dont ever wanna feel Like I did that day But take me to the place I love Take me all the way',
      'start': {
        'dateTime': '2018-02-25T12:58:05-07:00',
        'timeZone': 'America/Los_Angeles',
      },
      'end': {
        'dateTime': '2018-02-26T06:00:00-07:00',
        'timeZone': 'America/Los_Angeles',
      },
      'recurrence': [
        'RRULE:FREQ=DAILY;COUNT=2'
      ],
      'attendees': [
        {'email': 'rhcp@gmail.com'}
    
      ],
      'reminders': {
        'useDefault': true
      }
    };
    

    如果该解决方案仍然不起作用,请尝试降级软件包:

    googleapis@24.0.0 有效 --> 使用@25.0.0 我得到了错误...... google-auth-library@0.12.0 如 SO post 中所述。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-06-02
      • 1970-01-01
      • 1970-01-01
      • 2015-07-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多