Google API (Javascript) - 手动添加日历到 calendarList
Google API (Javascript) - Add calendar to calendarList manually
所以我目前正在使用 Google API Javascript and have run into a bit of a problem. I am manually building a calendar by first calling gapi.client.calendar.calendarList.list which gives me a list of accessible calendars to pull information from (ie. event data). However, for whatever reason this requires the user to have first added the calendar to the "Other Calendars" section of the Calendar. (See attached photo)。
由于这对最终用户来说太痛苦了,我想知道是否可以使用日历的资源 ID/电子邮件地址手动将日历添加到 calendarList。
我正在查看 gapi.client.calendar.calendarList.update,但它似乎不像广告宣传的那样有效。有没有人有手动将日历加载到 calendarList 以便它可以被 calendarList.list 调用并最终传递事件信息的经验?
是的,这是可能的。 Calendars.insert 允许人们手动创建辅助日历并将其添加到他们的 "My calendars" 帐户或任何指定的日历中。这是所有属性。
- id:日历的标识符。
- 摘要:日历的标题。
- timeZone:日历的时区。选修的。
- 描述:
日历的说明。选修的。
- 位置:地理位置
日历的 free-form 文本。选修的。
- kind:类型
资源("calendar#calendar")。
- etag:资源的 ETag。
您可以 Try-it 以确保它按预期工作。希望这对您有所帮助,祝您好运!
所以我目前正在使用 Google API Javascript and have run into a bit of a problem. I am manually building a calendar by first calling gapi.client.calendar.calendarList.list which gives me a list of accessible calendars to pull information from (ie. event data). However, for whatever reason this requires the user to have first added the calendar to the "Other Calendars" section of the Calendar. (See attached photo)。
由于这对最终用户来说太痛苦了,我想知道是否可以使用日历的资源 ID/电子邮件地址手动将日历添加到 calendarList。
我正在查看 gapi.client.calendar.calendarList.update,但它似乎不像广告宣传的那样有效。有没有人有手动将日历加载到 calendarList 以便它可以被 calendarList.list 调用并最终传递事件信息的经验?
是的,这是可能的。 Calendars.insert 允许人们手动创建辅助日历并将其添加到他们的 "My calendars" 帐户或任何指定的日历中。这是所有属性。
- id:日历的标识符。
- 摘要:日历的标题。
- timeZone:日历的时区。选修的。
- 描述: 日历的说明。选修的。
- 位置:地理位置 日历的 free-form 文本。选修的。
- kind:类型 资源("calendar#calendar")。
- etag:资源的 ETag。
您可以 Try-it 以确保它按预期工作。希望这对您有所帮助,祝您好运!