Class: listWidget

violetList~listWidget()

new listWidget()

Core object returned by the plugin
Source:

Methods

(static) getItemFromResults(response, itemNo) → {Object}

Will get an item from the result set, giving an error to the user if the requested item is not in the array.
Parameters:
Name Type Description
response response so that the widget can prompt the user
itemNo number index of the item to be retrieved
Source:
Returns:
object that is desired or undefined if itemNo is invalid
Type
Object

(static) getItemText(ndx, results) → {string}

Returns the text to speak to describe the target itemTextProp. This method is called by the widget and can be redefined to customize the the interaction with the user.
Parameters:
Name Type Description
ndx number what is the item number being spoken
results Array.<Object> array of items being spoken
Source:
Returns:
by default `${humanName} ${ndx+1} is ${results[ndx][itemTextProp]}. `
Type
string

(static) interactionGoal()

Returns the goal that will be called when the user can interact with an item. This method should be called to define a goal in the parent script.
Source:

(static) respondWithItems(response, results)

When this method is called it launches the widget. It lists the first 3 items and asks the user it he wants to hear more items or if he wants to interact with an item.
Parameters:
Name Type Description
response response so that the widget can prompt the user
results Array.<Object> array of items that need to be spoken
Source:

(static) respondWithMoreItems(response, results, start)

Used by the widget to list the next 7 items till the 17th item.
Parameters:
Name Type Description
response response so that the widget can prompt the user
results Array.<Object> array of items that need to be spoken
start Array.<Object> array of items that need to be spoken
Source:
Documentation generated by JSDoc 3.5.5 on Mon Jul 23 2018 23:46:45 GMT-0400 (EDT)