topcap

0.0.2 • Public • Published

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);
})

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i topcap

    Weekly Downloads

    2

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • kamicut