You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+54-8
Original file line number
Diff line number
Diff line change
@@ -30,11 +30,12 @@ If `npm install` causes a heap error during rollup, try `node --max-old-space-si
30
30
Google Tasks API an authenticated OAuth2 client:
31
31
32
32
1. Go [here](https://developers.google.com/tasks/quickstart/nodejs), and click "Enable the Google Tasks API" button. Follow the steps to download the credentials.json file.
33
-
2.Move credentials.json to your MMM-GoogleTasks directory (MagicMirror/modules/MMM-GoogleTasks/)
33
+
2.Place the `credentials.json` file in a local directory. It can live alongside your MagicMirror configuration file (`config.js`).
34
34
3.[Enable Google Tasks API](https://console.cloud.google.com/apis/library/tasks.googleapis.com). Select the same project as in step 1.
35
-
4. Run authenticate.js:
36
-
`node authenticate.mjs`
37
-
5. Follow the instructions and it should print your lists. Copy the ID of the list you want to the config listID
35
+
4. Run authenticate.mjs, specifying the location of your credential and token file:
5. Follow the instructions to generate tokens. The account name value used when storing tokens in the token.json file. This name is referenced in the `accounts` section of the [configuration](#configuration-options).
38
+
6. Repeat steps 4 and 5 for each account you want to authenticate. Note that every account you want to add must be added to the [Test users](https://console.cloud.google.com/apis/credentials/consent) section for your application.
|`listID`| Yes | List ID printed from authenticate.mjs (see installation) ||
73
+
|`credentialPath`| Yes | Path to the `credentials.json` file ||
74
+
|`tokenPath`| Yes | Path to the `token.json` file ||
75
+
|`accounts`| Yes | See [Accounts Configuration](#accounts-configuration)||
76
+
|`plannedTasks`| Yes | See [Planned Task Configuration](#planned-tasks-configuration)|`{ enabled: false }`|
69
77
|`maxResults`| No | Max number of list items to retrieve. | 10 |
70
78
|`showCompleted`| No | Show completed task items |`false`|
71
79
|`maxWidth`| No | Width of the table |`450px`|
@@ -74,7 +82,44 @@ var config = {
74
82
|`animationSpeed`| No | Speed of the update animation. (Milliseconds) |`2000` (2 seconds) |
75
83
|`initialLoadDelay`| No | Delay before first load (Milliseconds) |`1500` (1.5 seconds) |
76
84
|`ordering`| No | The method to order results. `myorder`, `due`, `title`, `updated`|`myorder`|
77
-
|`plannedTasks`| Yes | See [Planned Task Configuration](#planned-tasks-configuration)|`{ enabled: false }`|
85
+
86
+
87
+
### Accounts Configuration
88
+
89
+
The `accounts` section allows you to configure different accounts from which to pull Google tasks. Each account object can have the following properties:
0 commit comments