vogler / free-games-claimer

Automatically claims free games on the Epic Games Store, Amazon Prime Gaming and GOG.
GNU Affero General Public License v3.0
2.21k stars 139 forks source link

Add monitoring mode #218

Open baterflyrity opened 10 months ago

baterflyrity commented 10 months ago

Hi! Great tool.

I have an idea: add monitoring mode when the tool just notifies about available claims without actual authentication & proceeds.

vogler commented 9 months ago

Certainly doable, but what's the use case? Then you don't know if it's already claimed or if it's even available for the region of your account.

I could move the login code below the listing of games, but then it would have to do it twice since it may change. Also, I think the additional output instead of failing fast would be confusing.

There's online tools like https://visualping.io for change detection. Here's a jq one-liner to get the current free games for epic-games as JSON:

$ curl -s https://store-site-backend-static.ak.epicgames.com/freeGamesPromotions | jq '.data.Catalog.searchStore.elements | map(select(.promotions.promotionalOffers[0].promotionalOffers[0].discountSetting.discountPercentage == 0)) | map({title, url: ("https://store.epicgames.com/p/" + .offerMappings[0].pageSlug)})'
[
  {
    "title": "Out of Line",
    "url": "https://store.epicgames.com/p/out-of-line-209cbb"
  },
  {
    "title": "The Forest Quartet",
    "url": "https://store.epicgames.com/p/forest-quartet-5d03e3"
  }
]
baterflyrity commented 9 months ago

Thanks. Thats jq snippet is very helpful.