Constructor

BrowseItem

new BrowseItem(title, url)

Constructor for BrowseItem. Accepts a title and URL for the Browse Item card.

Parameter

title

Optional

string

The title of the Browse Item card.

url

Optional

string

The URL of the link opened by clicking the Browse Item card.

Properties

description

string

Description text of the item. Optional.

string

Footer text of the item. Optional.

image

Image

Image to show on item. Optional.

openUrlAction

Object

Url to that clicking the card opens. Optional.

title

string

Title of the option item. Required.

Methods

setDescription

setDescription(description) returns BrowseItem

Sets the description for this Browse Item.

Parameter

description

string

Description to show on item.

Returns

BrowseItem Returns current constructed BrowseItem.

setFooter

setFooter(footerText) returns BrowseItem

Sets the footer for this Browse Item.

Parameter

footerText

string

text to show on item.

Returns

BrowseItem Returns current constructed BrowseItem.

setImage

setImage(url, accessibilityText, width, height) returns BrowseItem

Sets the image for this Browse Item.

Parameter

url

string

Image source URL.

accessibilityText

string

Text to replace for image for accessibility.

width

Optional

number

Width of the image.

height

Optional

number

Height of the image.

Returns

BrowseItem Returns current constructed BrowseItem.

setOpenUrlAction

setOpenUrlAction(url, urlTypeHint) returns BrowseItem

Sets the Open URL action - which includes the url and possibly the typeHint

Parameter

url

string

Image source URL.

urlTypeHint

string

One of the typeHints enumerated by this.urlTypeHints()

Value must not be null.

Returns

BrowseItem Returns the current constructed BrowseItem

setTitle

setTitle(title) returns OptionItem

Sets the title for this Option Item.

Parameter

title

string

Title to show on item.

Returns

OptionItem Returns current constructed OptionItem.

setUrl

setUrl(url) returns BrowseItem

Sets the URL target of the BrowseItem card

Parameter

url

string

Image source URL.

Returns

BrowseItem Returns the current constructed BrowseItem

setUrlTypeHint

setUrlTypeHint(urlTypeHint) returns BrowseItem

Sets the URL type hint for the BrowseItem card

Parameter

urlTypeHint

string

One of the typeHints enumerated by this.urlTypeHints()

Value must not be null.

Returns

BrowseItem Returns the current constructed BrowseItem

urlTypeHints

urlTypeHints() returns Object

Returns

Object Returns the possible valid values for URL type hints