ask_sdk_model.services.skill_messaging package

Submodules

Note

Canonical imports have been added in the __init__.py of the package. This helps in importing the class directly from the package, than through the module.

For eg: if package a has module b with class C, you can do from a import C instead of from a.b import C.

ask_sdk_model.services.skill_messaging.error module

class ask_sdk_model.services.skill_messaging.error.Error(code=None, message=None)

Bases: object

Parameters:
  • code ((optional) int) –
  • message ((optional) str) –
attribute_map = {'code': 'code', 'message': 'message'}
deserialized_types = {'code': 'int', 'message': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.services.skill_messaging.send_skill_messaging_request module

class ask_sdk_model.services.skill_messaging.send_skill_messaging_request.SendSkillMessagingRequest(data=None, expires_after_seconds=None)

Bases: object

The message that needs to be sent to the skill

Parameters:
  • data ((optional) object) – The payload data to send with the message. The data must be in the form of JSON-formatted key-value pairs. Both keys and values must be of type String. The total size of the data cannot be greater than 6KB. For calculation purposes, this includes keys and values, the quotes that surround them, the ":" character that separates them, the commas that separate the pairs, and the opening and closing braces around the field. However, any whitespace between key/value pairs is not included in the calculation of the payload size. If the message does not include payload data, as in the case of a sync message, you can pass in an empty JSON object "{}".
  • expires_after_seconds ((optional) int) – The number of seconds that the message will be retained to retry if message delivery is not successful. Allowed values are from 60 (1 minute) to 86400 (1 day), inclusive. The default is 3600 (1 hour). Multiple retries may occur during this interval. The retry logic is exponential. The first retry executes after 30 seconds, and this time period doubles on every retry. The retries will end when the total time elapsed since the message was first sent has exceeded the value you provided for expiresAfterSeconds. Message expiry is rarely a problem if the message handler has been set up correctly. With a correct setup, you will receive the message once promptly. This mechanism for retries is provided as a safeguard in case your skill goes down during a message delivery.
attribute_map = {'data': 'data', 'expires_after_seconds': 'expiresAfterSeconds'}
deserialized_types = {'data': 'object', 'expires_after_seconds': 'int'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.services.skill_messaging.skill_messaging_service_client module

class ask_sdk_model.services.skill_messaging.skill_messaging_service_client.SkillMessagingServiceClient(api_configuration, authentication_configuration, lwa_client=None, custom_user_agent=None)

Bases: ask_sdk_model.services.base_service_client.BaseServiceClient

ServiceClient for calling the SkillMessagingService APIs.

Parameters:api_configuration (ask_sdk_model.services.api_configuration.ApiConfiguration) – Instance of ApiConfiguration
send_skill_message(user_id, send_skill_messaging_request, **kwargs)

Send a message request to a skill for a specified user.

Parameters:
  • user_id (str) – (required) The user Id for the specific user to send the message
  • send_skill_messaging_request (ask_sdk_model.services.skill_messaging.send_skill_messaging_request.SendSkillMessagingRequest) – (required) Message Request to be sent to the skill.
  • full_response (boolean) – Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False.
Return type:

Union[ApiResponse, Error]