Skip to content

Commit

Permalink
Merge pull request #16 from bespoken/NoDefaultDynamo
Browse files Browse the repository at this point in the history
No default dynamo
  • Loading branch information
jkelvie committed Aug 16, 2017
2 parents 070001f + a77cb38 commit 76c8f6b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -49,7 +49,7 @@ It is also set as a custom element:

If you would like to get started working with this project quickly, to see how the streamer works, just follow these directions.

You can take a look at the [deploy README] (https://github.com/bespoken/streamer/README_DEPLOY.md)
You can take a look at the [deploy README](https://github.com/bespoken/streamer/README_DEPLOY.md)
if/when you want to make the skill available publicly. These steps will allow you to get quickly setup and then do "frictionless iterations" on your code.

## Running the Sample
Expand Down
23 changes: 9 additions & 14 deletions lib/index.js
Expand Up @@ -55,25 +55,20 @@ function processEvent (event, context, appID, rssURL) {
alexa.state = constants.states.START_MODE;
}

if (event.context !== undefined && event.context.System.device.supportedInterfaces.AudioPlayer === undefined) {
alexa.emit(':tell', 'Sorry, this skill is not supported on this device');
} else {
// The resources are loaded once and then cached, but this is done asynchronously
//AudioManager.load("XAPP", xapp, {environment: environment}, intentName, function (error) {
AudioManager.load('URL', rssURL, 60, function (error, feed) {
if (error !== undefined && error !== null) {
context.fail(error);
} else {
alexa.execute();
}
});
}
AudioManager.load('URL', rssURL, 60, function (error, feed) {
if (error !== undefined && error !== null) {
context.fail(error);
} else {
alexa.execute();
}
});

}

function setupDynamo (alexa) {
// Flip this flag if you want to use dynamo
// If this is not set, we just use a simple, local Mock DB
if (process.env.USE_DYNAMO) {
if (process.env.USE_DYNAMO && process.env.USE_DYNAMO === "true") {
AWS.config.update({
credentials: {
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
Expand Down

0 comments on commit 76c8f6b

Please sign in to comment.