Diagnostic/metadata information for Items API.
Methods
diagnostics() → {object}
Returns an object of diagnostic information about the current session.
Since
- 0.1.0
Example
// Sample returned object
{
"apps": {
"annotations": {
"app": {},
"config": true,
"enabled": true
},
"assess": {
"app": {}
},
"events": {
"app": null,
"enabled": false
},
"items": {
"app": {},
"metadata": {
"items_api_version": "v1.118.3"
}
},
"questions": {
"app": {}
}
},
"activity": {
"activity": "items-api-demo",
"autoSave": {
"config": {
"save_interval_duration": 300
},
"enabled": true
},
"itemBank": 6,
"session": "f85afe9c-342e-4363-8d70-ad3c665566c0",
"state": "initial",
"type": "submit_practice",
"user": "labs-site"
},
"versions": {
"requested": "v2023.2.LTS",
"mapped": "v2.197",
"concrete": "v2.197.5",
"server": "v2023.2.LTS",
"assets": "v2.197.5"
}
}
Returns
- Type
- (object)
filterEvent(event)
Which event(s) you want to listen for on the console.
You must call listen()
first to start broadcasting.
Pass any of the following:
- exact event (https://reference.learnosity.com/items-api/events) or;
'*'
for all events or;- left or right wildcards via
*
Since
- 0.1.0
Example
LT.listen();
LT.filterEvent('item*');
Parameters:
Name | Type | Description |
---|---|---|
event |
string |
listen(statusopt)
Enables or disabled any console logging of events.
Defaults to true
, turn off by passing a falsy.
Since
- 0.1.0
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
status |
boolean |
<optional> |