Interface: ResponseManager

ResponseManager

Interface for classes that can manage responses
Source:

Methods

ask(msg, reprompt) → {String}

Helper method to do an ask similar to the alexa api
Parameters:
Name Type Description
msg String The message to ask to the user
reprompt String THe reprompt message
Source:
Returns:
The rendered string to send back to Alexa
Type
String

get(responseId) → {Response}

Returns the specified response by looking through the defined providers. Optimized to only look once and if not found, will never look through the provider again. This prevents adding responses to the provider at a later time, but improves repeated lookup performance
Parameters:
Name Type Description
responseId String The id of the response
Source:
Returns:
The response. If not found, returns null
Type
Response

getRegisteredProviders() → {Array.Provider}

Returns the list of registers providers
Source:
Returns:
All of the registered providers
Type
Array.Provider

registerProvider(provider)

Adds providers
Parameters:
Name Type Description
provider Array.Provider Providers to use. Can be an individual provider or an array
Source:

tell(msg) → {String}

Helper method to do an ask similar to the alexa api
Parameters:
Name Type Description
msg String The message to tell to the user
Source:
Returns:
The rendered string to send back to Alexa
Type
String