A module to interface with Google sheets.
npm install google-sheet
git clone git@github.com:JacobRichardson/GoogleSheets.git
npm install
`
Basic Usage
`js
//Require in the package.
const googleSheet = require('googleSheet');
//Retrieve the sheet using the spreadsheet id.
const sheet = await googleSheet.accessSpreadsheet('');
//Retrieve all the rows of the sheet using get rows.
let rows = await googleSheet.getRows(sheet);
//Create a new row with the name Jacob. (Spread sheet must have a column with the title of name)
await googleSheet.createRow(sheet, {
name: 'Jacob'
});
//Retrieve a specific row using get queried rows and name equaling Jacob.
rows = await googleSheet.getQueriedRows(sheet, 'name = Jacob');
//Delete a row using delete row and the first row we found.
googleSheets.deleteRow(rows[0]);
`
Testing
`
npm run test
``