topcap
v0.0.2
Published
Google Spreadsheet updates as a stream
Downloads
9
Readme
topcap
Using topcap, you can stream the data from your Google Spreadsheet as a Node.js service. By installing a Google Apps Script on your Google Drive, topcap can notify you when a change occurs.
Installation
After cloning the repo, install Topcap dependencies using npm install
To use your own spreadsheet with Topcap do the following:
- Make a copy of this spreadsheet
File > Make a Copy
- Authorize with
Authorize > Authorize Application
- Next go to to
Tools > Script Editor
- Choose
Publish > Deploy as Web App.
- Write 'init' or 'first commit' in "Save a New Version"
- Execute the app: 'me'
- Who has access to the app: 'Anyone, even anonymous'
- Press publish
- Copy the URL of your script
Usage
var tc = new Topcap({
scriptURL: "YOUR-SCRIPT-URL"
})
tc.on('data', function(data) {
if (data["updated"] == true)
console.log(data["records"])
})
tc.on('error', function(error) {
console.log(error);
})