alexa-airportinfo | js src for the article Developing Alexa Skills | Runtime Evironment library
kandi X-RAY | alexa-airportinfo Summary
kandi X-RAY | alexa-airportinfo Summary
###Completed solution for the blog article "Developing Alexa Skills Locally with Node.js". part 1: part 2:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of alexa-airportinfo
alexa-airportinfo Key Features
alexa-airportinfo Examples and Code Snippets
Community Discussions
Trending Discussions on alexa-airportinfo
QUESTION
I'm new to Alexa, and have followed the airportinfo tutorial and I have copied the code from github https://github.com/bignerdranch/alexa-airportinfo and when i test it using npm and input an airport code e.g. SFO, Theres no "outputSpeech:" and i tried making a similar skill with the same issue, I'm not sure what I'm doing wrong. I have both index.js and FAADataInfo.js Thanks in advance for your help.
This is the index.js file
...ANSWER
Answered 2017-May-02 at 06:56The alexa-app version that the tutorial is using is out of date. When using the latest alexa-app npm version (4.0.0), the return value for the .intent() function should be a Promise and not a boolean if you are running asynchronous functions.
In your index.js, add:
return faaHelper.getAirportStatus(....) {}.catch(){}
and remove the return false;
after the catch.
Here's the full skill.intent() code
QUESTION
I have to be missing something really simple here, but here goes.
I am just now starting to learn Alexa development, and found the alexa-app module which seems to make Alexa programming really straight-forward - except for this networking issue I'm running into.
I'm walking through the sample app provided by the team called AirportInfo. The code for the problem area is below:
...ANSWER
Answered 2017-Apr-11 at 20:35I don't understand everything about Promises with regard to Alexa, but I did get this figured out. From the date of your question, there are newer versions of alexa-app-server (3.0.1) and alexa-app (4.0.0) available. I recently developed a skill using these versions. alexa-app 2, the version mentioned in alexa-airportinfo, doesn't work with the latest alexa-app-server.
So, first thing to do is to use the latest alexa-app in your code. Then, realize that by virtue of using request-promise in FAADataHelper, the code is returning a Promise back to index.js. For this to work you need to return that Promise, instead of the false at the end of the function.
To sum up, I got the latest alexa-app-server, changed the alexa-app version in the airportinfo to the latest, and ran it, getting the same result you did - the response comes back before the rp requests are done. When I changed the code to below, I got the desired result - the requests were done, then the response finished with the speech in.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install alexa-airportinfo
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page