Created
November 29, 2017 18:06
-
-
Save frogermcs/c3328d436f07bff12191d8536b7f78a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FactsRepository { | |
//... | |
getWaterFactRichResponse(waterFact) { | |
return this.dialogflowApp.buildRichResponse() | |
.addSimpleResponse(Str.CARD_SIMPLE_RESPONSE) | |
.addBasicCard(this.dialogflowApp | |
.buildBasicCard(waterFact.TEXT) | |
.setTitle(waterFact.TITLE) | |
.addButton(waterFact.BUTTON, waterFact.LINK) | |
.setImage(waterFact.TITLE_IMG_URL, waterFact.TITLE_IMG) | |
) | |
} | |
getWaterFactAudioTextResponse(waterFact) { | |
return waterFact.SPEECH_TEXT; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment