cleanup, eslint
This commit is contained in:
parent
ba5e51f529
commit
17771640f1
1 changed files with 14 additions and 18 deletions
|
|
@ -1,13 +1,9 @@
|
|||
// following https://github.com/vogler/free-games-claimer/issues/474
|
||||
|
||||
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`, {
|
||||
"method": "GET",
|
||||
});
|
||||
const j = await r.json();
|
||||
// console.log(j);
|
||||
return j;
|
||||
}
|
||||
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`);
|
||||
return await r.json();
|
||||
};
|
||||
|
||||
// $ jq '.data[].topicId' -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue