A builder that creates API-compatible JSON data for a container.
Creates a new media gallery from API data.
Example
Creating a media gallery from an API data object:Example
Creating a media gallery using setters and API data:| Name | Type | Optional | Description |
|---|---|---|---|
| data | Partial<APIMediaGalleryComponent> | Yes | The API data to create this media gallery with |
Readonly
The API data associated with this component.
Inherited from ComponentBuilderAdds items to this media gallery.
| Name | Type | Optional | Description |
|---|---|---|---|
| ...items | RestOrArray<APIMediaGalleryItem | MediaGalleryItemBuilder | ((builder: MediaGalleryItemBuilder) => MediaGalleryItemBuilder)> | No | The items to add |
Clears the id of this component, defaulting to a default incremented id.
Inherited from ComponentBuilderSets the id (not the custom id) for this component.
| Name | Type | Optional | Description |
|---|---|---|---|
| id | number | No | The id for this component |
Removes, replaces, or inserts media gallery items for this media gallery.
| Name | Type | Optional | Description |
|---|---|---|---|
| index | number | No | The index to start removing, replacing or inserting items |
| deleteCount | number | No | The amount of items to remove |
| ...items | RestOrArray<APIMediaGalleryItem | MediaGalleryItemBuilder | ((builder: MediaGalleryItemBuilder) => MediaGalleryItemBuilder)> | No | The items to insert |
Serializes this builder to API-compatible JSON data.