I need to POST or PUT data into a google sheets sheet using the requests package though I do not know how to do this.
I know how to GET data:
const request = require('request');
const sheetget = 'https://sheets.googleapis.com/v4/spreadsheets/SHEET_ID/values/RANGE?key=API KEY';
request.get(sheetget, (error, response, body) => {
let json = JSON.parse(body);
let values = json['values']
}
[the sheet is public (with a link) so that the API key works and I don't need to use an Oauth2 thingy]
I tried using this: https://developers.google.com/apis-explorer/#p/sheets/v4/sheets.spreadsheets.values.update to try to get the HTTP request but I don't know what to do with the request body.. Do I put it in the url or what..
Also, I'm new to javascript and all of this stuff so please keep your answers newb-friendly. Thanks!
EDIT:
I don't know how to use PUT to update data on the sheet.