Updated README
This commit is contained in:
+2
-10
@@ -21,17 +21,9 @@ This guide explains how to create and configure API keys for use with the Google
|
||||
- API restrictions: select **Google Sheets API** only.
|
||||
- Do not leave keys unrestricted in production.
|
||||
|
||||
## Example `config.json` snippet
|
||||
## Configure the project
|
||||
|
||||
To configure one key:
|
||||
|
||||
```json
|
||||
{
|
||||
"apiKeys": [
|
||||
"YOUR_API_KEY_1"
|
||||
]
|
||||
}
|
||||
```
|
||||
In `config.json`, add the keys under the `apiKeys` array. Here's an example using apiKeys:
|
||||
|
||||
To configure multiple keys with per-key rate limits:
|
||||
|
||||
|
||||
@@ -36,20 +36,24 @@ Here is an example `config.json` matching the repository's `config.example.json`
|
||||
{ "key": "YOUR_API_KEY_2", "rateLimitPerMinute": 50 }
|
||||
],
|
||||
"serviceAccounts": [
|
||||
{ "path": "credentials.json", "rateLimitPerMinute": 50 }
|
||||
{ "path": "credentials.json", "rateLimitPerMinute": 50 },
|
||||
{ "path": "credentials_2.json", "rateLimitPerMinute": 50 }
|
||||
],
|
||||
"documents": [
|
||||
{
|
||||
"documentId": "YOUR_SPREADSHEET_ID",
|
||||
"outputDir": "output/your-document",
|
||||
"sheets": [
|
||||
{ "name": "Sheet1", "outputFilename": "sheet1.csv" }
|
||||
{ "name": "Sheet1", "outputFilename": "sheet1.csv" },
|
||||
{ "name": "Sheet2", "outputFilename": "sheet2.csv" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Your `config.json` should ONLY contain `apiKeys` OR `serviceAccounts`.
|
||||
|
||||
## Rate limiting
|
||||
|
||||
The app enforces a maximum of `rateLimitPerMinute` requests per minute to avoid exceeding API limits.
|
||||
|
||||
Reference in New Issue
Block a user