So, for instance, I am executing multiple requests like this
for (final ParentReference previousParent : previousParents) {
driveService.parents().delete(fileResourceId, previousParent.getId()).execute();
}
Is there a way to execute them in a batch (I mean not like adding to a Collection and then calling execute on each element)?
If there is, will the batch request form some kind of single request to reduce number of API calls and server requests?
I've seen there is a BatchRequest class, but I can't figure if that's what I need and how to use it assuming I have access to com.google.api.services.drive.Drive service.
The BatchRequest takes two arguments and I can't seem to find how to even build it properly, if that's what I need in first place.