Trying to make a call to a Google Sheets API. My reading of the spreadsheet requests work but the following fails:
batch_update_spreadsheet_request_body = resource: {
'requests': ["insertRange": { 'range':{
"sheetId": 1034566956,
"startRowIndex": rowToInsert,
"endRowIndex": rowToInsert,
"startColumnIndex": 0,
"endColumnIndex": 12, },
#'shiftDimension': discovery.ROWS,
}],
"includeSpreadsheetInResponse":False,
"responseRanges": False,
"responseIncludeGridData": False, }
request = service.spreadsheets().batchUpdate(spreadsheetId=spreadsheetId, body=batch_update_spreadsheet_request_body)
response = request.execute()
I am told there is an issue both with the syntax, and earlier that the JSON names could not be found.
Syntax Error: invalid syntax: C:\Users\evank\Google Drive\M4\ComputerScience\Create Project\Quickstart.py, line 218, pos 52 batch_update_spreadsheet_request_body = resource: {
What am I doing wrong? This is for a school project.
resourcea key of your request body? Should be { 'resource': xxx } OR withoutresource, just { 'request': xxx} - M. Leung[{"insertRange:something}]- JSmith