Socket
Socket
Sign inDemoInstall

@invisible/google-api

Package Overview
Dependencies
Maintainers
8
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@invisible/google-api

This package wraps the complexity of Google's auth for service workers and returns authorized [`googleapis`](http://google.github.io/google-api-nodejs-client/) with some helpers.


Version published
Maintainers
8
Created
Source

@invisible/google-api

This package wraps the complexity of Google's auth for service workers and returns authorized googleapis with some helpers.

How to use this package?

  1. You need to pass auth token and scopes(optional, spreadsheets by default) as parameters to .authorize() or as environmental variables:
# GOOGLE_SERVICE_ACCOUNT_B64 is the JSON service worker credentials encoded in base64.
GOOGLE_SERVICE_ACCOUNT_B64
# SCOPES is a comma separated list of scopes.
SCOPES
  • You can add environmental variables to your .env file (env.sample as example)
  1. API:
import google from '@invisible/google-api'

const { sheets } = await google.authorize(GOOGLE_SERVICE_ACCOUNT_B64, SCOPES)

sheets.getSheet(spreadsheetId, range)

Publish to NPM

npm run build
npm publish

FAQs

Package last updated on 24 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc