alexa / alexa-skills-kit-sdk-for-java

The Alexa Skills Kit SDK for Java helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
http://developer.amazon.com/ask
Apache License 2.0
817 stars 747 forks source link

feat: new method in response builder to add a play directive with metadata #288

Closed kinisoftware closed 3 years ago

kinisoftware commented 3 years ago

Description

I just add a new method to the response builder to be able to pass as param an audio metadata to the play directive.

Motivation and Context

I have a skill where I need to display metadata on AudioPlayer. At first, I did this replicating the code in the addAudioPlayerPlayDirective method. Once it worked I decided to add a new helper method in the response builder to cover that scenario.

Testing

First of all, I replicated the code from addAudioPlayerPlayDirective adding the line for the audio item metadata. I tested that on my Echo Show 5 (and other people did as well). Once it worked, I moved that code to a new method in the ResponseBuilder class in the sdk. I decided to refactor the code a little bit so both addAudioPlayerPlayDirective use the same final code to build the directive. I installed the dependency in local and tested it as a I did with my first version on my own code.

Screenshots

IMG_20210226_203411

Types of changes

Checklist

License

sattpat commented 3 years ago

LGTM. Had one Nit comment. Thanks for the PR!!