@wral/hsot-data 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -6
- package/dist/define.mjs +1 -1
- package/dist/define.standalone.js +350 -321
- package/dist/{hsot-boxscore-BYV62gYv.js → hsot-boxscore-DiJN2Ik6.js} +303 -274
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,8 @@ exactly one of these elements.
|
|
|
17
17
|
|
|
18
18
|
Shared attributes on every component:
|
|
19
19
|
|
|
20
|
-
- `api` — base URL of api-hsot
|
|
20
|
+
- `api` — base URL of the api-hsot **public read surface** (tokenless):
|
|
21
|
+
`https://api.highschoolot.com/hsot/v1/public`.
|
|
21
22
|
Alternatively set the `.client` **property** to any object with the client
|
|
22
23
|
method surface (see `src/lib/client.mjs`) — the demo client, a test double,
|
|
23
24
|
or the future `@wral/sdk-hsot`. The property wins over the attribute.
|
|
@@ -61,19 +62,25 @@ npm run build # dist/index.mjs + dist/define.mjs (lit external)
|
|
|
61
62
|
The demo harness (`index.html`) runs the components against a seeded
|
|
62
63
|
in-memory client (`src/demo/demo-client.mjs`): a full football season with
|
|
63
64
|
live, overtime, forfeit and postponed games, nine weekly polls, and three
|
|
64
|
-
rosters. **Player names in the demo data are pseudonyms**
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
rosters. **Player names in the demo data are pseudonyms** and stay that way —
|
|
66
|
+
the minors'-names decision (approved 2026-08-19, roster-table fields only)
|
|
67
|
+
covers the live public surface, not this repo's fixtures. No live api-hsot
|
|
68
|
+
call is made by the harness.
|
|
67
69
|
|
|
68
70
|
## Consuming
|
|
69
71
|
|
|
70
72
|
From a page template (the data-page pattern):
|
|
71
73
|
|
|
72
74
|
```html
|
|
73
|
-
<script type="module" src="https://
|
|
74
|
-
<hsot-standings sport="football" api="https://api.highschoolot.com/v1"></hsot-standings>
|
|
75
|
+
<script type="module" src="https://web-components.cdn.highschoolot.com/hsot-data/latest/define.standalone.js"></script>
|
|
76
|
+
<hsot-standings sport="football" api="https://api.highschoolot.com/hsot/v1/public"></hsot-standings>
|
|
75
77
|
```
|
|
76
78
|
|
|
79
|
+
The CDN serves every tagged release at `/hsot-data/vX.Y.Z/` (immutable, 1-year
|
|
80
|
+
TTL) plus rolling aliases `/hsot-data/vX/`, `/hsot-data/vX.Y/` and
|
|
81
|
+
`/hsot-data/latest/` (5-minute TTL). Production pages should pin the major
|
|
82
|
+
alias (`/hsot-data/v0/`) rather than `latest`.
|
|
83
|
+
|
|
77
84
|
From an app:
|
|
78
85
|
|
|
79
86
|
```js
|
package/dist/define.mjs
CHANGED