getVideoById method

Future<VideoFull> getVideoById(
  1. String videoId, {
  2. List<Includes> includes = const [],
})

Get a video by its video ID, alias of getVideos

Arguments:

  • videoId The video ID as a string
  • includes Request extra data be included in the results. They are not guarenteed to be returned.

Implementation

Future<VideoFull> getVideoById(
  String videoId, {
  List<Includes> includes = const [],
}) async {
  final paginatedVideos = await getVideos(VideoFilter(
    ids: [videoId],
    includes: includes,
    paginated: false,
    limit: 1,
  ));

  return paginatedVideos.first;
}