0.0.2 • Published 11 years ago

topcap v0.0.2

Weekly downloads
2
License
-
Repository
github
Last release
11 years ago

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:

  1. Make a copy of this spreadsheet File > Make a Copy
  2. Authorize with Authorize > Authorize Application
  3. Next go to to Tools > Script Editor
  4. 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
  5. 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);
})