From 7f093fa79fedd21d60db117c4465f2bcdf17514c Mon Sep 17 00:00:00 2001 From: Hexah Date: Sun, 21 Jun 2020 16:54:17 +0200 Subject: [PATCH] Update version --- CHANGELOG.md | 3 +++ README.md | 14 ++++++++++++++ pubspec.yaml | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03d2cd7..afa5fbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 1.3.0 +- Added api get youtube comments of a video. + ## 1.2.3 - Fix duplicated bytes when downloading a stream. See [#41][Comment41] diff --git a/README.md b/README.md index 1db1a9f..46ae826 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ YoutubeExplode is a library that provides an interface to query metadata of YouT - Execute search queries and get resulting videos. - Get or download video streams. - Get closed captions. +- Get video comments. - All model extend `Equatable` to easily perform equality checks ## Differences from YoutubeExplode @@ -28,6 +29,7 @@ YoutubeExplode is a library that provides an interface to query metadata of YouT - [Downloading a video stream](#downloading-a-video-stream) - [Working with playlists](#working-with-playlists) - [Extracting closed captions](#extracting-closed-captions) +- [Getting comments](#getting-comments) - [Cleanup](#cleanup) ### Install @@ -151,6 +153,18 @@ Similarly, to streams, you can extract closed captions by getting the manifest a } ``` +### Getting comments +You can easily get the video comments of a given video, the comment pages are fetched automatically, and every page has +20 videos (that means that there is no point to take 25 comments to save some resources, but you could just take 40) + +``` +// Here we are getting the first 20 comments of the video. +// The stream wont close until all the video comments are fetched. +var comments = await yt.videos.commentsClient.getComments(video).take(20).toList() +``` + +Currently getting comment replies is not supported. + ### Cleanup You need to close `YoutubeExplode`'s http client, when done otherwise this could halt the dart process. diff --git a/pubspec.yaml b/pubspec.yaml index 6f2375d..ae1e389 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: youtube_explode_dart description: A port in dart of the youtube explode library. Supports several API functions without the need of Youtube API Key. -version: 1.2.3 +version: 1.3.0 homepage: https://github.com/Hexer10/youtube_explode_dart environment: