-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
url.js
46 lines (39 loc) · 1.2 KB
/
url.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const {
CARD_SCREENS,
MULTICARD_SCREENS,
CHART_SCREENS,
CUSTOM_CHART_SCREENS,
CARD_EMBED_SCREENS,
} = require("./screensDict");
const AWS_URL =
"https://325sfff4r2.execute-api.eu-central-1.amazonaws.com/sledilnikScreenshot";
const CARD_URL = `${AWS_URL}?type=card`;
const MULTICARD_URL = `${AWS_URL}?type=multicard`;
const CHART_URL = `${AWS_URL}?type=chart`;
const CARD_EMBED_URL = `${AWS_URL}?type=card_embed`;
exports.CARDS_URL = CARD_SCREENS.reduce((acc, screen) => {
acc[screen] = `${CARD_URL}&screen=${screen}`;
return acc;
}, {});
exports.MULTICARD_URL = MULTICARD_SCREENS.reduce((acc, screen) => {
acc[screen] = `${MULTICARD_URL}&screen=${screen}`;
return acc;
}, {});
exports.CHART_URL = CHART_SCREENS.reduce((acc, screen) => {
acc[screen] = `${CHART_URL}&screen=${screen}`;
return acc;
}, {});
exports.CUSTOM_CHARTS_URL = Object.entries(CUSTOM_CHART_SCREENS).reduce(
(acc, [key, { screen, custom }]) => {
acc[key] = `${CHART_URL}&screen=${screen}&custom=${custom}`;
return acc;
},
{}
);
exports.CARDS_EMBED_URL = Object.entries(CARD_EMBED_SCREENS).reduce(
(acc, [key, { screen }]) => {
acc[key] = `${CARD_EMBED_URL}&screen=${screen}`;
return acc;
},
{}
);