From 1a2fc3abd72ff2b3b076075fa9221e530e9d11df Mon Sep 17 00:00:00 2001 From: LuanRT Date: Wed, 15 Mar 2023 05:35:00 -0300 Subject: [PATCH] chore(docs): add documentation for search filters --- README.md | 16 +++++++++++++++- docs/API/music.md | 9 +++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 26ae5068..35f616fa 100644 --- a/README.md +++ b/README.md @@ -294,7 +294,7 @@ const yt = await Innertube.create({ ### getInfo(target, client?) -Retrieves video info, including playback data and even layout elements such as menus, buttons, etc — all nicely parsed. +Retrieves video info. **Returns**: `Promise` @@ -382,6 +382,20 @@ Searches the given query on YouTube. | query | `string` | The search query | | filters? | `SearchFilters` | Search filters | + +
+Search Filters + +| Filter | Type | Value | Description | +| --- | --- | --- | --- | +| upload_date | `string` | `all` \| `hour` \| `today` \| `week` \| `month` \| `year` | Filter by upload date | +| type | `string` | `all` \| `video` \| `channel` \| `playlist` \| `movie` | Filter by type | +| duration | `string` | `all` \| `short` \| `medium` \| `long` | Filter by duration | +| sort_by | `string` | `relevance` \| `rating` \| `upload_date` \| `view_count` | Sort by | +| features | `string[]` | `hd` \| `subtitles` \| `creative_commons` \| `3d` \| `live` \| `purchased` \| `4k` \| `360` \| `location` \| `hdr` \| `vr180` | Filter by features | + +
+
Methods & Getters

diff --git a/docs/API/music.md b/docs/API/music.md index 94fe4e45..0be3d59b 100644 --- a/docs/API/music.md +++ b/docs/API/music.md @@ -79,6 +79,15 @@ Searches on YouTube Music. | query | `string` | Search query | | filters? | `object` | Search filters | +

+Search Filters + +| Filter | Type | Value | Description | +| --- | --- | --- | --- | +| type | `string` | `all`, `song`, `video`, `album`, `playlist`, `artist` | Search type | + +
+
Methods & Getters