1.0.0 • Published 8 years ago

gas-api-run v1.0.0

Weekly downloads
2
License
Apache License 2....
Repository
github
Last release
8 years ago

gas-api-run Build Status

Google Apps Script Execution API Javascript client

Installation

First, install gas-api-run using npm (we assume you have pre-installed node.js).

npm install gas-api-run --save

Usage

app.js:

import Client from 'gas-api-run'
const config = {
  clientId: "<YOUR_CLIENT_ID>",
  scopes: ["https://www.googleapis.com/auth/spreadsheets"],
  scriptId: "<YOUR_SCRIPT_ID_FOR_DEVELOPMENT>"
};
const client = new Client(config);
global.init = client.init.bind(client);

index.hml

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Google Apps Script Execution API Javascript client library Example</title>
  </head>
  <body>
    <div>
      ....
    </div>
    <script src="app.js"></script>
    <script src="https://apis.google.com/js/client.js?onload=init"></script>
  </body>
</html>

License

Apache 2.0 License

This module is based on JavaScript Quickstart sample code of Google Apps Script and according to terms described in the Apache 2.0 License.