As an avid basketball fan and fantasy basketball player, I frequently found myself checking basketball statistics. One day when my Amazon Echo Dot arrived, I thought it would be a fun project to make it easier to obtain NBA stats using the Amazon Skills Kit.
How it WorksI decided to use Node.js to create the skill because I have some previous experience in that. The skill uses the NBA.js node api ( https://github.com/kshvmdn/nba.js ) to retrieve NBA data. From there, it was as simple as taking the echo skill, getting the input from it, and returning the correct data.
ChallengesOne major challenge I faced while creating the skill was accurately recognizing player names. Because some player names in the NBA are unusual, I had to add all names as a custom slot type. However, some common names were recognized by the Amazon Voice Service and so it did not return the correct formatting for the name ( Karl-Anthony Towns -> Karl Anthony Towns). Small things like that were difficult to work around because the api requires the correct formatting of the name.
CertificationGetting the skill certified was tedious because of small things like using the term "NBA" in the title or forgetting to change the example phrases. However, after much trial and error, the skill is now live. I deployed the node program on heroku so it is constantly running and I look forward to seeing others use it!
Comments