From d14134511b6cd02f1484a583b4382d5f7ebf55fa Mon Sep 17 00:00:00 2001 From: adasq Date: Wed, 25 May 2022 11:17:46 +0200 Subject: [PATCH 1/2] Update authentication.md --- docs/getting-started/authentication.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting-started/authentication.md b/docs/getting-started/authentication.md index c4ad87c..0f36925 100644 --- a/docs/getting-started/authentication.md +++ b/docs/getting-started/authentication.md @@ -77,10 +77,10 @@ You can now use this file in your project to authenticate as your service accoun ```javascript const creds = require('./config/app-credentials.json'); // the file saved above const db = new SheetDatabase(''); -await db.useServiceAccountAuth(creds); +await db.useServiceAccount(creds); // or preferably, loading that info from env vars / config instead of the file -await db.useServiceAccountAuth({ +await db.useServiceAccount({ client_email: process.env.GOOGLE_SERVICE_ACCOUNT_EMAIL, private_key: process.env.GOOGLE_PRIVATE_KEY, }); From 6d55336694386b34f5d57cc4ca650bb6d5fe3458 Mon Sep 17 00:00:00 2001 From: adasq Date: Wed, 25 May 2022 11:18:55 +0200 Subject: [PATCH 2/2] Update sheetdatabase.md --- docs/classdocs/sheetdatabase.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/classdocs/sheetdatabase.md b/docs/classdocs/sheetdatabase.md index 636a0e9..1d74b7d 100644 --- a/docs/classdocs/sheetdatabase.md +++ b/docs/classdocs/sheetdatabase.md @@ -40,7 +40,7 @@ Param|Type|Required|Description > See [Getting Started > Authentication > API Key](getting-started/authentication#api-key) for more details -#### `useServiceAccountAuth(creds)` (async) :id=method-useServiceAccountAuth +#### `useServiceAccount(creds)` (async) :id=method-useServiceAccount > Initialize JWT-style auth for [google service account](https://cloud.google.com/iam/docs/service-accounts) Param|Type|Required|Description @@ -126,4 +126,4 @@ Param|Type|Required|Description `newTableName`|string|✅|new name of the table - ✨ **Side effects** - table is no longer accessible via its old name. -!> If no table with given table name if found it throws an error \ No newline at end of file +!> If no table with given table name if found it throws an error