-
Notifications
You must be signed in to change notification settings - Fork 733
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add ASK SDK Utilities page for jp docs (#543)
- Loading branch information
1 parent
976e0a1
commit 270b7a6
Showing
2 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
***************** | ||
ユーティリティ | ||
***************** | ||
|
||
The SDK provides mutiple utility functions that aims to reduce boilerplate code so that you can focus on skill business logic. | ||
|
||
RequestEnvelopeUtils | ||
==================== | ||
|
||
The ``RequestEnvelopeUtils`` provides functions for getting frequently used attributes from the ``RequestEnvelope`` with error checking logic. | ||
|
||
Available Methods | ||
----------------- | ||
|
||
.. code-block:: typescript | ||
getLocale(requestEnvelope: RequestEnvelope): string; | ||
getRequestType(requestEnvelope: RequestEnvelope): string; | ||
getIntentName(requestEnvelope: RequestEnvelope): string; | ||
getAccountLinkingAccessToken(requestEnvelope: RequestEnvelope): string; | ||
getApiAccessToken(requestEnvelope: RequestEnvelope): string; | ||
getDeviceId(requestEnvelope: RequestEnvelope): string; | ||
getDialogState(requestEnvelope: RequestEnvelope): string; | ||
getSlot(requestEnvelope: RequestEnvelope, slotName: string): Slot; | ||
getSlotValue(requestEnvelope: RequestEnvelope, slotName: string): string; | ||
getSupportedInterfaces(requestEnvelope: RequestEnvelope): SupportedInterfaces; | ||
isNewSession(requestEnvelope: RequestEnvelope): boolean; | ||
SsmlUtils | ||
========= | ||
|
||
The ``SsmlUtils`` provides a function for escaping invalid SSML characters in a speech string. | ||
|
||
Available Methods | ||
----------------- | ||
|
||
.. code-block:: typescript | ||
escapeXmlCharacters(input: string): string | ||
ViewportUtils | ||
============= | ||
|
||
The ``ViewportUtils`` provides functions for checking the viewport profile and other device characteristics such as display size or dpi in the ``RequestEnvelope``. | ||
|
||
Available Methods | ||
----------------- | ||
|
||
.. code-block:: typescript | ||
getViewportOrientation(width: number, height: number): ViewportOrientation; | ||
getViewportSizeGroup(size: number): ViewportSizeGroup; | ||
getViewportDpiGroup(dpi: number): ViewportDpiGroup; | ||
getViewportProfile(requestEnvelope: RequestEnvelope): ViewportProfile; |
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