cleanup, eslint

This commit is contained in:
Ralf Vogler 2025-06-05 18:17:18 +02:00
parent ba5e51f529
commit 17771640f1

View file

@ -1,13 +1,9 @@
// following https://github.com/vogler/free-games-claimer/issues/474 // following https://github.com/vogler/free-games-claimer/issues/474
const get = async (platform = 'android') => { // or ios const get = async (platform = 'android') => { // or ios
const r = await fetch(`https://egs-platform-service.store.epicgames.com/api/v2/public/discover/home?count=10&country=DE&locale=en&platform=${platform}&start=0&store=EGS`, { const r = await fetch(`https://egs-platform-service.store.epicgames.com/api/v2/public/discover/home?count=10&country=DE&locale=en&platform=${platform}&start=0&store=EGS`);
"method": "GET", return await r.json();
}); };
const j = await r.json();
// console.log(j);
return j;
}
// $ jq '.data[].topicId' -r // $ jq '.data[].topicId' -r
// $ jq '.data[] | {topicId,type} | flatten | @tsv' -r // $ jq '.data[] | {topicId,type} | flatten | @tsv' -r
@ -50,6 +46,6 @@ export const getPlatformGames = async platform => {
}); });
}; };
export const getGames = async () => [...await getPlatformGames('android'), ...await getPlatformGames('ios')] export const getGames = async () => [...await getPlatformGames('android'), ...await getPlatformGames('ios')];
// console.log(await getGames()); // console.log(await getGames());