I've successfully implemented (using the java client library) authentication and retrieval of calendars. My problem is, I want to retrieve a list of events from multiple calendars, but the time it takes to send an individual API request for each calendar starts to add up, resulting in 20 second page load times if I have a lot of calendars enabled. I understand that the API doesn't provide a way to request events from multiple calendars, but can I use the BatchRequest class to group my requests?
I've been able to get this example to work to insert multiple calendars in batch.
But I can't extend this to listing events. Essentially, I want to do this:
for (int i=0; i < calendarIDs.length; i++) {
client.events().list(calendarIDs[i]).queue(batch, callback);
}
batch.execute();