Skip to content

Instantly share code, notes, and snippets.

@mfurtak
Last active December 19, 2016 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfurtak/7b237779a4189e8f3e70d84932fc2ae7 to your computer and use it in GitHub Desktop.
Save mfurtak/7b237779a4189e8f3e70d84932fc2ae7 to your computer and use it in GitHub Desktop.
Painful Alexa custom slot type value handling
switch (metric) {
case "status":
return buildStatusResponse();
case "ability": // Close enough!
case "stability":
return buildStabilityResponse();
case "grove": // Uh, sure.
case "gross": // This is how I feel.
case "growth":
return buildGrowthResponse();
case "tension": // Is building...
case "retention":
return buildRetentionResponse();
default:
return buildUnknownMetricResponse(metric)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment