youtube_explode/lib/src/playlists/playlist.dart

31 lines
708 B
Dart
Raw Normal View History

2020-06-03 23:02:21 +02:00
import '../common/common.dart';
import 'playlist_id.dart';
2020-06-05 20:08:04 +02:00
/// YouTube playlist metadata.
2020-06-03 23:02:21 +02:00
class Playlist {
/// Playlist ID.
final PlaylistId id;
/// Playlist URL.
String get url => 'https://www.youtube.com/playlist?list=$id';
/// Playlist title.
final String title;
/// Playlist author.
/// Can be null if it's a system playlist (e.g. Video Mix, Topics, etc.).
final String author;
/// Playlist description.
final String description;
/// Engagement statistics.
final Engagement engagement;
/// Initializes an instance of [Playlist].
Playlist(this.id, this.title, this.author, this.description, this.engagement);
@override
String toString() => 'Playlist ($title)';
}