question

lysisromulus avatar image
lysisromulus asked ·

Where can I find JAVA object for Alexa skill handlers?

I've been searching for the definition of the JAVA object used in the minecrafthelper tutorial. The tutorial is great -- easy to follow and fiddle with, but I can't find the object definition used in the tutorial's Lambda function. What I want to see is all the attributes given by "this" in

handlers = {
    'NewSession': function () {
        this.attributes.speechOutput = this.t('WELCOME_MESSAGE', this.t('SKILL_NAME'));
        // If the user either does not reply to the welcome message or says something that is not
        // understood, they will be prompted again with this text.
        this.attributes.repromptSpeech = this.t('WELCOME_REPROMT');
        this.emit(':ask', this.attributes.speechOutput, this.attributes.repromptSpeech);
    }

That is, this.t, this.emit, this.attributes.repromptSpeech, etc. Where is the object definition kept so I can see all the attributes for "this"? I'm in the JAVA library for the SDK, but still can't find it. All I need is a pointer.

Thanks in advance.

alexa skills kitlambdajavatutorial
1 comment
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

This source code is in javascript, while you are searching in the java library.

0 Likes 0 ·

1 Answer

Ross@Amazon avatar image
Ross@Amazon answered ·

Hi lysisromulus,

The getFields() method should be able to help you out.

10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.