Calendar API NextSyncToken always empty
See original GitHub issueI am using a combination of NextSyncToken and NextPageToken.
PageToken seems to work perfectly, but NextSyncToken is empty all the time? See code below:
Events events;
String pageToken = null;
do
{
request.PageToken = pageToken;
events = request.Execute();
Console.WriteLine(events.Items.Count);
if (events.Items != null && events.Items.Count > 0)
{
foreach (var eventItem in events.Items)
{
string when = eventItem.Start.DateTime.ToString();
if (String.IsNullOrEmpty(when))
{
when = eventItem.Start.Date;
}
}
}
else
{
Console.WriteLine("No upcoming events found.");
}
pageToken = events.NextPageToken;
} while (events.NextPageToken != null);
Console.WriteLine("synch token " + events.NextSyncToken);
Console.WriteLine("page token " + events.NextPageToken);
The expected behavior is that the synctoken is on the last page however it is null.
Issue Analytics
- State:
- Created 8 years ago
- Comments:5
Top Results From Across the Web
nextSyncToken is always empty in the list responce
The items are always empty for all the events: https://www.screencast.com/t/hzHck7a8d . I need to get all the event's occurrences.
Read more >Synchronize resources efficiently | Google Calendar
This guide describes how to implement "incremental synchronization" of calendar data. Using this method, you can keep data for all calendar collections in ......
Read more >Events-List started returning 410 when using updatedMin ...
Code was working great, until two days ago, where in some calendars I started receiving 410 response when using updatedMin.
Read more >Google Calendar API in Python | List All Calendars - YouTube
In this Google Calendar API in Python tutorial, I will be covering how to use Calendar().List() method to list all the calendars in...
Read more >calendar
Package calendar provides access to the Calendar API. ... By default, fields with // empty or default values are omitted from API requests....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi
I have managed to find out why. It seems synch token is broken when using the following option:
–> 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 thenextSyncToken
is not provided on purpose, this behaviour should at least be clearly documented in the relevant docs.