api.newsroom.sgit.ai v0.2.14

Home / Reference

Reference

Everything here is read from a record: the map of what a reader runs (map/before/<release>/map.json), the release manifests, tools/served.json. A number on these pages is not typed; a contract changes only with a release.

Pages

The element, in brief

<sg-meter view="…"> is one custom element with twelve views; the page's charge is view="page" with a kind (article_new is derived from date and newDays, the rest are article, issue, note, collection, page, free), date, topics, title, and quiet for a page that charges nothing. The config is a JSON block with id sg-meter-config; every key has a default. The views, the attributes and a full config are on the developer quick start.

Events

The meter emits DOM events on document that a page or another component can listen to: sg:meter.changed, sg:meter.charged, sg:meter.rated, sg:meter.declined, sg:meter.toppedup, sg:meter.reset, sg:meter.restored, sg:meter.persona, sg:meter.shared; and sg-meter:error when the element fails, with why.

Versions

The meter's own line is v1.4.0, served at assets/components/sg-meter/v1/v1.4/v1.4.0/; v1.0.0 to v1.3.1 are frozen and still served, so a page that pinned one keeps working. The API's releases (v0.2.5 today) wrap all of it under a versioned prefix. Releases.