恢复“已取消”的任务使用 Google 日历 API 进行活动?
我正在尝试使用 Google Calendar API 将事件的状态从“已取消”更改回“已确认”(我正在使用 .NET,但任何语言的答案都会有帮助),但我收到 GDataRequestException 错误:
“你可以” t 修改已取消的事件”
例如,如果我使用 API 删除重复系列中的事件,是否可以更改生成的重复异常的状态(没有 EXDATE,只有一个新的“已取消”事件仅当请求包含开始和结束日期的提要时才可见)以“确认”(甚至完全删除生成的异常)以便将重复系列恢复到原始状态?
一旦事件被取消, event.Delete() 和 event.Update() 甚至不再看到该事件。 event.Update() 给出上述错误。
谢谢!
I'm trying to change the status of an event back from "canceled" to "confirmed" using Google Calendar API (I'm using .NET but an answer in any language would help) but I get GDataRequestException error:
"You can't modify a cancelled event"
If I've used the API to delete an event in a repeating series, for example, is it possible to change the status of the resulting recurrence exception (there's no EXDATE, just a new "canceled" event that is only visible when the feed is requested with start and end date) to "confirmed" (or even delete the resulting exception completely) in order to restore the repeating series to the original state?
event.Delete() and event.Update() don't even see the event any longer once it's been .canceled. event.Update() gives the above error.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
一旦事件设置为取消,似乎就无法更改事件的任何参数,包括状态“已取消”。我必须通过创建指定“原始事件”的新重复异常来解决该问题。
It seems like it's impossible to change any parameter for an event once it's set to cancelled, including the status "cancelled". I had to work around the issue by creating new recurrence exceptions with "Original Event" specified.
发现方法如下:首先通过调用
/instances
端点获取事件id(恰好是_
格式):然后调用< code>PATCH 并更改已取消事件的状态:
Found the following way: first obtain the occurrence id (which happens to be in the
<masterId>_<date>
format) by calling/instances
endpoint:Then call
PATCH
and change the status of the cancelled occurrence:我们还可以使用 get带参数
eventId
,我们需要在其中输入事件的id
。我们得到了有关此事件的所有信息。我认为,在紧要关头,我们可以根据这些数据创建一个新事件。We can also use get with parameter
eventId
, where we need to enter theid
of the event. We get all the information about this event. I think that, in a pinch, we can create a new event based on this data.