feat(site): show plugin install counts on marketplace cards

This commit is contained in:
t8y2 committed 2026-09-21 00:51:32 +08:00
1 parent 5a74925d07
commit ab77a0e76c
5 files changed
+86 -5

No files matched your search

+7 -2
View File
@@ -18,6 +18,10 @@ directory; OAuth login required).
optional and absent on legacy app versions). Decorative statistics only: no
auth, no PII — `clientId` is a purely random per-installation id the app
generates locally, not a hardware or user fingerprint.
- `dbxio.com/api/plugins/stats` — `GET` public display counters for the
website: `{"installs": {"<plugin id>": <n>}}` read from the archive
summary's `inst` section only (dl/updt and unique counts stay internal).
Cached for 5 minutes.
## Storage — Workers Analytics Engine
@@ -65,8 +69,9 @@ curl -s -X POST https://dbxio.com/api/plugins/archive -H "x-archive-token: <toke
## Reading counters
No HTTP stats endpoint (there is no consumer yet; add one when the marketplace
UI ships). Query via the SQL REST API with an API token that has
The website reads the display number via `GET dbxio.com/api/plugins/stats`
(installs per plugin, served from the archive summary). For anything richer,
query the SQL REST API directly with an API token that has
Account → Analytics → Read:
```sh