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
+26-5Lines changed: 26 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,14 @@ The schema can be found in the `config.schema.json` file and used within your `c
48
48
49
49
*NOTE: The script will test your provided `config.json` against this schema, so make sure your configuration is valid.*
50
50
51
+
Note that *only if* you want to fetch tag data, Steam requires you to be authenticated with your Steam account.
52
+
For this, provide your Steam account name and password in the `steamUser` property of the configuration file.
53
+
The integration does not transmit this data over the internet, everything is done locally.
54
+
If you have Steam Guard enabled, you will also need to provide the Steam Guard code when running the integration.
55
+
56
+
Once you have authenticated once, the integration will store a local refresh token for ~200 days before you need to log in again.
57
+
You can then replace the `accountName` and `password` with the `useRefreshToken` property set to `true`, which will make the integration use the stored refresh token to authenticate you to the Steam API.
58
+
51
59
### Properties
52
60
53
61
The following is a list of all configuration items, their defaults and the values they can take.
@@ -114,6 +122,18 @@ If true, the integration will always update entries in the Notion database that
114
122
|`boolean`|`false`|`true` or `false`| No |
115
123
</details>
116
124
125
+
<details>
126
+
<summary><code>steamUser</code></summary>
127
+
128
+
Login details to authenticate to your Steam account. This is required to be able to fetch tag data. If you have Steam Guard enabled, you will need to provide the Steam Guard code when running the app. Once logged in, the integration will store a local refresh token for ~200 days before you need to log in again. The integration does not transmit any of your login details anywhere, they are used internally to authenticate yourself to the Steam API. If you do not want to fetch tag data, you do not need to provide this property!
129
+
130
+
| Type | Default value | Possible values | Required |
131
+
|---|---|---|---|
132
+
|`useRefreshToken`|`true`|`true` only | Yes, if you want to use an already stored refresh token. This requires a previous login using `accountName` and `password`. |
133
+
|`accountName`|`<steamAccountName>`| Your Steam account name | Yes, if you do not already have a stored refresh token and set `useRefreshToken` to `true`. |
134
+
|`password`|`<steamAccountPassword>`| Your Steam account password | Yes, if you do not already have a stored refresh token and set `useRefreshToken` to `true`. |
135
+
</details>
136
+
117
137
<details>
118
138
<summary><code>gameProperties</code></summary>
119
139
@@ -143,7 +163,8 @@ Which game properties should be fetched when a new Steam game is detected, and t
143
163
},
144
164
"tags": {
145
165
"enabled": true,
146
-
"notionProperty": "Tags"
166
+
"notionProperty": "Tags",
167
+
"tagLanguage": "english"
147
168
}
148
169
}
149
170
```
@@ -347,7 +368,7 @@ The name of the Notion property to set the user review score in.
347
368
<details>
348
369
<summary><code>tags</code></summary>
349
370
350
-
The user-defined tags of the game as they can be seen on the store page. The database field in Notion must be of type `Multi-select`.
371
+
Requires Steam login! Provide accountName and password in the top-level `steamUser` property! The user-defined tags of the game as they can be seen on the store page. The database field in Notion must be of type `Multi-select`.
351
372
352
373
| Type | Default value | Possible values | Required |
353
374
|---|---|---|---|
@@ -357,7 +378,7 @@ The user-defined tags of the game as they can be seen on the store page. The dat
357
378
"tags": {
358
379
"enabled": true,
359
380
"notionProperty": "Tags",
360
-
"language": "english"
381
+
"tagLanguage": "english"
361
382
}
362
383
```
363
384
@@ -379,13 +400,13 @@ The name of the Notion property to set the tags in. This field must be of type `
379
400
|---|---|---|---|
380
401
|`string`|`"Tags"`| A valid Notion property name | Yes |
381
402
382
-
<h4><code>language</code></h4>
403
+
<h4><code>tagLanguage</code></h4>
383
404
384
405
The language of the tags, e.g. "english" or "spanish".
385
406
386
407
| Type | Default value | Possible values | Required |
387
408
|---|---|---|---|
388
-
|`string`|`"english"`| Valid language names. Invalid names return an error from the Steam API. | Yes |
409
+
|`string`|`"english"`| Valid full language names. Invalid names return an error from the Steam API. | Yes |
Copy file name to clipboardExpand all lines: config.schema.json
+95-26Lines changed: 95 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,50 @@
41
41
"type": "boolean",
42
42
"default": false
43
43
},
44
+
"steamUser": {
45
+
"description": "Login details to authenticate to your Steam account. This is required to be able to fetch tag data. If you have Steam Guard enabled, you will need to provide the Steam Guard code when running the app. Once logged in, the integration will store a local refresh token for ~200 days before you need to log in again. The integration does not transmit any of your login details anywhere, they are used internally to authenticate yourself to the Steam API. If you do not want to fetch tag data, you do not need to provide this property!",
46
+
"type": "object",
47
+
"default": {
48
+
"accountName": "<steamAccountName>",
49
+
"password": "<steamAccountPassword>"
50
+
},
51
+
"additionalProperties": false,
52
+
"properties": {
53
+
"useRefreshToken": {
54
+
"description": "If true, the integration will try to use the refresh token stored in the local database to authenticate to your Steam account. You can only set this to \"true\" if you have previously logged in using \"accountName\" and \"password\", and the refresh token is still valid.",
55
+
"type": "boolean",
56
+
"default": false
57
+
},
58
+
"accountName": {
59
+
"description": "Your Steam account name.",
60
+
"type": "string",
61
+
"default": "<steamAccountName>"
62
+
},
63
+
"password": {
64
+
"description": "Your Steam account password.",
65
+
"type": "string",
66
+
"default": "<steamAccountPassword>"
67
+
}
68
+
},
69
+
"oneOf": [
70
+
{
71
+
"required": [
72
+
"accountName",
73
+
"password"
74
+
]
75
+
},
76
+
{
77
+
"properties": {
78
+
"useRefreshToken": {
79
+
"const": true
80
+
}
81
+
},
82
+
"required": [
83
+
"useRefreshToken"
84
+
]
85
+
}
86
+
]
87
+
},
44
88
"gameProperties": {
45
89
"description": "Which game properties should be fetched when a new Steam game is detected, and the name of the corresponding field in the Notion database.",
46
90
"type": "object",
@@ -69,7 +113,8 @@
69
113
},
70
114
"tags": {
71
115
"enabled": true,
72
-
"notionProperty": "Tags"
116
+
"notionProperty": "Tags",
117
+
"tagLanguage": "english"
73
118
},
74
119
"gameDescription": {
75
120
"enabled": true,
@@ -227,30 +272,30 @@
227
272
"type": "string",
228
273
"default": "percentage",
229
274
"oneOf": [
230
-
{
231
-
"const": "percentage",
232
-
"title": "Notion database field type: \"Number\". A percentage value formatted as a float from 0.00-1.00."
233
-
},
234
-
{
235
-
"const": "sentiment",
236
-
"title": "Notion database field type: \"Select\". A sentiment value such as \"Overwhelmingly Positive\" or \"Mixed\"."
237
-
},
238
-
{
239
-
"const": "total",
240
-
"title": "Notion database field type: \"Number\". The total number of reviews submitted for the game, across all languages."
241
-
},
242
-
{
243
-
"const": "positive",
244
-
"title": "Notion database field type: \"Number\". The total number of positive reviews submitted for the game, across all languages."
245
-
},
246
-
{
247
-
"const": "negative",
248
-
"title": "Notion database field type: \"Number\". The total number of negative reviews submitted for the game, across all languages."
249
-
},
250
-
{
251
-
"const": "positive/negative",
252
-
"title": "Notion database field type: \"Text\". The total number of positive and negative reviews submitted for the game, across all languages, formatted as \"{numPositive} positive / {numNegative} negative\"."
253
-
}
275
+
{
276
+
"const": "percentage",
277
+
"title": "Notion database field type: \"Number\". A percentage value formatted as a float from 0.00-1.00."
278
+
},
279
+
{
280
+
"const": "sentiment",
281
+
"title": "Notion database field type: \"Select\". A sentiment value such as \"Overwhelmingly Positive\" or \"Mixed\"."
282
+
},
283
+
{
284
+
"const": "total",
285
+
"title": "Notion database field type: \"Number\". The total number of reviews submitted for the game, across all languages."
286
+
},
287
+
{
288
+
"const": "positive",
289
+
"title": "Notion database field type: \"Number\". The total number of positive reviews submitted for the game, across all languages."
290
+
},
291
+
{
292
+
"const": "negative",
293
+
"title": "Notion database field type: \"Number\". The total number of negative reviews submitted for the game, across all languages."
294
+
},
295
+
{
296
+
"const": "positive/negative",
297
+
"title": "Notion database field type: \"Text\". The total number of positive and negative reviews submitted for the game, across all languages, formatted as \"{numPositive} positive / {numNegative} negative\"."
298
+
}
254
299
]
255
300
},
256
301
"notionProperty": {
@@ -266,7 +311,7 @@
266
311
]
267
312
},
268
313
"tags": {
269
-
"description": "The user-defined tags of the game as they can be seen on the store page. The database field in Notion must be of type \"Multi-select\".",
314
+
"description": "Requires Steam login! Provide \"accountName\" and \"password\" in the top-level \"steamUser\" property, \"refreshToken\" if you already logged in before! The user-defined tags of the game as they can be seen on the store page. The database field in Notion must be of type \"Multi-select\".",
console.error("\"steamUser.useRefreshToken\" was provided in the config, but no refresh token found in local database. \"steamUser.accountName\" and \"steamUser.password\" are required in the config, but they were not provided!");
console.log("Retrieving tag names failed. The most likely cause is that the language you provided is invalid and does not yield any results from the Steam API.");
114
+
console.log("Retrieving tag names failed! The most likely cause is that you have not provided the \"steamUser\" property and are not authenticated, or the provided \"tagLanguage\" is invalid.");
0 commit comments