Add alerts, currency conversion and notifications.
Items fire when a page is available from an accepted seller at or below max_price, converted with the ECB's daily rates when the page uses another currency. A per-item cooldown, kept in the state file, holds back repeat alerts unless the price drops. Alerts go to Discord, ntfy and JSON webhooks with retries, and to the desktop; 'dibs notify test' sends a sample.
This commit is contained in:
1 parent
2175c0e5aa
commit
8f0eda5d4d
16 files changed
+1409
-15
No files matched your search
@@ -18,6 +18,10 @@ import (
|
||||
// scheduler enforces it too, whatever the config says.
|
||||
const MinInterval = ratelimit.URLFloor
|
||||
|
||||
// MaxCooldown is the longest allowed cooldown. The state file forgets alerts
|
||||
// after it.
|
||||
const MaxCooldown = 7 * 24 * time.Hour
|
||||
|
||||
const (
|
||||
// The seller policies accept offers sold by the shop itself, offers it
|
||||
// sells or only ships (such as Fulfilled by Amazon), or any offer.
|
||||
|
||||
Reference in new issue
Block a user