Google日历v3错误“所请求的最短修改时间过去太过分了。 [410]" [英] Google Calendar v3 Error "The requested minimum modification time lies too far in the past. [410]"

查看:132
本文介绍了Google日历v3错误“所请求的最短修改时间过去太过分了。 [410]"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用Google Calendar v3 API返回自某时间点以来已更新的用户的活动列表。

在v2 API中在过去设定这个日期方面没有限制。



如果我们将UpdatedMin设置得太早(例如2个月),那么就会抛出错误



请求的最短修改时间过去太过分了[410]

如果我们将ShowDeleted设置为false,那么我们就不会收到错误信息。



我在这里找不到任何限制。有人知道这个限制的细节吗?不幸的是,当同步日历时,当同步没有运行一段时间的日历时(除了运行我们希望避免的完整列表之外),这是一个显示限制器。

  EventsResource.ListRequest lr = new EventsResource.ListRequest(service,c.uc.calendar); 

lr.UpdatedMin = c.primaryModTime.ToLocalTime();
lr.ShowDeleted = true;
Events el = lr.Execute();
if(el.Items.Count> 0)
{

以下也讨论这个问题,但没有任何解决。



https://groups.google.com/forum/#!msg/google-calendar-api/_rk9o45sXT0/3APXqxi8jvkJ


<解决方案

有一些解释:

https://developers.google.com/google-apps/calendar/v3/sync



它表示在410应该擦除存储并执行完全同步。

同时考虑按照上一段中的建议切换到同步令牌。


We are using the Google Calendar v3 API to return a list of events for a user that have been updated since a point in time.

In the v2 API there was no limitation on setting this date in the past.

If we set the UpdatedMin to a date too far back (like 2 months) then the error is thrown

"The requested minimum modification time lies too far in the past. [410]"

If we set ShowDeleted to false then we do not get the error.

I cannot find any reference to a limitation here. Does anybody know the details of this limit. Unfortunately when synchronising calendars this is a show stopper when synchronisation has not run for a period of time for a calendar (other than running a full list which we would prefer to avoid)

EventsResource.ListRequest lr = new EventsResource.ListRequest(service, c.uc.calendar); 

lr.UpdatedMin = c.primaryModTime.ToLocalTime();
lr.ShowDeleted = true;
Events el = lr.Execute();
if (el.Items.Count > 0)
{   

the following also discusses this issue but without any resoluton.

https://groups.google.com/forum/#!msg/google-calendar-api/_rk9o45sXT0/3APXqxi8jvkJ

解决方案

There is some explanation at:

https://developers.google.com/google-apps/calendar/v3/sync

It says that on 410 you should wipe your storage and perform a full sync instead.

Also consider switching to sync tokens as recommended in the last paragraph.

这篇关于Google日历v3错误“所请求的最短修改时间过去太过分了。 [410]&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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