InlineQueryResultVideo.fromJson constructor

InlineQueryResultVideo.fromJson(
  1. Map<String, dynamic> json
)

Constructs an InlineQueryResultVideo from JSON object

Implementation

factory InlineQueryResultVideo.fromJson(Map<String, dynamic> json) {
  return InlineQueryResultVideo(
    videoUrl: json['video_url']!,
    mimeType: json['mime_type']!,
    thumbnailUrl: json['thumbnail_url']!,
    title: json['title']!,
    id: json['id']!,
    caption: json['caption'],
    parseMode: ParseMode.fromJson(json['parse_mode']),
    captionEntities: (json['caption_entities'] as List<dynamic>?)
        ?.map((e) => MessageEntity.fromJson(e))
        .toList(),
    videoWidth: json['video_width'],
    videoHeight: json['video_height'],
    videoDuration: json['video_duration'],
    description: json['description'],
    replyMarkup: InlineKeyboardMarkup.fromJson(json['reply_markup']),
    inputMessageContent:
        InputMessageContent.fromJson(json['input_message_content']),
    showCaptionAboveMedia: json['show_caption_above_media'],
  );
}