Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Alexam

Interacts to handler and manage session until session close.

Hierarchy

  • Alexam

Index

Constructors

  • Generates new Alexam object. Basically recommend to use AlexamBuilder to generate Alexam instead of generating manually.

    Parameters

    • handler: Handler

      Handler object to handle skill request

    • requestFactory: SkillRequestFactory

      SkillRequestFactory object to generate request from Alexam

    • skillContext: SkillContext

      SkillContext object to retain session attributes while interaction

    Returns Alexam

    Alexam object

Properties

handler: Handler
requestFactory: SkillRequestFactory
skillContext: SkillContext

Methods

  • resetSession(): void
  • Resets session of Alexam object. You would use it if you have some test cases with the Alexam object.

    Returns void

  • send(request: RequestEnvelope): Promise<ResponseEnvelope>
  • Sends request to the Handler you set. Would send SessionEndedRequest type request automatically if response includes shouldEndSession: true.

    Parameters

    • request: RequestEnvelope

      RequestEnvelope object that is same as it from alexa-skills-kit-sdk-for-nodejs. You can create it with SkillRequestFactory.

    Returns Promise<ResponseEnvelope>

    ResponseEnvelope object that is same as it from alexa-skills-kit-sdk-for-nodejs. You would check it by matcher method when testing.

Generated using TypeDoc