Closed altbdoor closed 5 months ago
Context in https://news.ycombinator.com/item?id=40014730#40047999
Looking at the code, we are able to handle multiple actions in a single request, by sending an array in the request body instead. Example:
curl -L \ --data '[{ "method": "POST", "sheet": "Sheet1", "payload": { "username": "John", "age": 25 } }, { "method": "GET", "sheet": "Sheet1" }]' \ "https://script.google.com/macros/s/$APP_ID/exec"
However, this was not documented in the documentation page.
This seems like a really handy feature, should this be documented somewhere?
As an aside, I almost created a PR to tweak handlePost to handle an array instead of an object 😆
handlePost
Hi @altbdoor ,
That's a good point. I've added it to the docs in relevant sections e.g. https://spreadapi.roombelt.com/usage/usage#insert-row.
Thanks for raising this! Mateusz
Thanks @ziolko !
Context in https://news.ycombinator.com/item?id=40014730#40047999
Looking at the code, we are able to handle multiple actions in a single request, by sending an array in the request body instead. Example:
However, this was not documented in the documentation page.
This seems like a really handy feature, should this be documented somewhere?
As an aside, I almost created a PR to tweak
handlePost
to handle an array instead of an object 😆