Video class

A Video class with information retrieved from Holodex.

Annotations
  • @freezed

Constructors

Video({required String id, required String title, VideoType? type, @JsonKey(name: 'topic_id') String? topicId, @JsonKey(name: 'published_at') String? publishedAt, @JsonKey(name: 'available_at') required String availableAt, int? duration, @JsonKey(fromJson: VideoStatus.fromJson, toJson: VideoStatus.toJsonStatic) required VideoStatus status, @JsonKey(name: 'start_scheduled') String? startScheduled, @JsonKey(name: 'start_actual') String? startActual, @JsonKey(name: 'end_actual') String? endActual, @JsonKey(name: 'live_viewers') int? liveViewers, String? description, int? songcount, @JsonKey(name: 'channel_id') String? channelId, ChannelMin? channel, @JsonKey(name: 'lang') String? language})
Returns a new Video instance.
const
factory
Video.fromJson(Map<String, dynamic> json)
Returns a new Video instance from a JSON object.
factory

Properties

availableAt String
Takes on the first non-null value of end_actual, start_actual, start_scheduled, or published_at
no setterinherited
channel ChannelMin?
no setterinherited
channelId String?
no setterinherited
copyWith → $VideoCopyWith<Video>
no setterinherited
description String?
Included when includes contains 'description'
no setterinherited
duration int?
Duration of the video in seconds
no setterinherited
endActual String?
Included when includes contains 'live_info'
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
no setterinherited
language String?
no setterinherited
liveViewers int?
Included when includes contains 'live_info'
no setterinherited
publishedAt String?
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
songcount int?
Number of tagged songs for this video
no setterinherited
startActual String?
Included when includes contains 'live_info'
no setterinherited
startScheduled String?
Included when includes contains 'live_info'
no setterinherited
status VideoStatus
no setterinherited
title String
no setterinherited
topicId String?
corresponds to a Topic ID, Videos of type clip cannot not have topic. Streams may or may not have topic.
no setterinherited
type VideoType?
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited
toVideoFull() VideoFull
Converts this Video instance to a VideoFull instance.

Operators

operator ==(Object other) bool
The equality operator.
inherited