Docs: BGG auth policy in spec/README, upload-flow recon notes
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,10 @@ put it in config.toml, code, or logs. Requests must go to
|
||||
Exception: downloading your own collection while logged in on the website
|
||||
needs no registration — relevant to the Playwright stages, not the API
|
||||
client. Usage is monitored per-application at `/applications` → "Usage".
|
||||
Open-source note: each user of this tool registers their OWN application
|
||||
and supplies their own token — never ship or share a token in the repo.
|
||||
Future frontend note: public-facing apps must display the "Powered by
|
||||
BGG" logo linking back to boardgamegeek.com.
|
||||
|
||||
## Endpoints (XML API2 — the only sanctioned read API)
|
||||
|
||||
@@ -55,11 +59,11 @@ The first `/collection` call typically returns **HTTP 202** with a "please retry
|
||||
## Website automation (upload stage)
|
||||
|
||||
- Login with `BGG_USERNAME` / `BGG_PASSWORD` env vars; persist Playwright storage state locally (gitignored) so repeat runs skip login. Never write credentials to disk, logs, or error messages.
|
||||
- Per game: navigate to the game page → "Add to Collection" flow → status **Owned** → if a version_id is known, set it in the collection item's version picker → save. Never guess a version — omit it when unknown. The version picker is the most fragile part of the UI: walk it manually once and document the selectors before automating.
|
||||
- Per game: navigate to the game page → "Add to Collection" flow → status **Owned** → if a version_id is known, set it in the collection item's version picker → save. Never guess a version — omit it when unknown. The flow has been walked and documented: see `docs/bgg-upload-flow.md` for the dialog structure, version-picker behavior (paginated, no search — match by canonical version NAME from the XML API), and observed automation gotchas (stale elements, hidden-not-removed dialogs, hydration races).
|
||||
- A second copy of an owned game must be a NEW collection entry (new collid), not an edit of the existing item.
|
||||
- Expect UI fragility: wrap each game in its own try/except, log the failure to `upload_log.csv`, and continue. `--retry-failed` re-attempts failures; `--dry-run` logs without touching the site.
|
||||
- Idempotency: skip IDs already logged `added`; `--verify` re-fetches the collection to confirm.
|
||||
|
||||
## Policy note
|
||||
|
||||
BGG changed API access policies in 2025 and broke older community tools. Do not use undocumented endpoints, scraped JSON blobs, or third-party mirrors — only XML API2 and the public website.
|
||||
BGG's 2025 policy (version 2025-07-02, boardgamegeek.com/using_the_xml_api) locked the API behind registered applications and Bearer tokens, breaking older community tools. Do not use undocumented endpoints, scraped JSON blobs, or third-party mirrors — only the authenticated XML API2 and the public website. Third-party services that proxy BGG data to other applications are explicitly prohibited. The policy asks for server-side requests, aggressive caching, and minimal request counts — the cache-first client design is mandatory, not optional. Policies can change at any time; changes are announced in BGG's Geek Tools News forum.
|
||||
|
||||
Reference in New Issue
Block a user