travello-gmbh / amazon-alexa-skill-library Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED PHP Library for Amazon Alexa Skills
DEPRECATED PHP Library for Amazon Alexa Skills
The AbstractAlexaApplication
needs to be refactored:
CertificateValidator
should be removed from AbstractAlexaApplication
AbstractAlexaApplication
TextHelper
should be removed from AbstractAlexaApplication
TextHelper
should be set in the middleware pipelineTextHelper
should be injected in the intent classes via factoryFurther refactorings:
The Amazon Echo Show needs to be supported. Especially the template directives. See these links for details:
The Session attribute handling needs to be extracted from the TravelloAlexaLibrary\Application\AbstractAlexaApplication
class. This involves the following steps:
initSessionAttributes()
to a session container class.getSessionAttributes()
to a session container class.resetSessionAttributes()
to a session container class.initResponse()
should be removed as well. Maybe a middleware pipeline class could handle this.AbstractAlexaApplication
does not need to be abstract anymore.When the context object is sent within an Alexa request and no AudioPlayer object is sent, the request handling fails. The TravelloAlexaLibrary\Request\Context\Context
expects an AudioPlayerInterface
instance as a parameter for its constructor. This should be changed. Otherwise the handling in the TravelloAlexaLibrary\Request\RequestType\RequestTypeFactory
fails.
The Alexa Response Directives are not implemented yet, see:
Add a solution to randomize common texts like alexaLaunchMessage
or alexaStopMessage
or alexaCancelTitle
by adding arrays for each text.
When the service request is sent without the version the skill handling breaks with an error:
ErrorException: Undefined index: version in file /vendor/travello-gmbh/amazon-alexa-skill-library/src/Request/RequestType/RequestTypeFactory.php on line 39
Currently, all intents are tightly fixed to the TravelloAlexaLibrary\Application\AbstractAlexaApplication
class. The idea behind this issue is to create single classes for each intent. Intent objects should habe access to the TravelloAlexaLibrary\Request\AlexaRequest
and TravelloAlexaLibrary\Response\AlexaResponse
objects and manipulate the Alexa response by changing its OutputSpeech, Card, Session Attributes, and so on.
The need to extend the AbstractAlexaApplication
class to implement the handleIntentRequest()
method in each application should be removed. The handleIntentRequest()
should handle the intent requests automatically without the need to add each intent into a case
condition.
The Alexa Request Context is not implemented yet. See
Extend the skill configuration class TravelloAlexaLibrary\Configuration\SkillConfiguration
with further fields:
Inject the SkillConfiguration
class into the intents and remove the injection from the application.
Needs updates in the ZF Library intent factory as well.
The Text helper should be locale aware to handle international skills with more than one language.
All Zend Framework based factory and middleware classes should be move to this new package
https://github.com/travello-gmbh/amazon-alexa-skill-zf
Aim is to reduce the dependency on Zend\ServiceManager
.
When working at a new Skill, I got a service request sent by the service simulator with a different timestamp format:
"request": {
"requestId": "EdwRequestId.ea1f77ad-b269-4b61-b606-f77f65c012b0",
"locale": "de-DE",
"type": "LaunchRequest",
"timestamp": 1501507326551
},
The normal format is 2017-01-26T20:38:55Z
for example. To keep users from frustrating debugging this "unnormal" format should be handled.
Currently every POST request is handled as an Alexa request. If you want to add a form to your application the InjectCertificateValidatorMiddleware
and InjectAlexaRequestMiddleware
throw an exception.
Write a new middleware for the pipeline to add the AlexaRequest
instance to the DI Container. Write another one to add the AlexaResponse
instance to the DI Container. This will make it easier to access both in the application.
Add a new Method resetSessionAttributes()
to the TravelloAlexaLibrary\Application\AbstractAlexaApplication
class to reset session attributes when stopping, cancelling or launching a skill.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.