Comments (4)
I see a couple ways to do this:
- Create a new function called .done() or .send(), which internally sends back the json.
- When a function is called that will send a response, internally wait till next tick and send the json.
- Have a function .waitUntil() that returns a callback to call when your ready to send.
Option 3 and 2 are backwards compatible. Option 1 is closer to how node works internally, but breaks the abstraction a little bit. Option 3 is the easiest to implement, keeps the API simple, and allows the most flexibility to the developer.
from alexa-app.
I just submitted two pull requests for option 3. Personally, I like the one with promises, but native promises were only added recently in v0.12. You'd need to add a polyfill (and therefore a dependency) for support of v0.10 and lower.
from alexa-app.
Thanks!
On Mon, Jun 1, 2015 at 2:45 PM -0700, "psayre23" [email protected] wrote:
I just submitted two pull requests for option 3. Personally, I like the one with promises, but native promises were only added recently in v0.12. You'd need to add a polyfill (and therefore a dependency) for support of v0.10 and lower.
—
Reply to this email directly or view it on GitHub.
from alexa-app.
Fixed in version 2.0, to be released soon. Intent handlers can now return false, and resolve the response promise whenever they are done with their work.
from alexa-app.
Related Issues (20)
- Support for CanFulfillIntentRequest HOT 7
- Errors when using KeepAlive-style CloudWatch events HOT 5
- Patch for directive Dialog.Delegate HOT 2
- Cannot get directive display to work in Alexa skill. HOT 5
- Not able to use alexa-app HOT 2
- APL Support ? HOT 6
- VideoApp Directive HOT 1
- alexa-verifier-middleware HOT 1
- request.userId returning the wrong user HOT 3
- Multi turn dialog
- How we can get user permissions list?
- ssml lowercase
- Firebase Promise Failure HOT 2
- Support for In-Skill Purchases (ISP)? HOT 1
- INVALID_REQUEST_TYPE HOT 3
- Chained callbacks not working. HOT 2
- Issues testing locally the Skill: alexa-app + express + ngrok HOT 2
- Xxxxx
- REPLACE_ALL play behavior has no effect HOT 1
- Catch User Profile Data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alexa-app.