Skip to content

Commit

Permalink
This release contains the following :
Browse files Browse the repository at this point in the history
- Model updates for Location Services.
- Model updates for GameEngine Interface.
  • Loading branch information
nikhilym committed Dec 13, 2018
1 parent 6a38ce9 commit df3da15
Show file tree
Hide file tree
Showing 49 changed files with 1,331 additions and 233 deletions.
24 changes: 24 additions & 0 deletions ask-sdk-model/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,27 @@ CHANGELOG
graphics, images, slideshows, and video, and to customize them for
different device types.



1.4.0
~~~~~~~

This release includes the following:
- Models for [CanFulfillIntentRequest, for Name-free Interactions](https://developer.amazon.com/docs/custom-skills/implement-canfulfillintentrequest-for-name-free-interaction.html)


1.5.0
~~~~~~~

This release includes the following :

- Models for Location Services.
- Updated models for Game engine interface.


1.5.1
^^^^^^^

This release includes the following:

- Updated interfaces for Location Services
2 changes: 1 addition & 1 deletion ask-sdk-model/ask_sdk_model/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
__pip_package_name__ = 'ask-sdk-model'
__description__ = 'The ASK SDK Model package provides model definitions, for building Alexa Skills.'
__url__ = 'https://github.com/alexa/alexa-apis-for-python'
__version__ = '1.3.0'
__version__ = '1.5.1'
__author__ = 'Alexa Skills Kit'
__author_email__ = 'ask-sdk-dynamic@amazon.com'
__license__ = 'Apache 2.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,54 +37,53 @@ class CanFulfillIntentRequest(Request):
:type request_id: (optional) str
:param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service.
:type timestamp: (optional) datetime
:param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types.
:type locale: (optional) str
:param dialog_state:
:type dialog_state: (optional) ask_sdk_model.dialog_state.DialogState
:param intent:
:type intent: (optional) ask_sdk_model.intent.Intent
:param locale: A string indicating the user’s locale. For example: en-US.
:type locale: (optional) str
"""
deserialized_types = {
'object_type': 'str',
'request_id': 'str',
'timestamp': 'datetime',
'locale': 'str',
'dialog_state': 'ask_sdk_model.dialog_state.DialogState',
'intent': 'ask_sdk_model.intent.Intent',
'locale': 'str'
'intent': 'ask_sdk_model.intent.Intent'
}

attribute_map = {
'object_type': 'type',
'request_id': 'requestId',
'timestamp': 'timestamp',
'locale': 'locale',
'dialog_state': 'dialogState',
'intent': 'intent',
'locale': 'locale'
'intent': 'intent'
}

def __init__(self, request_id=None, timestamp=None, dialog_state=None, intent=None, locale=None):
# type: (Optional[str], Optional[datetime], Optional[DialogState], Optional[Intent], Optional[str]) -> None
def __init__(self, request_id=None, timestamp=None, locale=None, dialog_state=None, intent=None):
# type: (Optional[str], Optional[datetime], Optional[str], Optional[DialogState], Optional[Intent]) -> None
"""An object that represents a request made to skill to query whether the skill can understand and fulfill the intent request with detected slots, before actually asking the skill to take action. Skill should be aware this is not to actually take action, skill should handle this request without causing side-effect, skill should not modify some state outside its scope or has an observable interaction with its calling functions or the outside world besides returning a value, such as playing sound,turning on/off lights, committing a transaction or a charge.
:param request_id: Represents the unique identifier for the specific request.
:type request_id: (optional) str
:param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service.
:type timestamp: (optional) datetime
:param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types.
:type locale: (optional) str
:param dialog_state:
:type dialog_state: (optional) ask_sdk_model.dialog_state.DialogState
:param intent:
:type intent: (optional) ask_sdk_model.intent.Intent
:param locale: A string indicating the user’s locale. For example: en-US.
:type locale: (optional) str
"""
self.__discriminator_value = "CanFulfillIntentRequest"

self.object_type = self.__discriminator_value
super(CanFulfillIntentRequest, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp)
super(CanFulfillIntentRequest, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp, locale=locale)
self.dialog_state = dialog_state
self.intent = intent
self.locale = locale

def to_dict(self):
# type: () -> Dict[str, object]
Expand Down
12 changes: 10 additions & 2 deletions ask-sdk-model/ask_sdk_model/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from typing import Dict, List, Optional
from datetime import datetime
from ask_sdk_model.interfaces.system.system_state import SystemState
from ask_sdk_model.interfaces.geolocation.geolocation_state import GeolocationState
from ask_sdk_model.interfaces.audioplayer.audio_player_state import AudioPlayerState
from ask_sdk_model.interfaces.viewport.viewport_state import ViewportState
from ask_sdk_model.interfaces.display.display_state import DisplayState
Expand All @@ -38,6 +39,8 @@ class Context(object):
:type audio_player: (optional) ask_sdk_model.interfaces.audioplayer.audio_player_state.AudioPlayerState
:param display: Provides the current state for the Display interface.
:type display: (optional) ask_sdk_model.interfaces.display.display_state.DisplayState
:param geolocation: Provides the last gathered geolocation information of the device.
:type geolocation: (optional) ask_sdk_model.interfaces.geolocation.geolocation_state.GeolocationState
:param viewport: Provides the characteristics of a device's viewport.
:type viewport: (optional) ask_sdk_model.interfaces.viewport.viewport_state.ViewportState
Expand All @@ -46,18 +49,20 @@ class Context(object):
'system': 'ask_sdk_model.interfaces.system.system_state.SystemState',
'audio_player': 'ask_sdk_model.interfaces.audioplayer.audio_player_state.AudioPlayerState',
'display': 'ask_sdk_model.interfaces.display.display_state.DisplayState',
'geolocation': 'ask_sdk_model.interfaces.geolocation.geolocation_state.GeolocationState',
'viewport': 'ask_sdk_model.interfaces.viewport.viewport_state.ViewportState'
}

attribute_map = {
'system': 'System',
'audio_player': 'AudioPlayer',
'display': 'Display',
'geolocation': 'Geolocation',
'viewport': 'Viewport'
}

def __init__(self, system=None, audio_player=None, display=None, viewport=None):
# type: (Optional[SystemState], Optional[AudioPlayerState], Optional[DisplayState], Optional[ViewportState]) -> None
def __init__(self, system=None, audio_player=None, display=None, geolocation=None, viewport=None):
# type: (Optional[SystemState], Optional[AudioPlayerState], Optional[DisplayState], Optional[GeolocationState], Optional[ViewportState]) -> None
"""
:param system: Provides information about the current state of the Alexa service and the device interacting with your skill.
Expand All @@ -66,6 +71,8 @@ def __init__(self, system=None, audio_player=None, display=None, viewport=None):
:type audio_player: (optional) ask_sdk_model.interfaces.audioplayer.audio_player_state.AudioPlayerState
:param display: Provides the current state for the Display interface.
:type display: (optional) ask_sdk_model.interfaces.display.display_state.DisplayState
:param geolocation: Provides the last gathered geolocation information of the device.
:type geolocation: (optional) ask_sdk_model.interfaces.geolocation.geolocation_state.GeolocationState
:param viewport: Provides the characteristics of a device's viewport.
:type viewport: (optional) ask_sdk_model.interfaces.viewport.viewport_state.ViewportState
"""
Expand All @@ -74,6 +81,7 @@ def __init__(self, system=None, audio_player=None, display=None, viewport=None):
self.system = system
self.audio_player = audio_player
self.display = display
self.geolocation = geolocation
self.viewport = viewport

def to_dict(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class AccountLinkedRequest(Request):
:type request_id: (optional) str
:param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service.
:type timestamp: (optional) datetime
:param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types.
:type locale: (optional) str
:param body:
:type body: (optional) ask_sdk_model.events.skillevents.account_linked_body.AccountLinkedBody
:param event_creation_time:
Expand All @@ -48,6 +50,7 @@ class AccountLinkedRequest(Request):
'object_type': 'str',
'request_id': 'str',
'timestamp': 'datetime',
'locale': 'str',
'body': 'ask_sdk_model.events.skillevents.account_linked_body.AccountLinkedBody',
'event_creation_time': 'datetime',
'event_publishing_time': 'datetime'
Expand All @@ -57,19 +60,22 @@ class AccountLinkedRequest(Request):
'object_type': 'type',
'request_id': 'requestId',
'timestamp': 'timestamp',
'locale': 'locale',
'body': 'body',
'event_creation_time': 'eventCreationTime',
'event_publishing_time': 'eventPublishingTime'
}

def __init__(self, request_id=None, timestamp=None, body=None, event_creation_time=None, event_publishing_time=None):
# type: (Optional[str], Optional[datetime], Optional[AccountLinkedBody], Optional[datetime], Optional[datetime]) -> None
def __init__(self, request_id=None, timestamp=None, locale=None, body=None, event_creation_time=None, event_publishing_time=None):
# type: (Optional[str], Optional[datetime], Optional[str], Optional[AccountLinkedBody], Optional[datetime], Optional[datetime]) -> None
"""This event indicates that a customer has linked an account in a third-party application with the Alexa app. This event is useful for an application that support out-of-session (non-voice) user interactions so that this application can be notified when the internal customer can be associated with the Alexa customer. This event is required for many applications that synchronize customer Alexa lists with application lists. During the account linking process, the Alexa app directs the user to the skill website where the customer logs in. When the customer logs in, the skill then provides an access token and a consent token to Alexa. The event includes the same access token and consent token.
:param request_id: Represents the unique identifier for the specific request.
:type request_id: (optional) str
:param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service.
:type timestamp: (optional) datetime
:param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types.
:type locale: (optional) str
:param body:
:type body: (optional) ask_sdk_model.events.skillevents.account_linked_body.AccountLinkedBody
:param event_creation_time:
Expand All @@ -80,7 +86,7 @@ def __init__(self, request_id=None, timestamp=None, body=None, event_creation_ti
self.__discriminator_value = "AlexaSkillEvent.SkillAccountLinked"

self.object_type = self.__discriminator_value
super(AccountLinkedRequest, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp)
super(AccountLinkedRequest, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp, locale=locale)
self.body = body
self.event_creation_time = event_creation_time
self.event_publishing_time = event_publishing_time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class PermissionAcceptedRequest(Request):
:type request_id: (optional) str
:param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service.
:type timestamp: (optional) datetime
:param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types.
:type locale: (optional) str
:param body:
:type body: (optional) ask_sdk_model.events.skillevents.permission_body.PermissionBody
:param event_creation_time:
Expand All @@ -46,6 +48,7 @@ class PermissionAcceptedRequest(Request):
'object_type': 'str',
'request_id': 'str',
'timestamp': 'datetime',
'locale': 'str',
'body': 'ask_sdk_model.events.skillevents.permission_body.PermissionBody',
'event_creation_time': 'datetime',
'event_publishing_time': 'datetime'
Expand All @@ -55,19 +58,22 @@ class PermissionAcceptedRequest(Request):
'object_type': 'type',
'request_id': 'requestId',
'timestamp': 'timestamp',
'locale': 'locale',
'body': 'body',
'event_creation_time': 'eventCreationTime',
'event_publishing_time': 'eventPublishingTime'
}

def __init__(self, request_id=None, timestamp=None, body=None, event_creation_time=None, event_publishing_time=None):
# type: (Optional[str], Optional[datetime], Optional[PermissionBody], Optional[datetime], Optional[datetime]) -> None
def __init__(self, request_id=None, timestamp=None, locale=None, body=None, event_creation_time=None, event_publishing_time=None):
# type: (Optional[str], Optional[datetime], Optional[str], Optional[PermissionBody], Optional[datetime], Optional[datetime]) -> None
"""
:param request_id: Represents the unique identifier for the specific request.
:type request_id: (optional) str
:param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service.
:type timestamp: (optional) datetime
:param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types.
:type locale: (optional) str
:param body:
:type body: (optional) ask_sdk_model.events.skillevents.permission_body.PermissionBody
:param event_creation_time:
Expand All @@ -78,7 +84,7 @@ def __init__(self, request_id=None, timestamp=None, body=None, event_creation_ti
self.__discriminator_value = "AlexaSkillEvent.SkillPermissionAccepted"

self.object_type = self.__discriminator_value
super(PermissionAcceptedRequest, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp)
super(PermissionAcceptedRequest, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp, locale=locale)
self.body = body
self.event_creation_time = event_creation_time
self.event_publishing_time = event_publishing_time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class PermissionChangedRequest(Request):
:type request_id: (optional) str
:param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service.
:type timestamp: (optional) datetime
:param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types.
:type locale: (optional) str
:param body:
:type body: (optional) ask_sdk_model.events.skillevents.permission_body.PermissionBody
:param event_creation_time:
Expand All @@ -46,6 +48,7 @@ class PermissionChangedRequest(Request):
'object_type': 'str',
'request_id': 'str',
'timestamp': 'datetime',
'locale': 'str',
'body': 'ask_sdk_model.events.skillevents.permission_body.PermissionBody',
'event_creation_time': 'datetime',
'event_publishing_time': 'datetime'
Expand All @@ -55,19 +58,22 @@ class PermissionChangedRequest(Request):
'object_type': 'type',
'request_id': 'requestId',
'timestamp': 'timestamp',
'locale': 'locale',
'body': 'body',
'event_creation_time': 'eventCreationTime',
'event_publishing_time': 'eventPublishingTime'
}

def __init__(self, request_id=None, timestamp=None, body=None, event_creation_time=None, event_publishing_time=None):
# type: (Optional[str], Optional[datetime], Optional[PermissionBody], Optional[datetime], Optional[datetime]) -> None
def __init__(self, request_id=None, timestamp=None, locale=None, body=None, event_creation_time=None, event_publishing_time=None):
# type: (Optional[str], Optional[datetime], Optional[str], Optional[PermissionBody], Optional[datetime], Optional[datetime]) -> None
"""
:param request_id: Represents the unique identifier for the specific request.
:type request_id: (optional) str
:param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service.
:type timestamp: (optional) datetime
:param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types.
:type locale: (optional) str
:param body:
:type body: (optional) ask_sdk_model.events.skillevents.permission_body.PermissionBody
:param event_creation_time:
Expand All @@ -78,7 +84,7 @@ def __init__(self, request_id=None, timestamp=None, body=None, event_creation_ti
self.__discriminator_value = "AlexaSkillEvent.SkillPermissionChanged"

self.object_type = self.__discriminator_value
super(PermissionChangedRequest, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp)
super(PermissionChangedRequest, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp, locale=locale)
self.body = body
self.event_creation_time = event_creation_time
self.event_publishing_time = event_publishing_time
Expand Down
Loading

0 comments on commit df3da15

Please sign in to comment.