node-google-spreadsheet-basic
v0.1.1
Published
Interacts with Google Spreadsheets
Downloads
6
Readme
node-google-spreadsheet-basic
Node wrapper functions to interact with a google spreadsheet by only providing spreadsheet id, email and password.
GOTCHAs
Make sure you set your spreadsheet to be "Published to the web..." via File > Publish to the web ...
API
authenticate(email, password, callback);
Authenticates the user, if successful, returns an authToken [callback(err, authToken)]
send(spreadsheetId, worksheetId, authToken, entries, callback);
Sends an array of entries
Entry format:
{row: NUMBER, col: NUMBER, operation: ['query', 'update'], value: NUMBER/STRING}
Example
var entries = [{row:1, col:1, operation:'update', value:4564},
{row: 10, col:2, operation: 'query'}
];
sendOne(spreadsheetId, worksheetId, authToken, entry, callback);
Sends one entry
getCell(spreadsheetId, worksheetId, autToken, row, col, callback);
Gets a cell value
setCell(spreadsheetId, worksheetId, authToken, row, col, value, callback);
Sets a cell value
test(email, password, spreadsheetId, callback);
Use this function to quickly test the script works for you!