Skill Name: Euro Soccer
I'm not a huge fan of soccer ... :D but I know there are a lot of people out there who will enjoy my new skill for Alexa.
This is my second skill for Alexa (the other one is called Mr Brown): I'm curious to see if people are interested in asking information about Euro Football Cup 2016.
I started thinking about which type of questions a user can ask and I divided it in 2 groups:
Before the 10th June, the user is able to ask:
- the adversary of a particular team
- the list of the groups
- the list of the teams
- the group for a team
- the teams in a group.
Since the 10th June, the user will be able to ask: match results, the next match of a team, the last result of a team
I found a little bit dispersive to manage the association between "intents" , "slots" and "utterances" so, I decided to build a simple tool that parse an XML file format I created and I produces the utterances list with a python script I wrote.
A part of this XML is:
Maybe, this tool will be released as opensource later.
This helped me to realize the connection between the pieces.
The application runs on aws lambda. The code is highly inspired by the samples found on https://github.com/amzn/alexa-skills-kit-js
I divided the "core" functionality of the skill in a separate javascript file, that is simply "chained" with a class that extends AlexaSkills.js and exposes the intents. In this way I was able to test the "core" with some Unit Testing code and offline. The test javascript class was also useful to get the custom slot LIST_OF_TEAMS used by the application.
I hope the skill will be published before the end of the contest :)
Comments