summaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-09 00:04:15 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-09 00:04:15 +1000
commited25a8790c43555d58c3debfcc2ec951fd4516fb (patch)
treecdf4ee5213d61b4324558e4f9018ef1b9933daaa /src/config
parentplayers: fix duplicate players (diff)
downloadcaelestia-shell-ed25a8790c43555d58c3debfcc2ec951fd4516fb.tar.gz
caelestia-shell-ed25a8790c43555d58c3debfcc2ec951fd4516fb.tar.bz2
caelestia-shell-ed25a8790c43555d58c3debfcc2ec951fd4516fb.zip
feat: news service
Diffstat (limited to 'src/config')
-rw-r--r--src/config/defaults.ts8
-rw-r--r--src/config/index.ts1
-rw-r--r--src/config/types.ts6
3 files changed, 15 insertions, 0 deletions
diff --git a/src/config/defaults.ts b/src/config/defaults.ts
index 59cc215..cccc421 100644
--- a/src/config/defaults.ts
+++ b/src/config/defaults.ts
@@ -164,4 +164,12 @@ export default {
exact: true,
},
},
+ news: {
+ apiKey: "", // An API key from https://newsdata.io for accessing news
+ countries: ["current"], // A list of country codes or "current" for the current location
+ categories: [] as string[], // A list of news categories to filter by
+ languages: ["en"], // A list of languages codes to filter by
+ domains: [] as string[], // A list of news domains to pull from
+ timezone: "", // A timezone to filter by, e.g. "America/New_York"
+ },
};
diff --git a/src/config/index.ts b/src/config/index.ts
index abdb094..80b4dc4 100644
--- a/src/config/index.ts
+++ b/src/config/index.ts
@@ -21,5 +21,6 @@ export const {
wallpapers,
calendar,
thumbnailer,
+ news,
} = config;
export default config;
diff --git a/src/config/types.ts b/src/config/types.ts
index 68f1824..736548a 100644
--- a/src/config/types.ts
+++ b/src/config/types.ts
@@ -94,4 +94,10 @@ export default {
"thumbnailer.defaults.width": NUM,
"thumbnailer.defaults.height": NUM,
"thumbnailer.defaults.exact": BOOL,
+ "news.apiKey": STR,
+ "news.countries": ARR(STR),
+ "news.categories": ARR(STR),
+ "news.languages": ARR(STR),
+ "news.domains": ARR(STR),
+ "news.timezone": STR,
} as { [k: string]: string | string[] | number[] };