Created
June 26, 2020 15:27
-
-
Save thiagoavadore/676493e548f4a2f4c8a354abff956c85 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
def build_response_card(title, subtitle, options): | |
buttons = None | |
if options is not None: | |
buttons = [] | |
for i in range(min(5, len(options))): | |
buttons.append(options[i]) | |
return { | |
'contentType': 'application/vnd.amazonaws.card.generic', | |
'version': 1, | |
'genericAttachments': [{ | |
'title': title, | |
'subTitle': subtitle, | |
'buttons': buttons | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment