MediaCard Class

Media card

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Constructor

MediaCard(*, title: str | None = None, subtitle: str | None = None, text: str | None = None, image: ThumbnailUrl | None = None, media: List[MediaUrl] | None = None, buttons: List[CardAction] | None = None, shareable: bool | None = None, autoLoop: bool | None = None, autoStart: bool | None = None, aspect: str | None = None, duration: str | None = None, value: Any | None = None, **extra_data: Any)

Keyword-Only Parameters

Name Description
title
Default value: None
subtitle
Default value: None
text
Default value: None
image
Default value: None
media
Default value: None
buttons
Default value: None
shareable
Default value: None
autoLoop
Default value: None
autoStart
Default value: None
aspect
Default value: None
duration
Default value: None
value
Default value: None

Attributes

aspect

3"

aspect: str | None

auto_loop

true)

auto_loop: bool | None

auto_start

true)

auto_start: bool | None

buttons

Actions on this card

buttons: List[CardAction] | None

duration

Length of media content. Formatted as an ISO 8601 Duration field.

duration: str | None

image

Thumbnail placeholder

image: ThumbnailUrl | None

media

Media URLs. When this field contains more than one URL, each URL is an alt format of the same content.

media: List[MediaUrl] | None

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_config: ClassVar[ConfigDict] = {'alias_generator': AliasGenerator(alias=None, validation_alias=<staticmethod(<function CustomBaseModel.validation_alias_generator>)>, serialization_alias=<staticmethod(<function CustomBaseModel.serialization_alias_generator>)>), 'arbitrary_types_allowed': True, 'extra': 'allow', 'populate_by_name': True, 'serialize_by_alias': True, 'validate_by_alias': True, 'validate_by_name': True}

shareable

true)

shareable: bool | None

subtitle

Subtitle of this card

subtitle: str | None

text

Text of this card

text: str | None

title

Title of this card

title: str | None

value

Supplementary parameter for this card

value: Any | None