Jelajahi Sumber

AGENTS/README: add free-games-notifier as second reference (steam sources, upcoming offers, state-diff pattern)

Paul Klumpp 3 hari lalu
induk
melakukan
6fe3cd7732
2 mengubah file dengan 38 tambahan dan 0 penghapusan
  1. 29 0
      AGENTS.md
  2. 9 0
      README.md

+ 29 - 0
AGENTS.md

@@ -31,6 +31,35 @@ info:
   actual *claiming* of the games (like in the reference project) is deliberate
   **not** part of this project.
 
+
+## Second reference project
+
+**free-games-notifier** — https://github.com/jaixmario/free-games-notifier
+(Python, GitHub-Actions cron every 6 h; notifications via e-mail, Telegram,
+Discord, WhatsApp; state in `free.json`/`free-steam.json`).
+
+How it gets the info:
+
+- **Epic** (`epic.py`): same public endpoint
+  `store-site-backend-static.ak.epicgames.com/freeGamesPromotions?locale=en-US`
+  (HTTP GET, no login) — confirms our Go approach. Filter:
+  `discountSetting.discountPercentage == 0`; distinguishes **current**
+  (`promotionalOffers`) and **upcoming** (`upcomingPromotionalOffers` — preview
+  window for future free games). Change detection via signature
+  (`CURRENT:t1,t2|UPCOMING:...`) + detail comparison per (title, link) keys;
+  only notify on **new** offers, removals are silently written to state.
+- **Steam** (`steam.py`), two sources:
+  1. **Free to Keep:** HTML scrape of
+     `https://store.steampowered.com/search/?maxprice=free&specials=1`
+     (BeautifulSoup; `.search_result_row`, price "Free"/100 %).
+  2. **Free Weekend:** JSON API
+     `https://store.steampowered.com/api/featuredcategories/` — items with
+     "Free Weekend"/"play for free" in `name`/`body`; title fallback via
+     `store.steampowered.com/api/appdetails?appids=<id>`.
+- Useful patterns for us: **state signature + diff** (notify only on
+  real additions, removals silently into state) and **current vs. upcoming**
+  separation. Both could be adopted.
+
 ## Toolchain & linting
 
 - Go ≥ 1.27 (`go version`).

+ 9 - 0
README.md

@@ -64,6 +64,15 @@ so they can be used e.g. by Hermes or other MCP clients. Planned:
   wraps it.
 - **Not implemented yet** — deliberately a second step after the CLI stabilizes.
 
+### More platforms (idea, from free-games-notifier)
+
+- **Epic "upcoming"**: The Epic endpoint also returns
+  `upcomingPromotionalOffers` — a preview of future free promotions (see
+  `AGENTS.md`). Could be added as `cheapo list --upcoming`.
+- **Steam**: Free-to-keep via HTML scrape of
+  `store.steampowered.com/search/?maxprice=free&specials=1`, free weekend via
+  `store.steampowered.com/api/featuredcategories/` (details: `AGENTS.md`).
+
 ## Architecture
 
 ```