MMOframework
Pourquoi l'IA Playground Bibliothèques Développeurs Agence
FR EN
Créer un projet en direct
Index

mmo-api-history

1 symbole · générée le 30 Nov 2026

element

mmo-api-history

mmo-api-history.jhs:1

The History tab of the API console (mmo-api-console): the last calls of this browser and the calls saved, each opened again in Operations (filled in, not sent). What is kept is what makes the call -- its operation, its values, the data api's query, and for a call saved by hand its body --, never a token nor an answer: an API's answers hold personal data. The last calls are kept in localStorage, apart for each site and each account. The saved calls are the site's when it keeps them (mmo.oauth's user/api-calls.json, MMO.config.user.accounts.apiCalls): « Mine » on any of the account's devices, « Shared » those every account sees -- changed by their owner, deleted by their owner or an administrator; the browser's otherwise. They are exported and imported as a JSON file.

<mmo-api-history></mmo-api-history>
Étend
CustomShadowElement
Asking to open one dispatches `replay` (`detail`: the call).

Index

LIMIT static readonly accessorthe most calls the history keeps
storage accessor
h(tag, attrs, children)
t(text, vars)
key(what)
read(what)
write(what, list)Keep $list under $what (nothing when the browser refuses: a private window)
record(entry)Remember a call made, the most recent first, LIMIT at most.
accounts()
call(url, method, body) asyncA call of the saved calls' routes, as the page's session -- never the console's identity: they are its account's
callUrl(id)
save(snapshot, name, shared) asyncSave a call by hand, its body with it: the site's when it keeps them, shared or not; the browser's otherwise.
ask(snapshot, suggested) asyncAsk a name, and whether to share it when the site keeps the saved calls, then save $snapshot
load() asyncDraw the tab.
list(items, what)
describe(item)
export()Download the saved calls -- mine, the site's or the browser's --, a JSON file: what makes each call only
import(file) asyncAdd the calls of a file exported (export): each with a method and a path, the rest as it is -- to mine, the site's (not shared) or the browser's.

Propriétés2

Méthodes16

h(tag, attrs, children)

mmo-api-history.jhs:21
h(tag, attrs = null, ...children)
tag
attrs = null
...children
retourneElementMMO.core.dom.createElement: a string child is a text node

t(text, vars)

mmo-api-history.jhs:26
t(text, vars = {})
text
vars = {}
retournestring$text translated, its {name} replaced by $vars'

key(what)

mmo-api-history.jhs:42
key(what)
what
retournestringthe key of $what in localStorage: this site's, this account's

read(what)

mmo-api-history.jhs:47
read(what)
what
retourneArray<Object>what is kept under $what (history, saved), [] when the browser keeps nothing

write(what, list)

mmo-api-history.jhs:56

Keep $list under $what (nothing when the browser refuses: a private window)

write(what, list)
what
list

record(entry)

mmo-api-history.jhs:65

Remember a call made, the most recent first, LIMIT at most.

record(entry)
entryObjectwhat mmo-api-operation's snapshot() gives, with status, duration, as (who, in words)

accounts()

mmo-api-history.jhs:73
accounts()
retourneObjectmmo.oauth's routes of the accounts (MMO.config.user.accounts): apiCalls, the session's token

call(url, method, body)

asyncmmo-api-history.jhs:81

A call of the saved calls' routes, as the page's session -- never the console's identity: they are its account's

async call(url, method = 'GET', body = null)
url
method = 'GET'
body = null
retournePromise<{ok: boolean, data: *, reason: string>}

callUrl(id)

mmo-api-history.jhs:93
callUrl(id)
id
retournestringthe route of saved call $id (user/api-calls/{id}.json)

save(snapshot, name, shared)

asyncmmo-api-history.jhs:104

Save a call by hand, its body with it: the site's when it keeps them, shared or not; the browser's otherwise.

async save(snapshot, name, shared = false)
snapshotObject
namestring
shared = falsebooleanseen by every account
retournePromise<void>

ask(snapshot, suggested)

asyncmmo-api-history.jhs:122

Ask a name, and whether to share it when the site keeps the saved calls, then save $snapshot

async ask(snapshot, suggested)
snapshot
suggested
retournePromise<void>

list(items, what)

mmo-api-history.jhs:171
list(items, what)
items
what
retourneElementthe calls of $what (history, saved the browser's, mine and shared the site's), each to open again; to save (the history's), to share or not (mine), to remove (the browser's, mine, a shared one for an administrator)

export()

mmo-api-history.jhs:211

Download the saved calls -- mine, the site's or the browser's --, a JSON file: what makes each call only

export()

import(file)

asyncmmo-api-history.jhs:227

Add the calls of a file exported (export): each with a method and a path, the rest as it is -- to mine, the site's (not shared) or the browser's.

async import(file)
file?File
retournePromise<void>