Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unzipped Alexa Skills' folders and added README's for each skill #24

Merged
merged 1 commit into from
Jan 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Hello Garima/README.md
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!

40 changes: 40 additions & 0 deletions Hello Garima/interactionModels/custom/en-US.json
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"
}
120 changes: 120 additions & 0 deletions Hello Garima/lambda/index.js
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();
16 changes: 16 additions & 0 deletions Hello Garima/lambda/package.json
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"
}
}
19 changes: 19 additions & 0 deletions Hello Garima/lambda/util.js
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;

}
25 changes: 25 additions & 0 deletions Hello World/README.md
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!

Binary file added Hello World/assets/images/en-IN_largeIconUri.png
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.
40 changes: 40 additions & 0 deletions Hello World/interactionModels/custom/en-IN.json
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"
}
Loading