feat(library): time to beat from IGDB

This commit is contained in:
lobo committed 2026-09-24 14:40:41 +02:00
1 parent 2f2f8a2918
commit 00a7991380
23 files changed
+853 -22

No files matched your search

+12 -1
View File
@@ -43,6 +43,12 @@ app:
api-key: ${STEAM_API_KEY}
base-url: https://api.steampowered.com
imageService-url: https://cdn.cloudflare.steamstatic.com/steam/apps/
igdb:
# A Twitch developer app (dev.twitch.tv). Without both values time to beat is off.
client-id: ${IGDB_CLIENT_ID:}
client-secret: ${IGDB_CLIENT_SECRET:}
base-url: https://api.igdb.com/v4
token-base-url: https://id.twitch.tv
library:
sync-ttl-hours: 24
force-sync-cooldown-seconds: 60
@@ -67,4 +73,9 @@ resilience4j:
# Steam allows ~100k req/day. Cap at ~2 req/s to leave headroom for bursts.
limit-for-period: 2
limit-refresh-period: 1s
timeout-duration: 5s
timeout-duration: 5s
igdbApi:
# IGDB allows 4 requests/s. Taken per HTTP request.
limit-for-period: 4
limit-refresh-period: 1s
timeout-duration: 10s
@@ -0,0 +1,9 @@
-- Time to beat per Steam app from IGDB, shared by all users. A row with only NULL times means IGDB has no data;
-- it is kept so the app is not asked again before the row is stale.
CREATE TABLE game_time_to_beat (
appid BIGINT PRIMARY KEY,
hastily_minutes INTEGER,
normally_minutes INTEGER,
completely_minutes INTEGER,
fetched_at TIMESTAMPTZ NOT NULL
);