Manages state of the Alexa device interaction across sessions.

Holds information about the user, the current session, as well as the AudioPlayer, if in use.

To emulate a user with a linked account, set the access token property.

### Hierarchy

- AlexaContext

## Index

### Constructors

- constructor

### Methods

- accessToken
- activeSession
- applicationID
- audioPlayer
- audioPlayerEnabled
- endSession
- interactionModel
- newSession
- session
- setAccessToken
- setUserID
- skillURL
- userID

## Constructors

### constructor

- new AlexaContext(_skillURL: string, _interactionModel: InteractionModel, _audioPlayer: AudioPlayer, _applicationID?: string): AlexaContext

- - Defined in alexa/alexa-context.ts:16

  #### Parameters

  - ##### _skillURL: string

  - ##### _interactionModel: InteractionModel

  - ##### _audioPlayer: AudioPlayer

  - ##### Optional _applicationID: string

  #### Returns AlexaContext

## Methods

### accessToken

- accessToken(): string

- - Defined in alexa/alexa-context.ts:50

  #### Returns string

### activeSession

- activeSession(): boolean

- - Defined in alexa/alexa-context.ts:78

  #### Returns boolean

### applicationID

- applicationID(): string

- - Defined in alexa/alexa-context.ts:23

  #### Returns string

### audioPlayer

- audioPlayer(): AudioPlayer

- - Defined in alexa/alexa-context.ts:58

  #### Returns AudioPlayer

### audioPlayerEnabled

- audioPlayerEnabled(): boolean

- - Defined in alexa/alexa-context.ts:62

  #### Returns boolean

### endSession

- endSession(): void

- - Defined in alexa/alexa-context.ts:74

  #### Returns void

### interactionModel

- interactionModel(): InteractionModel

- - Defined in alexa/alexa-context.ts:35

  #### Returns InteractionModel

### newSession

- newSession(): void

- - Defined in alexa/alexa-context.ts:66

  #### Returns void

### session

- session(): AlexaSession

- - Defined in alexa/alexa-context.ts:70

  #### Returns AlexaSession

### setAccessToken

- setAccessToken(token: string): void

- - Defined in alexa/alexa-context.ts:54

  #### Parameters

  - ##### token: string

  #### Returns void

### setUserID

- setUserID(userID: string): void

- - Defined in alexa/alexa-context.ts:46

  #### Parameters

  - ##### userID: string

  #### Returns void

### skillURL

- skillURL(): string

- - Defined in alexa/alexa-context.ts:31

  #### Returns string

### userID

- userID(): string

- - Defined in alexa/alexa-context.ts:39

  #### Returns string

Generated using TypeDoc