Node.js samples for Google Workspace APIs docs
This repository contains Node.js samples for Google Workspace APIs.
-
Install Node.js.
-
Install
pnpm
by runningnpm install -g pnpm
or see additional options at https://pnpm.io/installation.pnpm
is used withturborepo
to better handled the many packages in the repository. -
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:
- Navigate to the Google Cloud Console API Dashboard
- Enable APIs for products you'd like to test snippets for like Slides or Drive.
- Create a service account key under Credentials.
- 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
.
-
pnpm test
-
pnpm lint
-
Delete service account file.
-
pnpx codemod pnpm/catalog
to add package dependencies to the catalog
Contributions welcome! See the Contributing Guide.