SMAPI¶
SMAPI Builder Components¶
-
class
ask_smapi_sdk.smapi_builder.
SmapiClientBuilder
¶ Bases:
object
Abstract SmapiClient Builder for building
ask_smapi_model.services.skill_management.SkillManagementServiceClient
object.-
api_endpoint
¶ Returns the Endpoint to hit by the SMAPI Service.
Returns: Endpoint to hit by the SMAPI service client. Return type: str
-
client
()¶
-
-
class
ask_smapi_sdk.smapi_builder.
StandardSmapiClientBuilder
(client_id, client_secret, refresh_token)¶ Bases:
ask_smapi_sdk.smapi_builder.SmapiClientBuilder
Standard SmapiClient Builder class used to generate
ask_smapi_model.services.skill_management.SkillManagementServiceClient
object with default Serializer and ApiClient implementations.Parameters: -
client
()¶ Creates the smapi client object using AuthenticationConfiguration and ApiConfiguration registered values.
Returns: A smapi object that can be used for making SMAPI method invocations. Return type: ask_smapi_model.services.skill_management.SkillManagementServiceClient
-
-
class
ask_smapi_sdk.smapi_builder.
CustomSmapiClientBuilder
(client_id, client_secret, refresh_token, serializer=None, api_client=None)¶ Bases:
ask_smapi_sdk.smapi_builder.SmapiClientBuilder
Smapi Custom Builder with serializer, api_client and api_endpoint setter functions.
This builder is used to create an instance of
ask_smapi_model.services.skill_management.SkillManagementServiceClient
with default Serializers and ApiClient implementations.-
api_endpoint
¶ Returns the Endpoint to hit by the SMAPI Service.
Returns: Endpoint to hit by the SMAPI service client. Return type: str
-
client
()¶ Creates the smapi client object using AuthenticationConfiguration and ApiConfiguration registered values.
Returns: A smapi object that can be used for making SMAPI method invocations. Return type: ask_smapi_model.services.skill_management.SkillManagementServiceClient
-
General Utilities¶
-
ask_smapi_sdk.utils.
get_header_value
(header_list, key)¶ Filter the header_list with provided key value.
This method is used to parse through the header list obtained from the SMAPI response header object and retrieve list of specific tuple objects with keys like Location, RequestId etc if present.
Parameters: - header_list – The list of response headers returned from Alexa SKill Management API calls.
- key – The field value which needs to be retrieved.
Type: Type: Returns: Returns the list field values if present, since there maybe multiple tuples with same key values.
Return type: