Something went wrong. Try again.
a fork of EvalEx by ezylang with a handful of breaking changes
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960from dataclasses import dataclass
from cross.media import Blob
@dataclass(kw_only=True)class Attachment: pass
# self labels, like CWs, or adult content labels@dataclass(kw_only=True)class LabelsAttachment(Attachment): labels: list[str]
# languages used in the post@dataclass(kw_only=True)class LanguagesAttachment(Attachment): langs: list[str]
# if media on this post is considered sensitive@dataclass(kw_only=True)class SensitiveAttachment(Attachment): sensitive: bool
# link to the post on the current service@dataclass(kw_only=True)class RemoteUrlAttachment(Attachment): url: str
# any media attachment. image, video, audio, flash games, etc.@dataclass(kw_only=True)class MediaAttachment(Attachment): blobs: list[Blob]
# quote of some post on the same service@dataclass(kw_only=True)class QuoteAttachment(Attachment): quoted_id: str quoted_user: str
# embed to an external website@dataclass(kw_only=True)class ExternalEmbedAttachment(Attachment): uri: str title: str | None desc: str | None
# out-of-band tags (the correct kind of tags)@dataclass(kw_only=True)class TagsAttachment(Attachment): tags: list[str]