Add eBay Browse API integration with daily call quota

eBay marketplaces are now polled through eBay's official Buy > Browse API (client-credentials OAuth2) instead of an Apify scraper actor; Apify still handles Yahoo JP and Mercari. Browse API calls are tracked per day in a new ebay_api_usage table and capped (default 5000, configurable) on eBay's Pacific-time reset clock, so polling halts before the limit is hit. Credentials live in config.toml [ebay] and are overridable via /settings, which also surfaces the day's running call count.

Also carries the server.secure_cookies config plumbing (field, accessor, example) consumed by the following commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
prosolis
2026-05-14 12:10:39 -07:00
parent cfa01bd4ef
commit 1ae2c50b9a
12 changed files with 1092 additions and 262 deletions

View File

@@ -1,6 +1,11 @@
[server]
port = 8080
db_path = "./veola.db"
# Sets the Secure attribute on the session cookie. Leave true for any
# HTTPS-reachable deployment, including behind a TLS-terminating proxy such as
# Traefik. Defaults to true if omitted; set false only for local plain-HTTP
# development on a non-localhost address.
secure_cookies = true
[security]
# Both must be at least 32 bytes and different from each other.
@@ -31,6 +36,21 @@ yahoo_auctions_jp = "meron1122/zenmarket-scraper"
yahoo_auctions_jp_sold = "" # no known verified sold-listings actor for Yahoo JP
mercari_jp = "cloud9_ai/mercari-scraper"
# eBay's official Buy > Browse API. When client_id and client_secret are set,
# eBay marketplaces (ebay.com, ebay.co.uk, ...) are polled through this API
# instead of an Apify scraper actor; Apify still handles Yahoo JP and Mercari.
# client_id is the App ID and client_secret is the Cert ID from your eBay
# developer keyset. Both can also be set/overridden at runtime via /settings.
# environment is "production" (default) or "sandbox".
# daily_call_limit caps Browse API calls per day on eBay's own quota clock
# (midnight US Pacific); once hit, eBay polling halts until the next reset.
# 5000 is the standard Browse API allowance; set a negative value to disable.
[ebay]
client_id = ""
client_secret = ""
environment = "production"
daily_call_limit = 5000
[ntfy]
base_url = "https://ntfy.yourdomain.com"
default_topic = "veola"