Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.07 KB

README.md

File metadata and controls

38 lines (29 loc) · 1.07 KB

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.

Installing

server

npm install topcap

spreadsheet

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"]) {  console.log(data["records"]) } 
})
          
tc.on('error', function(error) {  console.log(error); })