fixed steam api by passing the right thing lol

This commit is contained in:
dylan 2025-12-28 18:49:21 +00:00
parent b549858bc0
commit 3b8a1edcb4

View file

@ -314,14 +314,14 @@ export async function getHardcoverActivity(config) {
// requires STEAM_WEBAPI_KEY see readme for more info
// needs your steam id 64 (not username) - convert at steamid.io
export async function getSteamRecentlyPlayed(config) {
const { steamId } = config
const { userId } = config
const apiKey = process.env.STEAM_WEBAPI_KEY
if (!apiKey) {
throw new Error('STEAM_WEBAPI_KEY environment variable not set')
}
const res = await fetch(
`https://api.steampowered.com/IPlayerService/GetOwnedGames/v1/?key=${apiKey}&steamid=${steamId}&format=json&include_appinfo=1&include_played_free_games=1`,
`https://api.steampowered.com/IPlayerService/GetOwnedGames/v1/?key=${apiKey}&steamid=${userId}&format=json&include_appinfo=1&include_played_free_games=1`,
)
const data = await res.json()