SPB Git forge

spb/rareindex

Public
54commits 1branches 0releases
7.1 MBsize
maindefault branch
10 days agolast push
TypeScript 61.9% HTML 37.2% SQL 0.7%
2.5 KB · 36 lines markdown
Rendered Raw Blame History
1# Capsule Toronto connector (`capsule-toronto`)23- Source: https://www.capsuletoronto.com · dealer · CA · CAD · Shopify storefront4- Acquisition: public `/collections/<handle>/products.json?limit=250&page=N` (shared `ShopifyStoreConnector` adapter wrapped by `MarketPinnedShopifyConnector`, which adds a `localization=CA` cookie so Shopify Markets never geo-converts prices; no store-specific code)5- Records: `listing` (asking prices, one per variant; out-of-stock variants → `ended`)6- Refresh: every 12 h (ACTIVE→NORMAL boundary, large catalogue) · history: none (listings only)78Toronto sneaker/streetwear boutique (Nike, Jordan, New Balance, adidas, ASICS, Converse). Shopify storefront; titles end with the manufacturer style code (e.g. IX3529-010).910## Collections → taxonomy11| collection handle | category | brand / franchise / series |12|---|---|---|13| `footwear` | `sneakers` | — |14| `womens-footwear` | `sneakers` | — |15| `jordan` | `nike_jordan` | Jordan |16| `nike` | `nike_jordan` | Nike |17| `new-balance` | `new_balance_asics_other` | New Balance |18| `asics` | `new_balance_asics_other` | ASICS |19| `converse` | `new_balance_asics_other` | Converse |2021Rules (first match wins, applied to "title | product_type | tags | collection"):22- `\b(air )?jordan\b|\bnike\b` → `nike_jordan`23- `\badidas\b|\byeezy\b` → `adidas_yeezy`24- `new balance|\basics\b|\bsalomon\b|\bhoka\b|\bpuma\b|\breebok\b|\bsaucony\b|\bconverse\b|\bvans\b|\bon running\b|\bmizuno\b` → `new_balance_asics_other`2526Excluded (regex): `gift card|^[^|]*\|(?![^|]*Footwear \|)[^|]*\||birkenstock|\bsandals?\b|\bslides?\b|\bclogs?\b|\bmules?\b|\bloafers?\b|\bboots?\b|\bugg\b|\bcrocs\b|\bsocks?\b|\blaces\b|insoles?|cleaner|shoe trees?`2728Title pattern: `^(?<name>.+?) (?<number>[A-Z]{1,3}\d{3,6}-\d{3}|\d{6}-\d{3}|[A-Z]{1,2}\d{3,4}[A-Z]{0,3}\d{0,3})$` (name / set / number)2930## Access & compliance31See `accessNotes` in meta.json: robots.txt verified 2026-09-08 (standard Shopify rules, products.json paths allowed), honest UA, 1 req / 1.5 s, listings only, no personal data. Not fetched: apparel (t-shirts, sweaters, outerwear, bottoms), headwear, accessories, bags — the exclude regex also drops anything whose product_type is not Footwear.3233## Fixtures & tests34`data/fixtures/capsule-toronto/` — live captures (`pnpm tsx connectors/api/_g3-shops-na-lib/capture.ts capsule-toronto`), trimmed single-product payloads incl. a sold-out variant.35`pnpm vitest run connectors/api/capsule-toronto` · live probe: `pnpm tsx connectors/api/_g3-shops-na-lib/probe.ts capsule-toronto`.36