From 41a8acf34dda3da6a0e2225506fcc44e52f6b2fa Mon Sep 17 00:00:00 2001 From: Tim Heuer Date: Fri, 7 Apr 2017 10:54:37 -0700 Subject: [PATCH] Fix #15 to add AskWithCard option --- Alexa.NET/ResponseBuilder.cs | 15 ++++++++++++++- Alexa.NET/project.json | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Alexa.NET/ResponseBuilder.cs b/Alexa.NET/ResponseBuilder.cs index d7af3a9..93b446e 100644 --- a/Alexa.NET/ResponseBuilder.cs +++ b/Alexa.NET/ResponseBuilder.cs @@ -19,7 +19,6 @@ public static SkillResponse TellWithReprompt(IOutputSpeech speechResponse, Repro { return BuildResponse(speechResponse, true, null, reprompt, null); } - public static SkillResponse Tell(IOutputSpeech speechResponse, Session sessionAttributes) { @@ -74,6 +73,20 @@ public static SkillResponse Ask(IOutputSpeech speechResponse, Reprompt reprompt, { return BuildResponse(speechResponse, false, sessionAttributes, reprompt, null); } + + public static SkillResponse AskWithCard(IOutputSpeech speechResponse, string title, string content, Reprompt reprompt) + { + return AskWithCard(speechResponse, title, content, reprompt, null); + } + + public static SkillResponse AskWithCard(IOutputSpeech speechResponse, string title, string content, Reprompt reprompt, Session sessionAttributes) + { + SimpleCard card = new SimpleCard(); + card.Content = content; + card.Title = title; + + return BuildResponse(speechResponse, false, sessionAttributes, reprompt, card); + } #endregion #region AudioPlayer Response diff --git a/Alexa.NET/project.json b/Alexa.NET/project.json index 4586a2c..d8a9e3e 100644 --- a/Alexa.NET/project.json +++ b/Alexa.NET/project.json @@ -1,7 +1,7 @@ { "name": "Alexa.NET", "title": "Alexa.NET", - "version": "1.0.0-beta-5", + "version": "1.0.0-beta-6", "authors": [ "Tim Heuer" ], "description": "A simple .NET Core library for handling Alexa Skill request/responses.", @@ -27,6 +27,6 @@ "repository": { "url": "https://github.com/timheuer/alexa-skills-dotnet" }, "requireLicenseAcceptance": false, "tags": [ "amazon", "alexa", "echo", "dot", "echo dot", "skills" ], - "releaseNotes": "Updated to include Locale, Audio request, and PlayerController request support." + "releaseNotes": "Added AskWithCard options" } }