gpt4 book ai didi

java - 谷歌日历API删除 future 事件

转载 作者:太空宇宙 更新时间:2023-11-04 10:12:53 25 4
gpt4 key购买 nike

我正在尝试从 docs 中删除 future 的 Google 日历 Activity 它告诉您使用 events.update() 而我得到的最接近的是:

Events events = calendar.events().instances("primary", eventId).execute();
Event instance = events.getItems().get(0);
String[] recurrence = new String[]{"RRULE:UNTIL=" + new DateTime(new Date())};
instance.setRecurrence(Arrays.asList(recurrence));
calendar.events().update("primary", eventId, instance).execute();

并给我以下内容:

com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
{
"code": 400,
"errors": [
{
"domain": "global",
"message": "Value 'k6nni7i7p54hb82p3p6eh9emg8_20180830T174500Z' in content does not agree with value 'k6nni7i7p54hb82p3p6eh9emg8'. This can happen when a value set through a parameter is inconsistent with a value set in the request.",
"reason": "invalidParameter"
}
],
"message": "Value 'k6nni7i7p54hb82p3p6eh9emg8_20180830T174500Z' in content does not agree with value 'k6nni7i7p54hb82p3p6eh9emg8'. This can happen when a value set through a parameter is inconsistent with a value set in the request."
}

如有任何帮助,我们将不胜感激,谢谢!

最佳答案

使用日历 API 删除事件将利用 events.delete 。您可以使用 Try-it 进行测试。

关于java - 谷歌日历API删除 future 事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52107744/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com