batchUpdate static method
Applies one or more updates to the spreadsheet. About batchUpdate
client
- client that is used for request.
spreadsheetId
- the id of a spreadsheet to perform requests
on.
requests
- list of valid requests to perform on the Spreadsheet with
spreadsheetId
Information about requests is available at the official Google docs
To create requests
you can use official googleapis library
Returns the Response
of batchUpdate request.
About batchUpdate response
Throws GSheetsException
Implementation
static Future<http.Response> batchUpdate(
AutoRefreshingAuthClient client,
String spreadsheetId,
List<Map<String, dynamic>> requests,
) async {
final response = await client.post(
'$_sheetsEndpoint$spreadsheetId:batchUpdate'.toUri(),
body: jsonEncode({'requests': requests}),
);
checkResponse(response);
return response;
}