Skip to content

Commit

Permalink
chore(docs): add documentation for search filters
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanRT committed Mar 15, 2023
1 parent 8ef4b42 commit 1a2fc3a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ const yt = await Innertube.create({
<a name="getinfo"></a>
### 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<VideoInfo>`

Expand Down Expand Up @@ -382,6 +382,20 @@ Searches the given query on YouTube.
| query | `string` | The search query |
| filters? | `SearchFilters` | Search filters |


<details>
<summary>Search Filters</summary>

| 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 |

</details>

<details>
<summary>Methods & Getters</summary>
<p>
Expand Down
9 changes: 9 additions & 0 deletions docs/API/music.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ Searches on YouTube Music.
| query | `string` | Search query |
| filters? | `object` | Search filters |

<details>
<summary>Search Filters</summary>

| Filter | Type | Value | Description |
| --- | --- | --- | --- |
| type | `string` | `all`, `song`, `video`, `album`, `playlist`, `artist` | Search type |

</details>

<details>
<summary>Methods & Getters</summary>
<p>
Expand Down

0 comments on commit 1a2fc3a

Please sign in to comment.