SpaceGeek Tips
Tips in customizing SpaceGeek for Alexa
My second Alexa skill was to customize SpaceGeek into a US History factoids. I wanted to share some tips to make sure one can quickly do so by sharing the pitfalls that I encountered and how I went about customizing it.
-
[x] Edit and customize the following strings accordingly:
- SPACE_FACTS
- SpaceGeek
- spaceGeek
-
[x] Add the custom ID assigned by Amazon developer console the following variable:
- APP_ID
-
[x] Edit the array and customize accordingly:
- var SPACE_FACTS
-
[x] Make sure each array ends in a comma except the last one to avoid code breaking in developer console
-
[x] Make sure in lines 121 and 122 in code block below, play close attention to the casing of spaceGeek and SpaceGeek. Notice lower case s and uppercase S after the word ‘new’. When I did the global find and replace of my text editor, I changed the casing of the lower ‘s’ which caused the code to break in console. It took me sometime to troubleshoot and eventually was able to isolate it to the casing. Preserve the casing when you plan to edit, in my case I used ‘USGeek’ instead of ‘SpaceGeek’ and ‘usGeek’ for ‘spaceGeek’ respectively and it fixed the code.
// Create the handler that responds to the Alexa Request.
exports.handler = function (event, context) {
// Create an instance of the SpaceGeek skill.
var spaceGeek = new SpaceGeek();
spaceGeek.execute(event, context);
};
Hopefully with these few handy tips, you can shorten your implementation time so the only testing you would only need is how the facts sound when spoken by Alexa.