mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-15 10:32:14 +00:00
* dev: add `WEB_KIDS` innertube client * refactor: move DASH manifest stuff out of `VideoInfo` This makes it easier to use these functions elsewhere. * feat(ytkids): add `Kids#getInfo()` & `Kids#search()` * feat: add `Innertube#kids.getHomeFeed()` * docs: add YouTube Kids API ref * docs: fix typo * docs: fix yet another typo * docs: update YouTube Music API ref Unrelated but required to reflect changes made to the DASH manifest generation functions * chore: lint * chore: add tests * feat: include `captions` in `VideoInfo` * chore: fix tests
1.7 KiB
1.7 KiB
YouTube Kids
YouTube Kids is a modified version of the YouTube app, with a simplified interface and curated content. This class allows you to interact with its API.
API
search(query)
Searches the given query on YouTube Kids.
Returns: Promise.<Search>
| Param | Type | Description |
|---|---|---|
| query | string |
The query to search |
Methods & Getters
<search>#page- Returns the original InnerTube response(s), parsed and sanitized.
getInfo(video_id)
Retrieves video info.
Returns: Promise.<VideoInfo>
| Param | Type | Description |
|---|---|---|
| video_id | string |
The video id |
Methods & Getters
-
<info>#toDash(url_transformer?)- Generates a DASH manifest from the streaming data.
-
<info>#chooseFormat(options)- Selects the format that best matches the given options. This method is used internally by
#download.
- Selects the format that best matches the given options. This method is used internally by
-
<info>#download(options?)- Downloads the video.
-
<info>#addToWatchHistory()- Adds the video to the watch history.
-
<info>#page- Returns the original InnerTube response(s), parsed and sanitized.
getHomeFeed()
Retrieves the home feed.
Returns: Promise.<HomeFeed>
Methods & Getters
-
<feed>#selectCategoryTab(tab: string | KidsCategoryTab)- Selects the given category tab.
-
<feed>#categories- Returns available categories.
-
<feed>#page- Returns the original InnerTube response(s), parsed and sanitized.