Skip to content

Commit

Permalink
Fix timheuer#15 to add AskWithCard option
Browse files Browse the repository at this point in the history
  • Loading branch information
timheuer committed Apr 7, 2017
1 parent 50c0c97 commit 41a8acf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
15 changes: 14 additions & 1 deletion Alexa.NET/ResponseBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Alexa.NET/project.json
Original file line number Diff line number Diff line change
@@ -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.",

Expand All @@ -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"
}
}

0 comments on commit 41a8acf

Please sign in to comment.