github alexa/alexa-skills-kit-sdk-for-nodejs 1.0.20
Support for Progresive Response API

latest releases: v2.14.0, v2.12.1, v2.12.0...
7 years ago

This release adds SDK support for progressive response API.

The DirectiveService provides the following function to access the Progressive Response API:

enqueue(directive, apiEndpoint, token);

An example to send directive to the service API is as follows:

function callDirectiveService(event) {
    // Call Alexa Directive Service.
    const ds = new Alexa.services.DirectiveService();
    const requestId = event.request.requestId;
    const endpoint = event.context.System.apiEndpoint;
    const token = event.context.System.apiAccessToken;
    const directive = new Alexa.directives.VoicePlayerSpeakDirective(requestId, "This is a message");
    ds.enqueue(directive, endpoint, token)
    .catch((err) => {
        console.log(err.message);
    });
}

Don't miss a new alexa-skills-kit-sdk-for-nodejs release

NewReleases is sending notifications on new releases.