feat: whole shops listed on IMVU, and GET /imports/available (#16)
Co-authored-by: dhkatz <[email protected]>
This commit was merged in pull request #16.
This commit is contained in:
1 parent
8f6dacba10
commit
efc7d6b808
15 files changed
+4954
-20
No files matched your search
+27
-6
@@ -110,7 +110,7 @@ import_job(id, catalog, grant, imvu_product, kind ("import" | "recheck"), status
|
||||
```
|
||||
|
||||
- **Queued by the hub**: a request covered by a grant, a product added to a grant, a "shop" grant accepted (the
|
||||
products people requested so far, and all the shop's products if a way to list them is found), and a daily
|
||||
products people requested so far, and the shop's products as IMVU lists them: "Whole shops" below), and a daily
|
||||
**recheck** of each imported product.
|
||||
- **The hub checks IMVU's public API** before queuing and at each recheck (rate-limited, as for parents): the
|
||||
product exists, its creator is the grant's account, its rating. Gone from IMVU: withdrawn. Rating changed to AP:
|
||||
@@ -121,6 +121,21 @@ import_job(id, catalog, grant, imvu_product, kind ("import" | "recheck"), status
|
||||
console. The catalog's team can retry or re-import one product, and pause the importer (`import:pause`): the hub
|
||||
hands out no jobs while paused.
|
||||
|
||||
## Whole shops
|
||||
|
||||
IMVU lists a shop's products to the signed out (`api.imvu.com/product?creator=<username>`, general-rated only: no
|
||||
Access Pass products). The hub lists a "shop" grant's shop when the grant is accepted (or becomes a whole shop), then
|
||||
daily (a few shops an hour, oldest listing first), and when the catalog's team (`import:run`) or the creator asks
|
||||
("List the shop again", at most 3 times an hour). Each listing looks the IMVU account up by ID first (listing goes
|
||||
by its current username), keeps every listed product's info (`imvu_product_info`, as a lookup would; so their
|
||||
rechecks need no lookup for a day), records when and how many (`import_grant.shop_listed_at`, `shop_listed`), and
|
||||
queues imports for the creator's known products not imported in that catalog yet, less exclusions. A product that
|
||||
disappears from the listing isn't withdrawn for it: it may have become Access Pass; rechecks decide.
|
||||
|
||||
IMVU's paging is unreliable: in pages of 100 (or its default 50) pages overlap and products are missed (2026-11-07:
|
||||
580 different products of 639), but one page of up to 1000 returns them all. So the hub asks for pages of 1000,
|
||||
follows `next` (on IMVU's API only), drops repeats, and stops at 10 pages.
|
||||
|
||||
## Withdrawal
|
||||
|
||||
A withdrawn imported product (grant withdrawn or narrowed, gone from IMVU, account link moved) is removed as
|
||||
@@ -182,6 +197,8 @@ passwords never reach the hub readable, and are kept only by the importer.
|
||||
| `PATCH /api/v1/imports/grants/:id` | (its creator; for an unclaimed creator, `import:grant-on-behalf`) `{products?, exclude?, listed?}` → `{grant, withdrawn}`: products no longer covered are withdrawn; newly covered ones people asked for are queued |
|
||||
| `POST /api/v1/imports/grants/:id/accept`, `.../decline` | (`import:accept` at the catalog) `{reason?}` → `{grant, queued}`. The creator is notified. |
|
||||
| `DELETE /api/v1/imports/grants/:id` | (its creator, or `import:withdraw` at the catalog) `{reason?}` → `{grant, withdrawn}` |
|
||||
| `POST /api/v1/imports/grants/:id/list` | (its creator, or `import:run` at the catalog) → `{grant, listed, queued}`: an active whole-shop grant's shop listed on IMVU now. 409 `not_shop`; 429 after 3 an hour. |
|
||||
| `GET /api/v1/imports/available?products=&creators=` | (anyone) up to 100 IMVU product IDs and 100 IMVU account IDs, comma-separated → `{products: [{imvuProduct, status, product, requested?}], shops: [{imvuCreator, shop, products}]}`. `status`: `imported` (`product` is the hub product), `adult` (imported, but the person can't see adult products), `queued`, `covered` (a grant covers it: asking queues it) or `none` (asking counts it). `requested` (signed in): they asked for it. `shop`: an active whole-shop grant; `products`: how many of the shop's are on T5DE. From what the hub knows only (it asks IMVU nothing), for the proxy's "Get on T5DE". |
|
||||
| `POST /api/v1/imports/requests` | `{imvuProduct}` or `{imvuCreator}` → `{status: "added" \| "queued" \| "suggested" \| "counted", product?}` (`added`: imported already, now in their library). At most 50 a day. |
|
||||
| `GET /api/v1/imports/requests?imvuCreator=` | `{requests: [{imvuProduct (0: the whole shop), name, requests}]}` for a linked account of theirs (moderators: any); without `imvuCreator`, moderators get `{creators}`: the most asked-for IMVU creators |
|
||||
| `GET /api/v1/catalogs/:id/importer` | (`import:accept` or `import:pause`) `{importer, grants, jobs, counts, permissions}`; `?status=` filters jobs |
|
||||
@@ -201,6 +218,8 @@ passwords never reach the hub readable, and are kept only by the importer.
|
||||
| `DELETE /api/v1/catalogs/:id/importer/accounts/:account` | (`import:run`) |
|
||||
| `POST /api/v1/catalogs/:id/importer/settings` | (`import:run`) `{rate (0.2-10 requests a second to IMVU), concurrency (1-8 jobs at once)}` |
|
||||
|
||||
Grants also carry `shopListedAt` (null: not listed yet) and `shopListed` (how many products IMVU listed).
|
||||
|
||||
`GET /api/v1/catalogs/:id/importer` also has `program: {version, seenAt, fingerprint, publicKey}` (`publicKey` only
|
||||
with `import:run`), `settings`, and `accounts: [{id, imvuId, username, state, stateMessage, stateAt, accessPass,
|
||||
ageVerified}]` (state: `waiting` for the importer, `received`, `ok`, `sign_in_failed`, `needs_password`). Never a
|
||||
@@ -228,11 +247,13 @@ deleted ones and IDs that never existed (404 only for a few very old IDs), so th
|
||||
says "Not Found". For AP products, the importer's IMVU account (with Access Pass) reports the product info to the
|
||||
hub ("IMVU accounts" above). Also signed out: `client-dynamic.imvu.com/api/shop/product.php` and
|
||||
`api.imvu.com/creator/creator-<id>` need an account, and search refuses AP (`ap_search_denied`, with
|
||||
`product_rating` other than `0,5`), but `api.imvu.com/product?creator=<username>` lists a shop's other products
|
||||
(100 a page, `next` relation), which whole-shop grants use.
|
||||
`product_rating` other than `0,5`), but `api.imvu.com/product?creator=<username>` lists a shop's general-rated
|
||||
products ("Whole shops").
|
||||
|
||||
Still to do: `GET /imports/available` for the proxy's shop button; listing whole-shop grants' products
|
||||
(`api.imvu.com/product?creator=`); t5de-catalog accepting `t5de-import` tokens on uploads; the spike and `t5de-importer`.
|
||||
Built (2026-11-07): whole shops listed on IMVU ("Whole shops" above), and `GET /imports/available`.
|
||||
|
||||
t5de-catalog takes `t5de-import` tokens on uploads (its PR #2). Still to do: the spike and `t5de-importer` (and
|
||||
its report of Access Pass products' info).
|
||||
|
||||
## Spike (before building the importer)
|
||||
|
||||
@@ -240,7 +261,7 @@ Still to do: `GET /imports/available` for the proxy's shop button; listing whole
|
||||
client wear it as a T5 product, with the parent loading from IMVU? (Never committed: it's IMVU's files.)
|
||||
2. Do typical IMVU products fit the `pack` limits?
|
||||
3. How many HEAD requests does probing take for real shops; does the CDN limit them?
|
||||
4. Is there a public way to list a creator's products (for importing a whole shop at once)?
|
||||
4. ~~Is there a public way to list a creator's products?~~ Yes, general-rated ones ("Whole shops").
|
||||
|
||||
## Later
|
||||
|
||||
|
||||
Reference in new issue
Block a user