Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support for video app interface issue #188 #189

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions flask_ask/models.py
Expand Up @@ -86,6 +86,7 @@ def list_display_render(self, template=None, title=None, backButton='HIDDEN', to
'type': 'Display.RenderTemplate',
'template': {
'type': template,
'token': token,
'backButton': backButton,
'backgroundImage': {
'sources': [
Expand Down Expand Up @@ -151,6 +152,25 @@ def display_render(self, template=None, title=None, backButton='HIDDEN', token=N
self._response['directives'] = directive
return self

def video_app_interface(self, source=None, title=None, subtitle=None):
directive = [
{
"type": "VideoApp.Launch",
"videoItem":
{
"source": source,
"metadata": {
"title": title,
"subtitle": subtitle
}
}
}
]

self._response['directives'] = directive
self._response.pop('shouldEndSession', None)
return self

def link_account_card(self):
card = {'type': 'LinkAccount'}
self._response['card'] = card
Expand Down