-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from dalalvarun/develop
Unzipped Alexa Skills' folders and added README's for each skill
- Loading branch information
Showing
20 changed files
with
721 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<h1><b><img src="https://www.clipartmax.com/png/full/193-1934146_%C2%A0-alexa-skills-kit-logo.png" width="25px"> Skill 2 :Hello Garima👸</b><h1> | ||
|
||
![Author](https://img.shields.io/badge/author-garimasingh128-orange) | ||
![License](https://img.shields.io/badge/license-MIT-brightgreen) | ||
![Platform](https://img.shields.io/badge/platform-Visual%20Studio%20Code-blue) | ||
![Maintained](https://img.shields.io/maintenance/yes/2020) | ||
[![Join the chat at https://gitter.im/SWOC2021/Alexa-skills-starters](https://badges.gitter.im/SWOC2021/Alexa-skills-starters.svg)](https://gitter.im/SWOC2021/Alexa-skills-starters?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
|
||
# __How to invoke the skill?__ | ||
Just say "__Launch Hello Garima__" to invoke it. | ||
|
||
# __What can it do?__ | ||
On invocation, it would say : | ||
__"Hi, Call me Garima."__. Then reply with "Hello Garima!" or simply "Hello". | ||
|
||
It would reply, __"Hi Gary, I like you."__ | ||
|
||
|
||
# __ReadMe contributed by__ | ||
<a href="https://github.com/dalalvarun">![Author](https://img.shields.io/badge/USER-dalalvarun-yellow)</a> ![GitHub followers](https://img.shields.io/github/followers/dalalvarun?style=social) | ||
|
||
# | ||
[![built with love](https://forthebadge.com/images/badges/built-with-love.svg)](https://github.com/garimasingh128) | ||
## ❤️ Thanks to the awesome Amazon community! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"interactionModel": { | ||
"languageModel": { | ||
"invocationName": "hello world", | ||
"intents": [ | ||
{ | ||
"name": "AMAZON.CancelIntent", | ||
"samples": [] | ||
}, | ||
{ | ||
"name": "AMAZON.HelpIntent", | ||
"samples": [] | ||
}, | ||
{ | ||
"name": "AMAZON.StopIntent", | ||
"samples": [] | ||
}, | ||
{ | ||
"name": "HelloWorldIntent", | ||
"slots": [], | ||
"samples": [ | ||
"hello", | ||
"how are you", | ||
"say hi world", | ||
"say hi", | ||
"hi", | ||
"say hello world", | ||
"say hello" | ||
] | ||
}, | ||
{ | ||
"name": "AMAZON.NavigateHomeIntent", | ||
"samples": [] | ||
} | ||
], | ||
"types": [] | ||
} | ||
}, | ||
"version": "1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
// This sample demonstrates handling intents from an Alexa skill using the Alexa Skills Kit SDK (v2). | ||
// Please visit https://alexa.design/cookbook for additional examples on implementing slots, dialog management, | ||
// session persistence, api calls, and more. | ||
const Alexa = require('ask-sdk-core'); | ||
|
||
const LaunchRequestHandler = { | ||
canHandle(handlerInput) { | ||
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'LaunchRequest'; | ||
}, | ||
handle(handlerInput) { | ||
const speakOutput = 'Hi, call me Garima.'; | ||
return handlerInput.responseBuilder | ||
.speak(speakOutput) | ||
.reprompt(speakOutput) | ||
.getResponse(); | ||
} | ||
}; | ||
const HelloWorldIntentHandler = { | ||
canHandle(handlerInput) { | ||
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest' | ||
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'HelloWorldIntent'; | ||
}, | ||
handle(handlerInput) { | ||
const speakOutput = 'Hi Gary. I like you.'; | ||
return handlerInput.responseBuilder | ||
.speak(speakOutput) | ||
//.reprompt('add a reprompt if you want to keep the session open for the user to respond') | ||
.getResponse(); | ||
} | ||
}; | ||
const HelpIntentHandler = { | ||
canHandle(handlerInput) { | ||
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest' | ||
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'AMAZON.HelpIntent'; | ||
}, | ||
handle(handlerInput) { | ||
const speakOutput = 'You can say hello to me! How can I help?'; | ||
|
||
return handlerInput.responseBuilder | ||
.speak(speakOutput) | ||
.reprompt(speakOutput) | ||
.getResponse(); | ||
} | ||
}; | ||
const CancelAndStopIntentHandler = { | ||
canHandle(handlerInput) { | ||
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest' | ||
&& (Alexa.getIntentName(handlerInput.requestEnvelope) === 'AMAZON.CancelIntent' | ||
|| Alexa.getIntentName(handlerInput.requestEnvelope) === 'AMAZON.StopIntent'); | ||
}, | ||
handle(handlerInput) { | ||
const speakOutput = 'Goodbye!'; | ||
return handlerInput.responseBuilder | ||
.speak(speakOutput) | ||
.getResponse(); | ||
} | ||
}; | ||
const SessionEndedRequestHandler = { | ||
canHandle(handlerInput) { | ||
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'SessionEndedRequest'; | ||
}, | ||
handle(handlerInput) { | ||
// Any cleanup logic goes here. | ||
return handlerInput.responseBuilder.getResponse(); | ||
} | ||
}; | ||
|
||
// The intent reflector is used for interaction model testing and debugging. | ||
// It will simply repeat the intent the user said. You can create custom handlers | ||
// for your intents by defining them above, then also adding them to the request | ||
// handler chain below. | ||
const IntentReflectorHandler = { | ||
canHandle(handlerInput) { | ||
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest'; | ||
}, | ||
handle(handlerInput) { | ||
const intentName = Alexa.getIntentName(handlerInput.requestEnvelope); | ||
const speakOutput = `You just triggered ${intentName}`; | ||
|
||
return handlerInput.responseBuilder | ||
.speak(speakOutput) | ||
//.reprompt('add a reprompt if you want to keep the session open for the user to respond') | ||
.getResponse(); | ||
} | ||
}; | ||
|
||
// Generic error handling to capture any syntax or routing errors. If you receive an error | ||
// stating the request handler chain is not found, you have not implemented a handler for | ||
// the intent being invoked or included it in the skill builder below. | ||
const ErrorHandler = { | ||
canHandle() { | ||
return true; | ||
}, | ||
handle(handlerInput, error) { | ||
console.log(`~~~~ Error handled: ${error.stack}`); | ||
const speakOutput = `Sorry, I had trouble doing what you asked. Please try again.`; | ||
|
||
return handlerInput.responseBuilder | ||
.speak(speakOutput) | ||
.reprompt(speakOutput) | ||
.getResponse(); | ||
} | ||
}; | ||
|
||
// The SkillBuilder acts as the entry point for your skill, routing all request and response | ||
// payloads to the handlers above. Make sure any new handlers or interceptors you've | ||
// defined are included below. The order matters - they're processed top to bottom. | ||
exports.handler = Alexa.SkillBuilders.custom() | ||
.addRequestHandlers( | ||
LaunchRequestHandler, | ||
HelloWorldIntentHandler, | ||
HelpIntentHandler, | ||
CancelAndStopIntentHandler, | ||
SessionEndedRequestHandler, | ||
IntentReflectorHandler, // make sure IntentReflectorHandler is last so it doesn't override your custom intent handlers | ||
) | ||
.addErrorHandlers( | ||
ErrorHandler, | ||
) | ||
.lambda(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "hello-world", | ||
"version": "1.1.0", | ||
"description": "alexa utility for quickly building skills", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "Amazon Alexa", | ||
"license": "ISC", | ||
"dependencies": { | ||
"ask-sdk-core": "^2.6.0", | ||
"ask-sdk-model": "^1.18.0", | ||
"aws-sdk": "^2.326.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const AWS = require('aws-sdk'); | ||
|
||
const s3SigV4Client = new AWS.S3({ | ||
signatureVersion: 'v4', | ||
region: process.env.S3_PERSISTENCE_REGION | ||
}); | ||
|
||
module.exports.getS3PreSignedUrl = function getS3PreSignedUrl(s3ObjectKey) { | ||
|
||
const bucketName = process.env.S3_PERSISTENCE_BUCKET; | ||
const s3PreSignedUrl = s3SigV4Client.getSignedUrl('getObject', { | ||
Bucket: bucketName, | ||
Key: s3ObjectKey, | ||
Expires: 60*1 // the Expires is capped for 1 minute | ||
}); | ||
console.log(`Util.s3PreSignedUrl: ${s3ObjectKey} URL ${s3PreSignedUrl}`); | ||
return s3PreSignedUrl; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<h1><b><img src="https://www.clipartmax.com/png/full/193-1934146_%C2%A0-alexa-skills-kit-logo.png" width="25px"> Skill 1 :Hello World🌎</b><h1> | ||
|
||
![Author](https://img.shields.io/badge/author-garimasingh128-orange) | ||
![License](https://img.shields.io/badge/license-MIT-brightgreen) | ||
![Platform](https://img.shields.io/badge/platform-Visual%20Studio%20Code-blue) | ||
![Maintained](https://img.shields.io/maintenance/yes/2020) | ||
[![Join the chat at https://gitter.im/SWOC2021/Alexa-skills-starters](https://badges.gitter.im/SWOC2021/Alexa-skills-starters.svg)](https://gitter.im/SWOC2021/Alexa-skills-starters?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
|
||
# __How to invoke the skill?__ | ||
Just say "__Launch Hello World__" to invoke it. | ||
|
||
# __What can it do?__ | ||
On invocation, it would say : | ||
"Welcome, you can say Hello or Help. Which would you like to try?". You have the following choices: | ||
|
||
* __Hello__ selection: Alexa would reply "__Hello World!__" | ||
* __Help__ selection: Alexa would reply "__You can say hello to me! How can I help?__". | ||
|
||
# __ReadMe contributed by__ | ||
<a href="https://github.com/dalalvarun">![Author](https://img.shields.io/badge/USER-dalalvarun-yellow)</a> ![GitHub followers](https://img.shields.io/github/followers/dalalvarun?style=social) | ||
|
||
# | ||
[![built with love](https://forthebadge.com/images/badges/built-with-love.svg)](https://github.com/garimasingh128) | ||
## ❤️ Thanks to the awesome Amazon community! | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"interactionModel": { | ||
"languageModel": { | ||
"invocationName": "hello garima", | ||
"intents": [ | ||
{ | ||
"name": "AMAZON.CancelIntent", | ||
"samples": [] | ||
}, | ||
{ | ||
"name": "AMAZON.HelpIntent", | ||
"samples": [] | ||
}, | ||
{ | ||
"name": "AMAZON.StopIntent", | ||
"samples": [] | ||
}, | ||
{ | ||
"name": "HelloWorldIntent", | ||
"slots": [], | ||
"samples": [ | ||
"hello", | ||
"how are you", | ||
"say hi world", | ||
"say hi", | ||
"hi", | ||
"say hello world", | ||
"say hello" | ||
] | ||
}, | ||
{ | ||
"name": "AMAZON.NavigateHomeIntent", | ||
"samples": [] | ||
} | ||
], | ||
"types": [] | ||
} | ||
}, | ||
"version": "1" | ||
} |
Oops, something went wrong.