node-google-spreadsheet-basic

0.1.1 • Public • Published

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!

Readme

Keywords

none

Package Sidebar

Install

npm i node-google-spreadsheet-basic

Weekly Downloads

3

Version

0.1.1

License

none

Last publish

Collaborators

  • juanandresfloored