youtube_explode/lib/src/search/search_video.dart

42 lines
956 B
Dart
Raw Normal View History

import '../common/common.dart';
2020-06-13 22:54:53 +02:00
import '../videos/video_id.dart';
2020-09-21 17:34:03 +02:00
import 'base_search_content.dart';
2020-06-13 22:54:53 +02:00
/// Metadata related to a search query result (video).
2020-09-21 17:34:03 +02:00
class SearchVideo extends BaseSearchContent {
2020-06-13 22:54:53 +02:00
/// VideoId.
final VideoId videoId;
/// Video title.
final String videoTitle;
/// Video author.
final String videoAuthor;
/// Video description snippet. (Part of the full description if too long)
final String videoDescriptionSnippet;
/// Video duration as String, HH:MM:SS
final String videoDuration;
/// Video View Count
final int videoViewCount;
/// Video thumbnail
final List<Thumbnail> videoThumbnails;
2020-09-23 08:27:23 +02:00
2020-07-10 22:28:19 +02:00
/// Initialize a [SearchVideo] instance.
2020-09-23 08:27:23 +02:00
const SearchVideo(
this.videoId,
this.videoTitle,
this.videoAuthor,
this.videoDescriptionSnippet,
this.videoDuration,
this.videoViewCount,
this.videoThumbnails,
);
2020-06-13 22:54:53 +02:00
@override
String toString() => '(Video) $videoTitle ($videoId)';
}