class MediaGalleryBuilder

declare class MediaGalleryBuilder extends ComponentBuilder<APIMediaGalleryComponent>

Constructors

constructor()

Creates a new media gallery from API data.

protectedreadonly
data : MediaGalleryBuilderData

readonly
items : readonly MediaGalleryItemBuilder[]

The items in this media gallery.

Adds a media gallery item to this media gallery.

clearId() : this

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

Inherited from: ComponentBuilder

setId(
id: number
) : this

Sets the id of this component.

Inherited from: ComponentBuilder

spliceItems() : this

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

toJSON(
validationOverride?: boolean
) : APIMediaGalleryComponent

Serializes this builder to API-compatible JSON data.Note that by disabling validation, there is no guarantee that the resulting object will be valid.