Nadia.InputPaidMedia (nadia v1.6.0)

View Source

Typed builders for Telegram InputPaidMedia objects.

The builder fixes the Telegram type discriminator, omits nil options, and preserves explicit false values.

Media and cover fields accept Telegram file IDs, supported HTTP URLs, or Nadia.InputFile values. Thumbnails must be fresh JPEG multipart uploads; use Nadia.InputFile.path/2, bytes/3, or stream/3. A non-empty manual attach:// reference is also accepted for compatibility. Live-photo video and photo fields do not support URLs.

Summary

Types

t()

A typed Telegram InputPaidMedia value. Its representation is opaque.

Functions

Builds a paid live-photo object from its video and static photo.

Builds a paid photo object.

Builds a paid video object.

Types

options()

@type options() :: keyword() | map()

source()

@type source() :: binary() | Nadia.InputFile.t()

t()

@opaque t()

A typed Telegram InputPaidMedia value. Its representation is opaque.

variant()

@type variant() :: :live_photo | :photo | :video

Functions

live_photo(video, photo)

@spec live_photo(source(), source()) :: t()

Builds a paid live-photo object from its video and static photo.

photo(media)

@spec photo(source()) :: t()

Builds a paid photo object.

video(media, options \\ [])

@spec video(source(), options()) :: t()

Builds a paid video object.