Skip to content

googleworkspace/node-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Node.js samples for Google Workspace APIs docs

This repository contains Node.js samples for Google Workspace APIs.

Development

  1. Install Node.js.

  2. Install pnpm by running npm install -g pnpm or see additional options at https://pnpm.io/installation. pnpm is used with turborepo to better handled the many packages in the repository.

  3. Create a Service Account

    Before running tests, create a service account and download application_credentials.json in this directory.

    To create a service account, follow these steps:

    1. Navigate to the Google Cloud Console API Dashboard
    2. Enable APIs for products you'd like to test snippets for like Slides or Drive.
    3. Create a service account key under Credentials.
    4. After creating a new JSON Service account key without a role and set the env variable SERVICE_ACCOUNT_CREDENTIALS=some/path/to/application_credentials.json.
  4. pnpm test

  5. pnpm lint

  6. Delete service account file.

  7. pnpx codemod pnpm/catalog to add package dependencies to the catalog

Contributing

Contributions welcome! See the Contributing Guide.