Sends batch requests to Google REST API by seamlessly integrating with the official googleapis Node.js SDK. Version 0.0.8 is in early development (POC only), with incomplete API support and only JSON request/response types. Not recommended for production. Release cadence is infrequent; last release July 2018. Differentiates by allowing direct use of googleapis methods with batch support, unlike manual batching or alternative libraries like batch-google.
npm install google-batchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a batch of two Gmail list calls and executes them together.
Always load googleapis via googleBatch.require() to ensure batch interception works.
Add googleBatch: true to the parameters of every function call added to the batch.
Use batch.setAuth() for auth instead of passing to constructor.
Avoid APIs that require non-JSON payloads (e.g., media uploads).
For production, use official googleapis batch support or alternative libraries.
const google = googleBatch.require('googleapis');batch.setAuth('YOUR_ACCESS_TOKEN');Add googleBatch: true to each API call's parameters object.