Skip to content

Commit

Permalink
leaderboard updates
Browse files Browse the repository at this point in the history
  • Loading branch information
robm26 committed Mar 17, 2019
1 parent c89db18 commit a809e9b
Show file tree
Hide file tree
Showing 42 changed files with 1,552 additions and 283 deletions.
31 changes: 0 additions & 31 deletions skill.json

This file was deleted.

48 changes: 46 additions & 2 deletions skill/.ask/config
Original file line number Diff line number Diff line change
@@ -1,18 +1,62 @@
{
"deploy_settings": {
"default": {
"skill_id": "",
"skill_id": "amzn1.ask.skill.26f1570c-6b4b-4da3-b648-5d7d5c6eaf81",
"was_cloned": false,
"merge": {
"manifest": {
"apis": {
"custom": {
"endpoint": {
"uri": "ask-state-games"
"uri": "arn:aws:lambda:us-east-1:589662381973:function:ask-state-games"
}
}
}
}
},
"in_skill_products": [
{
"deploy_status": "Update",
"filePath": "isps/consumable/hints_pack.json",
"productId": "amzn1.adg.product.c0db9c7f-7489-49eb-88dd-12432a554c80",
"eTag": "436bdd4a5b3db447c07e53bb0481256c"
},
{
"deploy_status": "Update",
"filePath": "isps/entitlement/bigger_pop.json",
"productId": "amzn1.adg.product.946ba1c5-3db8-44c2-909e-4f59b3355e2c",
"eTag": "c36b762e870489aaabe94433af0905af"
},
{
"deploy_status": "Update",
"filePath": "isps/subscription/leaderboard.json",
"productId": "amzn1.adg.product.8724455c-478a-4485-a113-edbd7f1dc186",
"eTag": "f52e98b0ed7813cc36928725f3ad2b05"
}
],
"resources": {
"manifest": {
"eTag": "991dc2d8ca721be324e1cda3084f9e71"
},
"interactionModel": {
"en-US": {
"eTag": "90705a96ed1d4c6702d81850c8eb829d"
}
},
"lambda": [
{
"alexaUsage": [
"custom/default"
],
"arn": "arn:aws:lambda:us-east-1:589662381973:function:ask-state-games",
"awsRegion": "us-east-1",
"codeUri": "lambda/custom",
"functionName": "ask-state-games",
"handler": "index.handler",
"revisionId": "51712ae7-26fc-4acf-a3f3-11398e3ad519",
"runtime": "nodejs8.10"
}
]
}
}
}
Expand Down
33 changes: 33 additions & 0 deletions skill/.ask/config_original
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"deploy_settings": {
"default": {
"skill_id": "",
"was_cloned": false,
"merge": {
"manifest": {
"apis": {
"custom": {
"endpoint": {
"uri": "ask-state-games"
}
}
}
}
},
"in_skill_products": [
{
"deploy_status": "Add",
"filePath": "isps/consumable/hints_pack.json"
},
{
"deploy_status": "Add",
"filePath": "isps/entitlement/bigger_pop.json"
},
{
"deploy_status": "Add",
"filePath": "isps/subscription/leaderboard.json"
}
]
}
}
}
44 changes: 44 additions & 0 deletions skill/hooks/pre_deploy_hook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash
# Shell script for ask-cli pre-deploy hook for Node.js
# Script Usage: pre_deploy_hook.sh <SKILL_NAME> <DO_DEBUG> <TARGET>

# SKILL_NAME is the preformatted name passed from the CLI, after removing special characters.
# DO_DEBUG is boolean value for debug logging
# TARGET is the deploy TARGET provided to the CLI. (eg: all, skill, lambda etc.)

# Run this script under skill root folder

# The script does the following:
# - Run "npm install" in each sourceDir in skill.json

SKILL_NAME=$1
DO_DEBUG=${2:-false}
TARGET=${3:-"all"}

if [ $DO_DEBUG == false ]
then
exec > /dev/null 2>&1
fi

install_dependencies() {
npm install --prefix "$1" >/dev/null 2>&1
return $?
}

echo "###########################"
echo "##### pre-deploy hook #####"
echo "###########################"

if [[ $TARGET == "all" || $TARGET == "lambda" ]]; then
grep "sourceDir" ./skill.json | cut -d: -f2 | sed 's/"//g' | sed 's/,//g' | while read -r SOURCE_DIR; do
if install_dependencies $SOURCE_DIR; then
echo "Codebase ($SOURCE_DIR) built successfully."
else
echo "There was a problem installing dependencies for ($SOURCE_DIR)."
exit 1
fi
done
echo "###########################"
fi

exit 0
51 changes: 51 additions & 0 deletions skill/isps/consumable/hints_pack.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"version": "1.0",
"type": "CONSUMABLE",
"referenceName": "hints_pack",
"publishingInformation": {
"locales": {
"en-US": {
"name": "Hints Pack",
"summary": "A five pack of hints you can use during the game.",
"description": "A five pack of hints you can use if you get stuck during the game. Each time you use a hint, your inventory of hints will be reduced. You can say help to hear your inventory.",
"smallIconUri": "https://s3.amazonaws.com/CAPS-SSE/echo_developer/cc03/eb20f63c29ec497a9db698fba7852396/APP_ICON?versionId=tol8RHgxUPQaLqWPrqa8MqrVK2nO3AMD&AWSAccessKeyId=AKIAJFEYRBGIHK2BBYKA&Expires=1552582550&Signature=5KiCZmS5UH8NRonB9Nxij1i%2BadI%3D",
"largeIconUri": "https://s3.amazonaws.com/CAPS-SSE/echo_developer/6994/b9623c827f644e0b99aef11def1b336a/APP_ICON_LARGE?versionId=SHC2OQEYT59a6sRm69V0MnAdmm66FPEv&AWSAccessKeyId=AKIAJFEYRBGIHK2BBYKA&Expires=1552582550&Signature=ACPt%2F3bvMognx1uqaKftz%2B16Xg0%3D",
"examplePhrases": [
"buy hint pack"
],
"keywords": [
"hint",
"pack"
],
"customProductPrompts": {
"purchasePromptDescription": "You may purchase this five pack of hints. ",
"boughtCardDescription": "You now have a new five pack of hints."
}
}
},
"distributionCountries": [
"US"
],
"pricing": {
"amazon.com": {
"releaseDate": "2019-02-13T00:00Z",
"defaultPriceListing": {
"price": 1.99,
"currency": "USD"
}
}
},
"taxInformation": {
"category": "INFORMATION_SERVICES"
}
},
"privacyAndCompliance": {
"locales": {
"en-US": {
"privacyPolicyUrl": "https://localhost/privacy.html"
}
}
},
"testingInstructions": "Test this well",
"purchasableState": "PURCHASABLE"
}
54 changes: 54 additions & 0 deletions skill/isps/entitlement/bigger_pop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"version": "1.0",
"type": "ENTITLEMENT",
"referenceName": "bigger_pop",
"publishingInformation": {
"locales": {
"en-US": {
"name": "Bigger Pop",
"summary": "Bigger Pop is a super fun game where you have to name a series of US states. Each new state you name must have a larger population than the previous state.",
"description": "Bigger Pop is a super fun game where you have to name a series of US states. Each new state you name must have a larger population than the previous state. Your score is the number of states you can name correctly.",
"smallIconUri": "https://s3.amazonaws.com/CAPS-SSE/echo_developer/717f/70997a3ba01d46ba9b6fed8e8bdc366c/APP_ICON?versionId=C9DqT7ZUpt9IBd9hOaEV3RtPjrYUHGRY&AWSAccessKeyId=AKIAJFEYRBGIHK2BBYKA&Expires=1552582552&Signature=0ZxHMpF5PoCUmIw6wIMBq%2FvKOSc%3D",
"largeIconUri": "https://s3.amazonaws.com/CAPS-SSE/echo_developer/5f9c/b95ae3f49b1946d58cbf24ba0bb5c2a4/APP_ICON_LARGE?versionId=mAI9Ykgm4KoV.Ki5rRCvHTIl7wUp7vyW&AWSAccessKeyId=AKIAJFEYRBGIHK2BBYKA&Expires=1552582552&Signature=blleof1c2gRrpQaDKewDc1ptScg%3D",
"examplePhrases": [
"buy bigger pop"
],
"keywords": [
"bigger",
"pop",
"population",
"state",
"game"
],
"customProductPrompts": {
"purchasePromptDescription": "Bigger Pop is a game you may purchase.",
"boughtCardDescription": "Thanks for purchasing Bigger Pop!"
}
}
},
"distributionCountries": [
"US"
],
"pricing": {
"amazon.com": {
"releaseDate": "2019-02-13T00:00Z",
"defaultPriceListing": {
"price": 0.99,
"currency": "USD"
}
}
},
"taxInformation": {
"category": "INFORMATION_SERVICES"
}
},
"privacyAndCompliance": {
"locales": {
"en-US": {
"privacyPolicyUrl": "https://localhost/privacy.html"
}
}
},
"testingInstructions": "Please test this product carefully.",
"purchasableState": "PURCHASABLE"
}
57 changes: 57 additions & 0 deletions skill/isps/subscription/leaderboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"version": "1.0",
"type": "SUBSCRIPTION",
"referenceName": "leaderboard",
"subscriptionInformation": {
"subscriptionPaymentFrequency": "MONTHLY",
"subscriptionTrialPeriodDays": 7
},
"publishingInformation": {
"locales": {
"en-US": {
"name": "Leader Board",
"summary": "The leaderboard is a listing of the top all time scores for each game. You are charged a monthly subscription to gain access.",
"description": "The leaderboard is a listing of the top all time scores for each game. You can see how you rank if you have one of the top scores.",
"smallIconUri": "https://s3.amazonaws.com/CAPS-SSE/echo_developer/a97b/5097ca956c004f519961e3497ed6d629/APP_ICON?versionId=NqwyVrENlgZCNs.h3MKafmd.ZoCq.zYI&AWSAccessKeyId=AKIAJFEYRBGIHK2BBYKA&Expires=1552582553&Signature=FB%2BntNz2ygnDkNwXljDkYPGdJhU%3D",
"largeIconUri": "https://s3.amazonaws.com/CAPS-SSE/echo_developer/9b54/a6308004ca2047f3a9e2d8e5b87873e8/APP_ICON_LARGE?versionId=klivdWg0N1qQWIit8VYCA.yFbM2Tt3wU&AWSAccessKeyId=AKIAJFEYRBGIHK2BBYKA&Expires=1552582553&Signature=L4fy4DqZLtb0Vw0lJYZbtWXJ2D4%3D",
"examplePhrases": [
"buy leaderboard",
"subscribe to the leaderboard"
],
"keywords": [
"leaderboard",
"leader",
"board"
],
"customProductPrompts": {
"purchasePromptDescription": "Would you like to subscribe to the Leader Board",
"boughtCardDescription": "You now have a subscription to the Leader Board"
}
}
},
"distributionCountries": [
"US"
],
"pricing": {
"amazon.com": {
"releaseDate": "2019-02-13T00:00Z",
"defaultPriceListing": {
"price": 0.99,
"currency": "USD"
}
}
},
"taxInformation": {
"category": "INFORMATION_SERVICES"
}
},
"privacyAndCompliance": {
"locales": {
"en-US": {
"privacyPolicyUrl": "https://localhost/privacy.html"
}
}
},
"testingInstructions": "Test this well.",
"purchasableState": "PURCHASABLE"
}
Loading

0 comments on commit a809e9b

Please sign in to comment.