Skip to content

LinkPreview

Bases: BaseModel

Dataclass to representing a link preview.

Attributes:

Name Type Description
base64_thumbnail str | None

The base64 encoded thumbnail of the link preview, if available.

title str

The title of the link preview.

description str | None

The description of the link preview, if available.

url str

The url of the link preview.

id str | None

The local filename for a received link preview.

Source code in src/signalbot/link_previews.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
class LinkPreview(BaseModel):
    """Dataclass to representing a link preview.

    Attributes:
        base64_thumbnail: The base64 encoded thumbnail of the link preview, if
            available.
        title: The title of the link preview.
        description: The description of the link preview, if available.
        url: The url of the link preview.
        id: The local filename for a received link preview.
    """

    base64_thumbnail: str | None
    title: str
    description: str | None
    url: str
    id: str | None = None