Skip to content

Commit

Permalink
docs: add ASK SDK Utilities page for jp docs (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
hideokamoto authored and ShenChen93 committed May 31, 2019
1 parent 976e0a1 commit 270b7a6
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 1 deletion.
54 changes: 54 additions & 0 deletions docs/ja/ASK-SDK-Utilities.rst
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;
11 changes: 10 additions & 1 deletion docs/ja/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
Managing-Attributes
Calling-Alexa-Service-APIs
Configuring-Skill-Instance
ASK-SDK-Utilities

.. toctree::
:caption: REFERENCE
Expand Down Expand Up @@ -134,6 +135,13 @@ APIにアクセスする方法を説明します。.

スキルインスタンスの構成と作成の方法を説明します。


`ユーティリティ`_
--------------------

ユーティリティ関数の使い方を説明します。


フィードバック
================

Expand All @@ -146,4 +154,5 @@ Alexaの機能に関するリクエストや投票は、\ `こちら <https://al
.. _応答のビルド: Building-Response.html
.. _アトリビュートの管理: Managing-Attributes.html
.. _AlexaサービスAPIの呼び出し: Calling-Alexa-Service-APIs.html
.. _スキルビルダー: Configuring-Skill-Instance.html
.. _スキルビルダー: Configuring-Skill-Instance.html
.. _ASK SDK Utilities: ASK-SDK-Utilities.html

0 comments on commit 270b7a6

Please sign in to comment.