Items API Methods
This article details methods the host page can use to interact with Items API.
LearnosityItems
The following methods are accessed via the window.LearnosityItems
object.
When the Items API script has loaded, the LearnosityItems
object is instantiated, and ready for use.
itemsApp
The following methods are accessed via the itemsApp
object returned by window.LearnosityItems.init()
. This object provides methods to interact with, and receive information from the particular instance of Items API.
Most of these methods are not available until the readyListener
callback has been executed, unless otherwise noted. See Initialization & Callbacks for more information.
- addItems()
- assessApp()
- attemptedItems()
- attemptedQuestions()
- dialogs()
- eventsApp()
- feature()
- features()
- getActivity()
- getCurrentItem()
- getFeatures()
- getItemScores()
- getItems()
- getItemsMetadata()
- getMetadata()
- getQuestions()
- getResponses()
- getScores()
- getTags()
- getTime()
- item()
- items()
- off()
- on()
- once()
- question()
- questions()
- questionsApp()
- reset()
- safeToUnload()
- save()
- submit()
- unsaveableQuestions()
- validItems()
- validateQuestions()
item
The following methods are accessed via the item
object returned by the items()
or item("item_reference")
public methods. This object provides methods to push events specifically related to an Item, for later reporting purposes. It also provides methods for interacting with dynamic content and "Try Again" functionality.