✨ Add watcher for free games in the Epic Games store
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 11 Apr 2024 09:46:03 +0000 (11:46 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 11 Apr 2024 09:46:03 +0000 (11:46 +0200)
src/main/kotlin/net/pterodactylus/rhynodge/watchers/EpicGamesWatcher.kt [new file with mode: 0644]

diff --git a/src/main/kotlin/net/pterodactylus/rhynodge/watchers/EpicGamesWatcher.kt b/src/main/kotlin/net/pterodactylus/rhynodge/watchers/EpicGamesWatcher.kt
new file mode 100644 (file)
index 0000000..e6ed542
--- /dev/null
@@ -0,0 +1,12 @@
+package net.pterodactylus.rhynodge.watchers
+
+import net.pterodactylus.rhynodge.filters.JsonFilter
+import net.pterodactylus.rhynodge.filters.webpages.epicgames.EpicGamesFilter
+import net.pterodactylus.rhynodge.filters.webpages.epicgames.EpicGamesMerger
+import net.pterodactylus.rhynodge.queries.HttpQuery
+
+class EpicGamesWatcher : DefaultWatcher(query, filters, merger)
+
+private val query = HttpQuery("https://store-site-backend-static-ipv4.ak.epicgames.com/freeGamesPromotions?locale=en-US&country=DE&allowCountries=DE")
+private val filters = listOf(JsonFilter(), EpicGamesFilter())
+private val merger = EpicGamesMerger()