Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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