Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/classdocs/sheetdatabase.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
!> If no table with given table name if found it throws an error
4 changes: 2 additions & 2 deletions docs/getting-started/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -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('<YOUR-SHEETS-DOC-ID>');
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,
});
Expand Down