Back to Top

libraries > Google.js

new Google(tokenKey)

Methods to interact with the GoogleSheets API.

Parameters

Name Type Description
tokenKey string

The key of the secret containing a Google oAuth token. Defaults to google.oauth.

Properties

Name Type Description
request Oauth

Authenticated request.

Google GoogleSheets

Sheets Class.

Examples

const Google = require('vendor/Google.js');
const google = new Google();
const response = google.request.get('https://sheets.googleapis.com/v4/spreadsheets');
Mesa.log.info('Get Response: ', response);

Returns

class