Skip to content

Commit

Permalink
chore: update to [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Bouquillon committed Mar 16, 2020
1 parent c220474 commit f6dbf86
Show file tree
Hide file tree
Showing 5 changed files with 338 additions and 537 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ This can be useful when you want people edit spreadsheets and need to work with

## QuickStart

`extractSheets` can use node callback pattern or async/await.

```js
const { extractSheets } = require("spreadsheet-to-json");

Expand All @@ -53,7 +55,7 @@ extractSheets(
{
// your google spreadhsheet key
spreadsheetKey: "abch54Ah75feBqKGiUjITgE9876Ypb0yE-abc",
// your google oauth2 credentials (optional for world-readable spreadsheets)
// your google oauth2 credentials or API_KEY
credentials: require("./google-generated-creds.json"),
// optional: names of the sheets you want to extract
sheetsToExtract: ["Customers", "Invoices"],
Expand All @@ -71,6 +73,16 @@ see [./example.js](./example.js)

## Authentification

The `credentials` key can either be a API_KEY `string` or a service account `object`.

### API Key

You can create an API key here : https://console.developers.google.com/apis/credentials

Be sure to restrict it to Google Drive API

### Google service account

Create a credentials.json file for your app here : https://console.developers.google.com/

- create a new project
Expand Down
Loading

0 comments on commit f6dbf86

Please sign in to comment.