Files
YouTube.js/docs/API/kids.md
Ryan Sandbach 9ab528ec82 feat(Kids): Add blockChannel command to easily block channels (#503)
* Add blockChannel command to support easily blocking content for supervised accounts.

* Moved blockChannel functionality to the Kids client and updated API docs.

* Fix whitepsace issues.

* Resolve remaining linting errors.

* Avoid changing interaction manager. Remove comment for ToggleButton change.

* chore: clean up

---------

Co-authored-by: LuanRT <luan.lrt4@gmail.com>
2023-10-28 14:28:17 -03:00

2.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?, format_filter?)

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

getChannel(channel_id)

Retrieves channel info.

Returns: Promise.<Channel>

Param Type Description
channel_id string The channel id
Methods & Getters

  • <channel>#getContinuation()

    • Retrieves next batch of videos.
  • <channel>#has_continuation

    • Returns whether there are more videos to retrieve.
  • <channel>#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.

blockChannel(channel_id)

Retrieves the list of supervised accounts that the signed-in user has access to and blocks the given channel for each of them.

Returns: Promise.<ApiResponse[]>

Param Type Description
channel_id string Channel id