node.jsgoogle-apigoogle-api-nodejs-clientnode-request

Google API Batch Request with Node


I noticed Google removed batch requests from their Node client recently:

https://github.com/google/google-api-nodejs-client/blob/0db674b7d3a04cf65e223f876cf7b3f427025cd4/MIGRATING.md

How might I write a batch request with Node? I'm trying to get the content of emails in Gmail given a set of message IDs.

Here's how Google says I should do it, but I've never made this type of request before:

https://developers.google.com/gmail/api/guides/batch


Solution

  • I've created a module as a stop gap! https://github.com/wapisasa/batchelor

    I hope this got to you in time :)