Documentations › mmo.client › js › modules mmo-api-entities 1 symbol · generated 30 Nov 2026
The entities of an API (the Entities tab of mmo-api-console): the collections of its data api, and for one its fields -- type, list of values, reference to another entity (opened in place for an embedded one), required, read-only, description --, the operations that read and write it, and an example from the data the account sees.
<mmo-api-entities schemas diagram></mmo-api-entities> Extends CustomShadowElement The diagram of the data model (`diagram`, an SVG) shows above the list, when the page gives one.
The console gives it its OpenAPI document: `load`. Asking to open an operation dispatches `operation`
(`detail: {method, path, values}`). Index schemas the JSON schemas of the entities (mmo.core's data/schemas.json) diagram an SVG of the data model, shown first (optional) init() h(tag, attrs, children) t(text, vars) short(name) load(document) async Show the entities of a document. drawList() Draw the list of the collections, as the search keeps them. drawHome() The tab before a collection is chosen: the diagram, if any. classOf(collection) async open(collection) async Show a collection: its fields, its operations, an example. operations(collection) fields(schema, depth) type(property, depth) values(values, name)
Attributes2 the JSON schemas of the entities (mmo.core's data/schemas.json)
schemas
an SVG of the data model, shown first (optional)
diagram
Methods13 init() h(tag, attrs = null, ...children) tag attrs = null ...children returns ElementMMO.core.dom.createElement: a string child is a text node
t(text, vars = {}) text vars = {} returns string$text translated, its {name} replaced by $vars'
short(name) name returns stringa class without its namespace
Show the entities of a document.
async load(document) document Objectthe OpenAPI document (its data api's collection parameter lists the collections) returns Promise<void>
Draw the list of the collections, as the search keeps them.
drawList() The tab before a collection is chosen: the diagram, if any.
drawHome() async classOf(collection) collection stringreturns Promise<?string>the class of its entities (the list answers it in meta.data.class)
Show a collection: its fields, its operations, an example.
async open(collection) collection stringreturns Promise<void>
operations(collection) collection returns Elementthe operations of the data api on $collection, each opened in the Operations tab
fields(schema, depth = 0) schema Objectan entity's JSON schema depth = 0 numberhow deep an embedded entity is shown in place returns Elementits fields, as a table: in their order, the hidden left out
type(property, depth) property Objecta field's schema depth numberreturns Nodeits type in words: a list of values shown, a reference linked (an embedded entity opened in place)
values(values, name = null) values name = null returns Elementa list of values: the first ones, the rest folded