Skip to content

Instantly share code, notes, and snippets.

@circa10a
Created February 9, 2020 23:32
Show Gist options
  • Save circa10a/c2097b2ef83122a6e71c6a2660263919 to your computer and use it in GitHub Desktop.
Save circa10a/c2097b2ef83122a6e71c6a2660263919 to your computer and use it in GitHub Desktop.
func buildFulfillment() *Response {
return &Response{
Payload{
Google{
ExpectUserResponse: false,
RichResponse: RichResponse{
Items: []Item{
{
SimpleResponse: &SimpleResponse{
TextToSpeech: "This is the default audio response",
},
},
{
CarouselBrowse: &CarouselBrowse{
Items: []CarouselItem{
CarouselItem{
Title: "Title1",
Description: "Description1",
OpenURLAction: OpenURLAction{
URL: "https://example.com/1",
},
},
CarouselItem{
Title: "Title2",
Description: "Description2",
OpenURLAction: OpenURLAction{
URL: "https://example.com/2",
},
},
},
},
},
},
},
},
},
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment