Preview environment

class MediaGalleryBuilder

external
declare class MediaGalleryBuilder extends ComponentBuilder<APIMediaGalleryComponent>

A builder that creates API-compatible JSON data for a container.

Constructors

constructor()

Creates a new media gallery from API data.

readonlyexternal
data : Partial<APIMediaGalleryComponent>

The API data associated with this component.

Inherited from: ComponentBuilder

readonlyexternal
items : MediaGalleryItemBuilder[]

The components within this container.

Adds items to this media gallery.

external
clearId() : this

Clears the id of this component, defaulting to a default incremented id.

Inherited from: ComponentBuilder

external
setId(
id: number
) : this

Sets the id (not the custom id) for this component.

Inherited from: ComponentBuilder

external
spliceItems() : this

Removes, replaces, or inserts media gallery items for this media gallery.

external
toJSON() : APIMediaGalleryComponent

Serializes this builder to API-compatible JSON data.