Closed ganySA closed 8 years ago
Hi
I have managed to find out why. It seems synch token is broken when using the following option:
EventsResource.ListRequest request = service.Events.List("primary");
request.TimeMin = DateTime.Now;
request.ShowDeleted = true;
request.SingleEvents = true;
request.MaxResults = 100;
--> BREAKS --> request.OrderBy = EventsResource.ListRequest.OrderByEnum.StartTime;
Why is this closed ? Using the orderBy
param also breaks js client, but I can't find any documentation about this. If the nextSyncToken
is not provided on purpose, this behaviour should at least be clearly documented in the relevant docs.
The author of the issue closed it themselves. Even if they hadn't, if this is a limitation of the API itself, this repo wouldn't be the right place for the issue to stay open - this repo is for issues in the client libraries themselves.
The documentation does mention not being able to provide orderBy
in the same request as a syncToken
- it sounds like that documentation needs to be expanded a bit. I can reach out to the Calendar API team to suggest that if you would like me to, but I very much doubt that this is a C# client library issue.
@eric-burel it is: https://developers.google.com/calendar/v3/reference/events/list
There are several query parameters that cannot be specified together with
nextSyncToken
to ensure consistency of the client state.These are:
iCalUID
orderBy
privateExtendedProperty
q
sharedExtendedProperty
timeMin
timeMax
updatedMin
As of today, I can confirm that this behavior is still very much implied in the documentation (namely the exceprt from @eric-burel 's post above). I was iteratively paging through a response from an Events list request with an orderBy
parameter set. Though using the nextPageToken
during iterative paging, the last page of the response did not contain the lastSyncToken
.
Eliminating the orderBy
parameter (resulting in the default 'unspecified, stable order') resulted in successful return of the lastSyncToken
. Hope this helps somebody.
I am using a combination of NextSyncToken and NextPageToken.
PageToken seems to work perfectly, but NextSyncToken is empty all the time? See code below:
The expected behavior is that the synctoken is on the last page however it is null.