This repo is a collection of snippets for developers building Alexa APL skills.
Each snippet is a working APL document you can use to understand an APL feature. Use the snippet to explore the feature.
- This is not an introduction to APL. It is aimed at intermediate developers who are already familiar with the basics.
- If you are just started, try the visual cakewalk course first.
- The snippets are not clean (or polished) enough for copy/paste reuse. We kept them simple for easier learning.
This is a working Alexa skill. You can clone it and run it (see instructions below).
Here is the hierarchy, so you can navigate through the code:
-
<root>/lambda/custom/aplsamples/ Contains all the snippets. Each feature has their own subfolder with an APL document and a readme file. Most snippets are self-contained, you should be able to copy/paste the document contents to the APL editor. When the snippet requires a data source commands, the readme will call it out.
-
<root>/lambda/custom/skill Contains the files needed for the demo to load and display the snippets. It has the intent handlers for the voice interactions.
-
<root>/model/en-US.json Has the voice interaction model. Use it to extract the utterances supported by the skill.
[Will be updated to links soon]
Components:
- Text
- Image
- TouchWrapper
- Video
- Pager
- Sequence
Commands:
- SpeakItem using speech
- SpeakItem using transformers
- SpeakList
- OpenUrl
Features:
- Profile
- Animation
- Databinding
- Cached Pager
- States
- Environment
- Transport controls
Scenario demos
- Spinner
- Tic-tac-toe
In a system with ASK CLI and AWS CLI installed:
-
Clone this repo.
git clone https://github.com/jaimerodriguez/aplsnippets
-
Change directory to the root of the project.
cd aplsnippets
-
Associate the project with your Alexa developer account and your AWS account.
ask init
-
Deploy the project.
ask deploy
-
Go to the Alexa developer portal, click on the skill, and then go into the test tab and invoke the skill. Alternatively, you can invoke the skill on any Alexa-enabled devices that are tied to the same Amazon user account as your developer account.
-
Having a local environment for debugging is super helpful. Follow this Alexa Blog to setup your local debug workflow.
If you want to contribute a new snippet, or you want to contribute to the documentation, please submit a pull request.