function_list: a list of functions from gar_api_generator
...: further arguments passed to the data parse function of f
batch_endpoint: the batch API endpoint to send to
Returns
A list of the Google API responses
Details
This function will turn all the individual Google API functions into one POST request to /batch.
If you need to pass multiple data parse function arguments its probably best to do it in separate batches to avoid confusion.
Examples
## Not run:## usually set on package loadoptions(googleAuthR.batch_endpoint ="https://www.googleapis.com/batch/urlshortener/v1")## from goo.gl APIshorten_url <-function(url){ body = list(longUrl = url) f <- gar_api_generator("https://www.googleapis.com/urlshortener/v1/url","POST", data_parse_function =function(x) x$id) f(the_body = body)}## from goo.gl APIuser_history <-function(){ f <- gar_api_generator("https://www.googleapis.com/urlshortener/v1/url/history","GET", data_parse_function =function(x) x$items) f()}gar_batch(list(shorten_url("http://markedmondson.me"), user_history()))## End(Not run)