Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ImageHelper

Responsible for building image object using ask-sdk-model in Alexa skills kit display interface https://developer.amazon.com/docs/custom-skills/display-interface-reference.html#image-object-specifications.

Hierarchy

  • ImageHelper

Index

Properties

Protected image

image: Image

Methods

addImageInstance

  • addImageInstance(url: string, size?: ImageSize, widthPixels?: number, heightPixels?: number): this
  • Add image instance in image object

    Parameters

    • url: string

      source of the image

    • Optional size: ImageSize

      size of the image. Accepted values: X_SMALL: Displayed within extra small containers SMALL: Displayed within small containers MEDIUM: Displayed within medium containers LARGE: Displayed within large containers X_LARGE Displayed within extra large containers By default, for Echo Show, size takes the value X_SMALL. If the other size values are included, then the order of precedence for displaying images begins with X_LARGE and proceeds downward, which means that larger images will be downscaled for display on Echo Show if provided. For the best user experience, include the appropriately sized image, and do not include larger images.

    • Optional widthPixels: number

      widthPixels of the image

    • Optional heightPixels: number

      heightPixels of the image

    Returns this

getImage

  • getImage(): Image

withDescription

  • withDescription(description: string): this