Google Calendar API-在日期之后更新周期性事件 [英] Google Calendar API - Update recurring events after a date

查看:137
本文介绍了Google Calendar API-在日期之后更新周期性事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与Google日历集成.

I'm doing an integration with google calendar.

我需要从第一个日期以外的其他日期更新重复发生的事件的信息(而不更改日期),并且我需要在以下时间表中应用这些更改.

I need to update the information (without changing the date) of a recurring event from a date other than the first, and I need the changes to be applied in the following schedules.

例如:从2020-07-20到2020-07-30的定期调度

Ex: Recurring scheduling 2020-07-20 through 2020-07-30

从23日起更改摘要

致电PUT

https://www.googleapis.com/calendar/v3/calendars/{{id}}/events/{{event_id}}

{ "summary": "TESTE 123", "start": { "dateTime": "2020-07-23T19:00:00", "timeZone": "America/Sao_Paulo" }, "end": { "dateTime": "2020-07-23T20:00:00", "timeZone": "America/Sao_Paulo" }, "recurrence":[ "RRULE:FREQ=DAILY;UNTIL=20200730T235959Z;BYDAY=MO,TU,WE,TH,FR,SA"

问题在于,这样做时,排除了第20、21和22天,

The problem is that when doing it, the days 20, 21 and 22 are excluded,

当日期发生变化时,我先调用PUT,然后再通过POST来创建其他时间表,但是,在这种情况下,日期没有变化,因此我不能错过重复发生的时间.

When there is a change of dates I call the PUT and then the POST to create the other schedules, however, in this case there is no change of date and I cannot miss the recurrence.

推荐答案

我的方法是google-calendar-api

  • 首先编辑原始重复事件,将其限制为您不希望出现的日期 改变.为此,请将RRULEUNTIL组件设置为指向第一个目标实例的开始时间之前

  • First edit the original recurring event, limiting it to the date until which you want no change. Do this by setting the UNTIL component of the RRULE to point before the start time of the first target instance

然后使用更改的信息创建一个new recurring event.

Then create a new recurring event with changed info.

您可以从此文档中获得更好的主意:部分修改重复发生的事件

You can get a better idea from this doc: Modify Recurring Event Partially

这篇关于Google Calendar API-在日期之后更新周期性事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆