Skip to content

Commit 3510c42

Browse files
committed
Added examples
1 parent 97bd6e0 commit 3510c42

16 files changed

+102925
-3
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Custom
22

3-
output
3+
/output
44
/dev
55
**.xcf
66

77
## The user's custom configuration file
8-
config.json
8+
/config.json
99

1010
# Logs
1111
logs

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This project provides a quick and easy way to get a list of all games currently
66

77
Using the configuration file, the types and format of a large number of properties can be customized, from simply getting the game's names all the way to fetching store prices at the moment of the request.
88

9-
Take a look at the section below to see how to use the configuration file, or take the `config.default.json` file as an example and work from there.
9+
Take a look at the section below to learn how to use the configuration file, or take a look at the [examples](examples) and work from there.
1010

1111
## Setup
1212

@@ -24,6 +24,8 @@ node index.js
2424

2525
You will find the resulting data in the created `output` folder.
2626

27+
Unsure how it works? Take a look at the [examples](examples) for some inspiration.
28+
2729
## Configuration
2830

2931
### Schema validation

examples/completionist/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# The "Completionist"
2+
3+
This example configuration fetches as many properties as possible for a number of different markets.
4+
5+
The values were fetched on 2021-03-01.

examples/completionist/config.json

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"$schema": "../../config.schema.json",
3+
"markets": [
4+
"US",
5+
"RU"
6+
],
7+
"language": "en-us",
8+
"platformsToFetch": [
9+
"console",
10+
"pc",
11+
"eaPlay"
12+
],
13+
"outputFormat": "productId",
14+
"treatEmptyStringsAsNull": true,
15+
"keepCompleteProperties": false,
16+
"includedProperties": {
17+
"productTitle": true,
18+
"productId": true,
19+
"developerName": true,
20+
"publisherName": true,
21+
"categories": true,
22+
"productDescription": {
23+
"enabled": true,
24+
"preferShort": false
25+
},
26+
"images": {
27+
"enabled": true,
28+
"imageTypes": {
29+
"TitledHeroArt": -1,
30+
"SuperHeroArt": -1,
31+
"Logo": -1,
32+
"Poster": -1,
33+
"Screenshot": -1,
34+
"BoxArt": -1,
35+
"Hero": -1,
36+
"BrandedKeyArt": -1,
37+
"FeaturePromotionalSquareArt": -1
38+
}
39+
},
40+
"releaseDate": {
41+
"enabled": true,
42+
"format": "dateTime"
43+
},
44+
"userRating": {
45+
"enabled": true,
46+
"aggregationInterval": "AllTime",
47+
"format": "stars"
48+
},
49+
"pricing": {
50+
"enabled": true,
51+
"priceTypes": [
52+
"ListPrice",
53+
"MSRP",
54+
"WholesalePrice"
55+
],
56+
"missingPricePolicy": "useNull"
57+
}
58+
}
59+
}

examples/completionist/output/formattedGameProperties_console_RU.json

+21,788
Large diffs are not rendered by default.

examples/completionist/output/formattedGameProperties_console_US.json

+23,025
Large diffs are not rendered by default.

examples/completionist/output/formattedGameProperties_eaPlay_RU.json

+3,987
Large diffs are not rendered by default.

examples/completionist/output/formattedGameProperties_eaPlay_US.json

+4,268
Large diffs are not rendered by default.

examples/completionist/output/formattedGameProperties_pc_RU.json

+17,031
Large diffs are not rendered by default.

examples/completionist/output/formattedGameProperties_pc_US.json

+17,827
Large diffs are not rendered by default.
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# The "Graphical Enthusiast"
2+
3+
This example configuration fetches image URL's and user ratings for games that are available on Game Pass for PC.
4+
5+
The values were fetched on 2021-03-01.
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"$schema": "../../config.schema.json",
3+
"markets": [
4+
"US"
5+
],
6+
"language": "en-us",
7+
"platformsToFetch": [
8+
"pc"
9+
],
10+
"outputFormat": "productTitle",
11+
"includedProperties": {
12+
"images": {
13+
"enabled": true,
14+
"imageTypes": {
15+
"TitledHeroArt": -1,
16+
"SuperHeroArt": -1,
17+
"Logo": -1,
18+
"Poster": -1,
19+
"Screenshot": -1,
20+
"BoxArt": -1,
21+
"Hero": -1,
22+
"BrandedKeyArt": -1,
23+
"FeaturePromotionalSquareArt": -1
24+
}
25+
},
26+
"userRating": {
27+
"enabled": true,
28+
"aggregationInterval": "AllTime",
29+
"format": "stars"
30+
}
31+
}
32+
}

examples/graphicalEnthusiast/output/formattedGameProperties_pc_US.json

+13,495
Large diffs are not rendered by default.

examples/minimalist/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# The "Minimalist"
2+
3+
This example configuration fetches only game names for games that are currently available on Game Pass for Console.
4+
5+
The values were fetched on 2021-03-01.

examples/minimalist/config.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "config.schema.json",
3+
"markets": [
4+
"US"
5+
],
6+
"language": "en-us",
7+
"platformsToFetch": [
8+
"console"
9+
],
10+
"outputFormat": "array",
11+
"includedProperties": {
12+
"productTitle": true
13+
}
14+
}

0 commit comments

Comments
 (0)