InputMediaLivePhoto constructor

const InputMediaLivePhoto({
  1. @JsonKey.new(name: 'type') @Default.new(InputMediaType.livePhoto) InputMediaType type,
  2. @JsonKey.new(name: 'media') @InputFileConverter() required InputFile media,
  3. @JsonKey.new(name: 'photo') @InputFileConverter() required InputFile photo,
  4. @JsonKey.new(name: 'caption') String? caption,
  5. @JsonKey.new(name: 'parse_mode') ParseMode? parseMode,
  6. @JsonKey.new(name: 'caption_entities') List<MessageEntity>? captionEntities,
  7. @JsonKey.new(name: 'show_caption_above_media') bool? showCaptionAboveMedia,
  8. @JsonKey.new(name: 'has_spoiler') bool? hasSpoiler,
})

Creates a new InputMediaLivePhoto object.

Implementation

const factory InputMediaLivePhoto({
  /// Type of the media, must be live_photo
  @JsonKey(name: 'type')
  @Default(InputMediaType.livePhoto)
  final InputMediaType type,

  /// Video of the live photo to send. Pass a file_id to send a file that
  /// exists on the Telegram servers (recommended) or pass
  /// “attach://`<file_attach_name>`” to upload a new one using
  /// multipart/form-data under `<file_attach_name>` name. Sending live
  /// photos by a URL is currently unsupported.
  @JsonKey(name: 'media')
  @InputFileConverter()
  required final InputFile media,

  /// The static photo to send. Pass a file_id to send a file that exists on
  /// the Telegram servers (recommended) or pass
  /// “attach://`<file_attach_name>`” to upload a new one using
  /// multipart/form-data under `<file_attach_name>` name. Sending live
  /// photos by a URL is currently unsupported.
  @JsonKey(name: 'photo')
  @InputFileConverter()
  required final InputFile photo,

  /// Optional. Caption of the live photo to be sent, 0-1024 characters after
  /// entities parsing
  @JsonKey(name: 'caption') final String? caption,

  /// Optional. Mode for parsing entities in the live photo caption. See
  /// formatting options for more details.
  @JsonKey(name: 'parse_mode') final ParseMode? parseMode,

  /// Optional. List of special entities that appear in the caption, which can
  /// be specified instead of parse_mode
  @JsonKey(name: 'caption_entities')
  final List<MessageEntity>? captionEntities,

  /// Optional. Pass True, if the caption must be shown above the message
  /// media
  @JsonKey(name: 'show_caption_above_media')
  final bool? showCaptionAboveMedia,

  /// Optional. Pass True if the live photo needs to be covered with a spoiler
  /// animation
  @JsonKey(name: 'has_spoiler') final bool? hasSpoiler,
}) = _InputMediaLivePhoto;