Compare commits

...

74 Commits

Author SHA1 Message Date
github-actions[bot]
31d1caf06a chore(main): release 11.0.0 (#758)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-28 14:03:08 -03:00
Dave Nicolson
22dd71d7da feat(history): Add ability to remove videos from watch history (#706)
* Use Button class

* Add ability to remove videos from watch history

* Update src/parser/youtube/History.ts

* Fix linting

---------

Co-authored-by: Roger <sonemonu@gmail.com>
2024-10-28 14:01:09 -03:00
dependabot[bot]
15d3865398 chore(deps-dev): bump rollup in /examples/browser/web (#769)
Bumps [rollup](https://github.com/rollup/rollup) from 2.79.1 to 2.79.2.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v2.79.1...v2.79.2)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-28 13:46:08 -03:00
Luan
305a398158 fix: Include jinter in the cjs build 2024-10-28 13:06:31 -03:00
Luan
85d623c463 Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2024-10-28 12:54:22 -03:00
Luan
d9ec23c73c fix(package): Use jsr:@luanrt/jintr on Deno 2024-10-28 12:54:09 -03:00
Luan
d84273163f chore: clean up 2024-10-28 12:51:53 -03:00
Luan
01057f6dfa refactor: Remove global dispatcher config 2024-10-27 10:27:38 -03:00
absidue
a4ef2249ff feat: Support auto-dubbed audio tracks (#786) 2024-10-26 17:54:12 -03:00
Luan
0081e11ebc refactor!: Deprecate account#getAnalytics, account#getTimeWatched and account#getAnalytics
Due to recent changes by YouTube, these actions can no longer be executed using web based OAuth tokens nor cookies.
2024-10-26 17:45:09 -03:00
Luan
d9ac99d332 fix(InteractionManager): Use WEB for all actions 2024-10-26 17:42:02 -03:00
Luan
bb3f114aa3 fix(LiveChat#sendMessage): Switch to WEB client
Android no longer works properly with TV OAuth tokens.
2024-10-26 17:40:35 -03:00
Luan
b45609aa0f feat: Add TVHTML5 InnerTube client
+ Update `ANDROID` version.
2024-10-26 17:39:09 -03:00
absidue
91d3081496 chore(protos): Avoid generating unused protobuf code (#774) 2024-10-07 07:59:17 -03:00
Émilien (perso)
02513b76ed fix: fix deno usage of protobuf and jintr (#776)
* fix: fix deno usage of protobuf and jintr

* fix Import assertions are deprecated
2024-10-07 07:58:04 -03:00
absidue
43cef9e67e fix(parser): Fix ShortsLockupView assuming that the primary text always exists (#775) 2024-10-07 07:57:22 -03:00
absidue
5ff30e12de fix(toDash): Fix dash.js 4.x compatibility (#765) 2024-09-25 10:29:26 -03:00
Luan
289996ae7a chore(readme): simplify description 2024-09-23 17:50:59 -03:00
Luan
d6cc8016aa chore(readme): reword 2024-09-23 17:50:04 -03:00
absidue
910c9791e7 feat(ProtoUtils): Add support for creating NextParams (#762) 2024-09-23 17:33:21 -03:00
Luan
74659fd03f chore: add proper documentation (#763)
* chore: generate API ref using `typedoc`

* chore: declutter readme and add links to ytjs.dev

* chore: clean up
2024-09-23 17:32:50 -03:00
Émilien (perso)
dd7f5cf778 feat: Add WEB_CREATOR client (#757)
* feat: Add WEB_CREATOR client

* update to latest version WEB_CREATOR https://github.com/iv-org/invidious/pull/4928#issuecomment-2362302280
2024-09-20 08:59:45 -03:00
github-actions[bot]
00dd409d58 chore(main): release 10.5.0 (#749)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-19 10:14:46 -03:00
Luan
eb21af33db chore: update README [skip ci] 2024-09-19 10:12:51 -03:00
Luan
f209315216 chore: update GitHub Actions to use latest versions 2024-09-19 10:04:11 -03:00
Émilien (perso)
eaf218f5da feat: Add WEB_EMBEDDED client (#756) 2024-09-19 09:56:23 -03:00
Konstantin
5db449cc6d feat: extend music getInfo to allow MusicResponsiveListItem and Nav Endpoints (#751)
* feat: extend music getInfo to allow MusicResponsiveListItem nav endpoints

* chore: remove debug statements from test

* chore: adapt test

* feat: add nav endpoints to music getInfo

---------

Co-authored-by: Luan <luan.lrt4@gmail.com>
2024-09-19 09:19:48 -03:00
dependabot[bot]
2e61b99428 chore(deps-dev): bump vite in /examples/browser/web (#755)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 3.2.10 to 3.2.11.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v3.2.11/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v3.2.11/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-19 09:13:02 -03:00
Luan
7a39326821 fix(Session): Set default values for hl and gl in context builder 2024-09-17 22:06:03 -03:00
Luan
425027ce89 chore(examples/web): Use UMP (#754) 2024-09-16 12:38:59 -03:00
Luan
0a5d3aa76d refactor: Remove old UMP parser (#753) 2024-09-16 08:44:55 -03:00
Luan
94bc596048 refactor: Migrate to ts-proto (#752)
* refactor: Add extracted protos

* refactor: Remove old stuff and update affected code

* chore(package): Update `build:proto` script

* chore(ClientInfo): Rename `androidSdkVersion` to `android_sdk_version`

* chore: remove refs to old proto file

* refactor(sabr_request): Rename `Gw` to `media_type`

* chore(sabr_request): Fix typo in field num

* feat(parser): Parse `video_playback_ustreamer_config` and `server_abr_streaming_url`

* refactor: update protos

* chore(package): streamline clean and build scripts

* chore: update package.json

* chore: update npmignore

* chore(protos): Remove unneeded definitions

See https://github.com/LuanRT/googlevideo for video playback proto definitions.

* chore(package): add `rimraf` dependency
2024-09-16 06:54:29 -03:00
absidue
e1e76ee616 feat(parser): Add ShortsLockupView and BadgeView nodes (#746) 2024-09-13 00:19:46 -03:00
Dave Nicolson
bf6cc00699 fix(ItemSection): FeedFilterChipBar parse error (#741) 2024-09-11 02:28:33 -03:00
absidue
094a96fb5d fix(parser): The icon_name property does not always exist in ThumbnailBadgeView (#745) 2024-09-11 02:26:58 -03:00
github-actions[bot]
4fca6c354e chore(main): release 10.4.0 (#721)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-26 23:41:20 -03:00
Luan
93906e0539 chore(docs): Mention BgUtils for generating PoTokens
https://github.com/LuanRT/BgUtils
2024-08-26 23:37:35 -03:00
dependabot[bot]
aaebcca90b chore(deps-dev): bump vite from 3.2.8 to 3.2.10 in /examples/browser/web (#739)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 3.2.8 to 3.2.10.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v3.2.10/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v3.2.10/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-26 21:52:34 -03:00
Luan
36121878b1 chore(examples): Fix proxy 2024-08-26 20:32:30 -03:00
Luan
d89909a19a fix(examples): Use BgUtils to generate pot [skip ci]
+ Improve readme.
2024-08-26 18:42:14 -03:00
Luan
367a6f7ec5 chore(package): Revert last commit
This reverts commit 05a663710d.
2024-08-23 14:44:00 -03:00
Luan
05a663710d chore(package): Use prepack instead of prepare 2024-08-23 14:22:54 -03:00
Luan
cc0fc7145a chore(package): Fix typo in exports 2024-08-23 13:17:50 -03:00
Luan
bdff3eae1c chore: lint [skip ci] 2024-08-23 02:07:41 -03:00
Luan
5a66d0ba93 chore: clean up some types [skip ci] 2024-08-23 02:04:28 -03:00
Luan
370cb0b29e chore(eslint): Update ignores 2024-08-23 01:12:17 -03:00
Luan
fcd00b0fb0 fix(FormatOptions): client missing some values 2024-08-23 01:05:37 -03:00
Luan
2dae5634f3 chore(docs): Minor rewording 2024-08-23 00:51:52 -03:00
Luan
2c43a5705f chore: update tests 2024-08-22 22:40:42 -03:00
Luan
83801ebc37 chore: fix linter config 2024-08-22 22:36:55 -03:00
Luan
c14a687e65 chore: bump eslint to v9 2024-08-22 15:43:59 -03:00
Dave Nicolson
f9ccba4af5 fix(ThumbnailOverlayResumePlayback): Update percent_duration_watched type (#737) 2024-08-19 20:18:06 -03:00
absidue
4b60b97132 feat(parser): Add VideoAttributesSectionView node (#732) 2024-08-12 14:49:20 -03:00
absidue
7afc3da80e fix(Session): Fix remote visitor data not gettting used (#731) 2024-08-12 00:21:02 -03:00
슈리튬
bb6e647b8c fix(Session): PoToken not being set correctly (#729) 2024-08-11 04:10:23 -03:00
Luan
f1973c11d9 fix(Session): Visitor data not being used properly 2024-08-10 11:12:13 -03:00
Luan
4942992630 refactor: Throw an error if an invalid client is specified 2024-08-08 10:11:38 -03:00
Luan
0e91a08ae2 fix(PlayerEndpoint): Don't set undefined fields 2024-08-08 09:01:14 -03:00
Luan
261f2ac12b feat(Utils): Add UMP parser
Currently not used anywhere in the project, but I figured I'd add it in case anyone wants to make their playback requests look more genuine by using UMP/SABR.
2024-08-08 07:57:14 -03:00
Luan
041aebc358 chore: Rephrase PoToken description 2024-08-08 07:42:20 -03:00
Émilien (perso)
c9f0ddd573 feat(Player): Add support for Proof of Identity tokens (#708)
* Fix different usages of potoken.

* Fix linting.

* Add mention about invidious youtube-trusted-session-generator.

---------

Co-authored-by: Luan <luan.lrt4@gmail.com>
2024-08-08 07:28:42 -03:00
Luan
25d268beba chore: update livechat example 2024-08-06 18:48:34 -03:00
absidue
2c0bb237e1 fix(Search): Fix it occasionally returning only a small number of results (#720) 2024-08-03 09:40:02 -03:00
github-actions[bot]
4f5635ad07 chore(main): release 10.3.0 (#704)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-01 06:21:32 -03:00
Luan
3b3cf1b2aa refactor(Player): Generate and parse player script's AST (#713)
Notes:
- The Syntax Tree is generated by Jinter (which is built on top of `Acorn`).
- While doing this may be slightly slower than using a regular exp, it is much more reliable (plus we already cache the player functions anyway).
2024-08-01 06:09:27 -03:00
Dave Nicolson
d85fbc56cf feat(PlaylistManager): Add ability to remove videos by set ID (#715) 2024-08-01 06:07:47 -03:00
Luan
e55d4af100 chore: lint 2024-08-01 06:03:51 -03:00
Armel Chesnais
04369be620 fix(Player): Address changes introduced by player id 20dfca59 (#712)
Fixes the nSig extract for YT player id `20dfca59 `
Handles:

String.prototype.split.call(a,("",""))

and

Array.prototype.join.call(b,
("",""))};

Note the newline

Co-authored-by: Luan <luan.lrt4@gmail.com>
2024-07-31 06:38:32 -03:00
Luan
a89a5ac2dd refactor(Player.ts): Handle nsig failure gracefully
Preping for future changes.
2024-07-31 06:18:18 -03:00
Luan
5529a6aca0 chore(Player): Don't throw an error if nsig extraction fails
This is called when an InnerTube instance is created, so throwing here breaks the entire library.
2024-07-30 19:05:29 -03:00
Luan
94a6765c97 chore: update tests 2024-07-30 18:50:03 -03:00
Luan
9b9fb82131 refactor: Clean up & fix old code
Other changes:
- Renamed "getShortsWatchItem" to "getShortsVideoInfo".
- Fixed `ShortFormVideoInfo`. This never worked for me ever since it was introduced. Turned out it was just implemented incorrectly.
- Moved `basic_info` extraction to `MediaInfo`. Less of a pain to maintain as we only have to modify one file.
- Removed unneeded tsdoc comments.
- Fixed `Innertube#getStreamingData()`. Now it actually returns a deciphered format.
- Simplified some types.
2024-07-30 18:49:24 -03:00
absidue
3153375bca fix(HTTPClient): Adjust more context fields for the iOS client (#705) 2024-07-26 11:15:12 -03:00
Dave Nicolson
a9bf225a62 feat(parser): Add EomSettingsDisclaimer node (#703) 2024-07-25 22:12:57 -03:00
1097 changed files with 152974 additions and 10982 deletions

View File

@@ -1,9 +0,0 @@
.git
.github
test/
cache/
src/proto/youtube.ts
coverage/
node_modules/
dist/
src/proto/generated/

View File

@@ -1,93 +0,0 @@
plugins:
[ '@typescript-eslint', 'eslint-plugin-tsdoc' ]
env:
commonjs: true
es2021: true
node: true
extends: [ eslint:recommended, 'plugin:@typescript-eslint/recommended' ]
parser: '@typescript-eslint/parser'
parserOptions:
ecmaVersion: latest
project:
- tsconfig.json
overrides:
-
files:
- '**/*.js'
- '**/*.mjs'
rules:
'tsdoc/syntax': 'off'
rules:
max-len:
- error
-
code: 200
ignoreComments: true
ignoreTrailingComments: true
ignoreStrings: true
ignoreTemplateLiterals: true
ignoreRegExpLiterals: true
quotes: [error, single]
'@typescript-eslint/ban-types': 'off'
'tsdoc/syntax': 'warn'
'@typescript-eslint/no-explicit-any': 'off'
'@typescript-eslint/consistent-type-imports': 'error'
'@typescript-eslint/consistent-type-exports': 'error'
no-template-curly-in-string: error
no-unreachable-loop: error
no-unused-private-class-members: 'off'
no-prototype-builtins: 'off'
no-async-promise-executor: 'off'
no-case-declarations: 'off'
no-return-assign: 'off'
no-floating-decimal: error
no-implied-eval: error
arrow-spacing: error
no-invalid-this: error
no-lone-blocks: 'off'
no-new-func: error
no-new-wrappers: error
no-new: error
no-void: error
no-octal-escape: error
no-self-compare: error
no-sequences: error
no-throw-literal: error
no-unmodified-loop-condition: error
no-useless-call: error
no-useless-concat: error
no-useless-escape: error
no-useless-return: error
no-else-return: error
no-lonely-if: error
no-undef-init: error
no-unneeded-ternary: error
no-var: error
no-multi-spaces: error
no-multiple-empty-lines: ["error", { "max": 2, "maxEOF": 0 }]
no-tabs: error
no-trailing-spaces: error
brace-style: error
new-parens: error
space-infix-ops: error
template-curly-spacing: error
wrap-regex: error
capitalized-comments: error
prefer-template: error
keyword-spacing: ["error", { "before": true } ]
object-curly-spacing: ["warn", "always"]
array-bracket-spacing: ["error", "always"]
arrow-parens: ["error", "always"]
comma-dangle: ["error", "never"]
comma-spacing: ["error", { "before": false, "after": true }]
computed-property-spacing: ["error", "never"]
func-call-spacing: ["error", "never"]
indent: ["error", 2, { "SwitchCase": 1 }]
key-spacing: ["error", { "beforeColon": false }]
semi: ["error", "always"]
operator-assignment: ["error", "always"]

View File

@@ -10,9 +10,9 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: "20"
- run: npm ci
- run: npm run lint

View File

@@ -12,16 +12,15 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: node
package-name: youtubei.js
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "16.x"
node-version: "20"
- name: Build for Deno
run: |
npm ci
@@ -48,9 +47,9 @@ jobs:
- name: Remove Deno folder
run: rm -rf build
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "16.x"
node-version: "20"
registry-url: "https://registry.npmjs.org"
if: ${{ steps.release.outputs.release_created }}
- name: Publish package to npmjs

View File

@@ -8,7 +8,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
- uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'

View File

@@ -10,8 +10,8 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci

3
.gitignore vendored
View File

@@ -56,6 +56,7 @@ pnpm-lock.yaml
# Downloaded assets
*.mp4
*.m4a
*.webm
*.mkv
@@ -75,3 +76,5 @@ deno/
# MacOS
.DS_Store
*.bin

View File

@@ -1,6 +1,8 @@
**
src/
docs/
!dist/**
!README.md
!LICENSE
!bundle/**

View File

@@ -1,5 +1,86 @@
# Changelog
## [11.0.0](https://github.com/LuanRT/YouTube.js/compare/v10.5.0...v11.0.0) (2024-10-28)
### ⚠ BREAKING CHANGES
* Deprecate `account#getAnalytics`, `account#getTimeWatched` and `account#getAnalytics`
### Features
* Add `TVHTML5` InnerTube client ([b45609a](https://github.com/LuanRT/YouTube.js/commit/b45609aa0fcd801c379ffdafd04c6c3c2ed3deba))
* Add `WEB_CREATOR` client ([#757](https://github.com/LuanRT/YouTube.js/issues/757)) ([dd7f5cf](https://github.com/LuanRT/YouTube.js/commit/dd7f5cf778b8acca95cc6d9c6e379e3e87e0ee8a))
* **history:** Add ability to remove videos from watch history ([#706](https://github.com/LuanRT/YouTube.js/issues/706)) ([22dd71d](https://github.com/LuanRT/YouTube.js/commit/22dd71d7dad5029f2f7ed0deafbae3386ebe298d))
* **ProtoUtils:** Add support for creating NextParams ([#762](https://github.com/LuanRT/YouTube.js/issues/762)) ([910c979](https://github.com/LuanRT/YouTube.js/commit/910c9791e7aed9e28cd42f3bcf28b8b8d89edb21))
* Support auto-dubbed audio tracks ([#786](https://github.com/LuanRT/YouTube.js/issues/786)) ([a4ef224](https://github.com/LuanRT/YouTube.js/commit/a4ef2249ffbe14f5d5fa702b269dd0f61e14ada8))
### Bug Fixes
* fix deno usage of protobuf and jintr ([#776](https://github.com/LuanRT/YouTube.js/issues/776)) ([02513b7](https://github.com/LuanRT/YouTube.js/commit/02513b76ed66041044e80f8749df7f29379c424e))
* Include jinter in the cjs build ([305a398](https://github.com/LuanRT/YouTube.js/commit/305a398158a6cac82e6ef288fed4bf1661c89d52))
* **InteractionManager:** Use `WEB` for all actions ([d9ac99d](https://github.com/LuanRT/YouTube.js/commit/d9ac99d3324c2987aebb6b8e40317780478b7c19))
* **LiveChat#sendMessage:** Switch to `WEB` client ([bb3f114](https://github.com/LuanRT/YouTube.js/commit/bb3f114aa34dd50602da794dcb3aa3f28a5a2ed9))
* **package:** Use `jsr:@luanrt/jintr` on Deno ([d9ec23c](https://github.com/LuanRT/YouTube.js/commit/d9ec23c73ca4f370df45926206a2ff070bb6552f))
* **parser:** Fix ShortsLockupView assuming that the primary text always exists ([#775](https://github.com/LuanRT/YouTube.js/issues/775)) ([43cef9e](https://github.com/LuanRT/YouTube.js/commit/43cef9e67e9defbfc498b6381ae93f967622f83b))
* **toDash:** Fix dash.js 4.x compatibility ([#765](https://github.com/LuanRT/YouTube.js/issues/765)) ([5ff30e1](https://github.com/LuanRT/YouTube.js/commit/5ff30e12ded29afff5a758cbe96ac3418e6d20aa))
### Code Refactoring
* Deprecate `account#getAnalytics`, `account#getTimeWatched` and `account#getAnalytics` ([0081e11](https://github.com/LuanRT/YouTube.js/commit/0081e11ebcff8c719902d93edf8760d3e8702e00))
## [10.5.0](https://github.com/LuanRT/YouTube.js/compare/v10.4.0...v10.5.0) (2024-09-19)
### Features
* Add `WEB_EMBEDDED` client ([#756](https://github.com/LuanRT/YouTube.js/issues/756)) ([eaf218f](https://github.com/LuanRT/YouTube.js/commit/eaf218f5da758fc37d71f7d00ba9e42533194f8a))
* extend music getInfo to allow MusicResponsiveListItem and Nav Endpoints ([#751](https://github.com/LuanRT/YouTube.js/issues/751)) ([5db449c](https://github.com/LuanRT/YouTube.js/commit/5db449cc6d86b2df1e92302ec5c74e6d44d822fb))
* **parser:** Add `ShortsLockupView` and `BadgeView` nodes ([#746](https://github.com/LuanRT/YouTube.js/issues/746)) ([e1e76ee](https://github.com/LuanRT/YouTube.js/commit/e1e76ee61629f84f4b7de9579ae9f6d6bf97bab8))
### Bug Fixes
* **ItemSection:** FeedFilterChipBar parse error ([#741](https://github.com/LuanRT/YouTube.js/issues/741)) ([bf6cc00](https://github.com/LuanRT/YouTube.js/commit/bf6cc006997675010db61fcd776244b234be5611))
* **parser:** The icon_name property does not always exist in ThumbnailBadgeView ([#745](https://github.com/LuanRT/YouTube.js/issues/745)) ([094a96f](https://github.com/LuanRT/YouTube.js/commit/094a96fb5d8170d1f727ef6da84b258596b1a09a))
* **Session:** Set default values for `hl` and `gl` in context builder ([7a39326](https://github.com/LuanRT/YouTube.js/commit/7a3932682112a0d76c04f65ae35445fc35403a00))
## [10.4.0](https://github.com/LuanRT/YouTube.js/compare/v10.3.0...v10.4.0) (2024-08-27)
### Features
* **parser:** Add `VideoAttributesSectionView` node ([#732](https://github.com/LuanRT/YouTube.js/issues/732)) ([4b60b97](https://github.com/LuanRT/YouTube.js/commit/4b60b97132b0ee42b41838f3336c582a7f7f7aec))
* **Player:** Add support for Proof of Identity tokens ([#708](https://github.com/LuanRT/YouTube.js/issues/708)) ([c9f0ddd](https://github.com/LuanRT/YouTube.js/commit/c9f0ddd573de297c0b384e422e6c1737454926e2))
* **Utils:** Add `UMP` parser ([261f2ac](https://github.com/LuanRT/YouTube.js/commit/261f2ac12b6a9a5bd5f7a43557018de333f7bec3))
### Bug Fixes
* **examples:** Use BgUtils to generate pot [skip ci] ([d89909a](https://github.com/LuanRT/YouTube.js/commit/d89909a19a1486bee7e3275014725b4e3dc2cbe2))
* **FormatOptions:** `client` missing some values ([fcd00b0](https://github.com/LuanRT/YouTube.js/commit/fcd00b0fb0f88a16c27da1ed89e9a2c4887e5c52))
* **PlayerEndpoint:** Don't set `undefined` fields ([0e91a08](https://github.com/LuanRT/YouTube.js/commit/0e91a08ae2194a07defc4b1e12ff3edbe13b72df))
* **Search:** Fix it occasionally returning only a small number of results ([#720](https://github.com/LuanRT/YouTube.js/issues/720)) ([2c0bb23](https://github.com/LuanRT/YouTube.js/commit/2c0bb237e1d0eb160dc3f879f5cab2022d9b5b04))
* **Session:** `PoToken` not being set correctly ([#729](https://github.com/LuanRT/YouTube.js/issues/729)) ([bb6e647](https://github.com/LuanRT/YouTube.js/commit/bb6e647b8c88753669acde43d0d648aaf11caba6))
* **Session:** Fix remote visitor data not gettting used ([#731](https://github.com/LuanRT/YouTube.js/issues/731)) ([7afc3da](https://github.com/LuanRT/YouTube.js/commit/7afc3da80ee3b5aa6edd2a899be82c1a21e03556))
* **Session:** Visitor data not being used properly ([f1973c1](https://github.com/LuanRT/YouTube.js/commit/f1973c11d9a492898b5e72b1f2b79291b674e229))
* **ThumbnailOverlayResumePlayback:** Update `percent_duration_watched` type ([#737](https://github.com/LuanRT/YouTube.js/issues/737)) ([f9ccba4](https://github.com/LuanRT/YouTube.js/commit/f9ccba4af5268d67d8610a1a5d623964f56d170d))
## [10.3.0](https://github.com/LuanRT/YouTube.js/compare/v10.2.0...v10.3.0) (2024-08-01)
### Features
* **parser:** Add `EomSettingsDisclaimer` node ([#703](https://github.com/LuanRT/YouTube.js/issues/703)) ([a9bf225](https://github.com/LuanRT/YouTube.js/commit/a9bf225a62108e47a50316235a83a814c682d745))
* **PlaylistManager:** Add ability to remove videos by set ID ([#715](https://github.com/LuanRT/YouTube.js/issues/715)) ([d85fbc5](https://github.com/LuanRT/YouTube.js/commit/d85fbc56cf0fd7367b182ae36e65c1701bc5e62d))
### Bug Fixes
* **HTTPClient:** Adjust more context fields for the iOS client ([#705](https://github.com/LuanRT/YouTube.js/issues/705)) ([3153375](https://github.com/LuanRT/YouTube.js/commit/3153375bcaa6c03afba9da8474e6a9d37471ed29))
## [10.2.0](https://github.com/LuanRT/YouTube.js/compare/v10.1.0...v10.2.0) (2024-07-25)

749
README.md
View File

@@ -3,65 +3,30 @@
[versions]: https://www.npmjs.com/package/youtubei.js?activeTab=versions
[codefactor]: https://www.codefactor.io/repository/github/luanrt/youtube.js
[actions]: https://github.com/LuanRT/YouTube.js/actions
[collaborators]: https://github.com/LuanRT/YouTube.js/blob/main/COLLABORATORS.md
<!-- OTHER LINKS -->
[project]: https://github.com/LuanRT/YouTube.js
[twitter]: https://twitter.com/thesciencephile
[discord]: https://discord.gg/syDu7Yks54
<div align="center">
<br/>
<p>
<a href="https://github.com/LuanRT/YouTube.js"><img src="https://luanrt.github.io/assets/img/ytjs.svg" title="youtube.js" alt="YouTube.js' Github Page" width="200" /></a>
<a href="https://github.com/LuanRT/YouTube.js">
<img src="https://luanrt.github.io/assets/img/ytjs.svg" alt="YouTube.js Logo" width="200" />
</a>
</p>
<p align="center">A full-featured wrapper around the InnerTube API</p>
<p>A JavaScript client for YouTube's private API</p>
[![Discord](https://img.shields.io/badge/discord-online-brightgreen.svg)][discord]
[![CI](https://github.com/LuanRT/YouTube.js/actions/workflows/test.yml/badge.svg)][actions]
[![NPM Version](https://img.shields.io/npm/v/youtubei.js?color=%2335C757)][versions]
[![Downloads](https://img.shields.io/npm/dt/youtubei.js)][npm]
[![Codefactor](https://www.codefactor.io/repository/github/luanrt/youtube.js/badge)][codefactor]
[![Discord](https://img.shields.io/badge/discord-online-brightgreen.svg)][discord]
[![CI](https://github.com/LuanRT/YouTube.js/actions/workflows/test.yml/badge.svg)][actions]
[![NPM Version](https://img.shields.io/npm/v/youtubei.js?color=%2335C757)][versions]
[![Downloads](https://img.shields.io/npm/dt/youtubei.js)][npm]
[![Codefactor](https://www.codefactor.io/repository/github/luanrt/youtube.js/badge)][codefactor]
<h5>
Sponsored by&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://serpapi.com"><img src="https://luanrt.github.io/assets/img/serpapi.svg" alt="SerpApi - API to get search engine results with ease." height=35 valign="middle"></a>
</h5>
<br>
</div>
InnerTube is an API used by all YouTube clients. It was created to simplify the deployment of new features and experiments across the platform [^1]. This library manages all low-level communication with InnerTube, providing a simple and efficient way to interact with YouTube programmatically. Its design aims to closely emulate an actual client, including the parsing of API responses.
YouTube.js is a JavaScript client for YouTube's private API, known as "InnerTube". It allows you to interact with YouTube programmatically, providing access to videos, comments, live chats, streaming data and more. It works seamlessly across Node.js, Deno, and modern browsers.
If you have any questions or need help, feel free to reach out to us on our [Discord server][discord] or open an issue [here](https://github.com/LuanRT/YouTube.js/issues).
## Installation
### Table of Contents
<ol>
<li><a href="#prerequisites">Prerequisites</a></li>
<li><a href="#installation">Installation</a></li>
<li>
<a href="#usage">Usage</a>
<ul>
<li><a href="#browser-usage">Browser Usage</a></li>
<li><a href="#caching">Caching</a></li>
<li><a href="#api">API</a></li>
<li><a href="#extending-the-library">Extending the library</a></li>
</ul>
</li>
<li><a href="#contributing">Contributing</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#disclaimer">Disclaimer</a></li>
<li><a href="#license">License</a></li>
</ol>
### Prerequisites
YouTube.js runs on Node.js, Deno, and modern browsers.
It requires a runtime with the following features:
- [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
- On Node, we use [undici](https://github.com/nodejs/undici)'s fetch implementation, which requires Node.js 16.8+. If you need to use an older version, you may provide your own fetch implementation. See [providing your own fetch implementation](#custom-fetch) for more information.
- The `Response` object returned by fetch must thus be spec compliant and return a `ReadableStream` object if you want to use the `VideoInfo#download` method. (Implementations like `node-fetch` return a non-standard `Readable` object.)
- [`EventTarget`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) and [`CustomEvent`](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent) are required.
### Installation
Before installing, make sure your environment meets the [prerequisites](https://ytjs.dev/guide/getting-started.html#prerequisites).
```bash
# NPM
@@ -74,711 +39,37 @@ yarn add youtubei.js@latest
npm install github:LuanRT/YouTube.js
```
When using Deno, you can import YouTube.js directly from deno.land:
Deno:
```ts
import { Innertube } from 'https://deno.land/x/youtubei/deno.ts';
```
## Usage
Create an InnerTube instance:
## Basic Usage
```ts
// const { Innertube } = require('youtubei.js');
import { Innertube } from 'youtubei.js';
const youtube = await Innertube.create(/* options */);
const innertube = await Innertube.create(/* options */);
```
### Options
<details>
<summary>Click to expand</summary>
| Option | Type | Description | Default |
| --- | --- | --- | --- |
| `lang` | `string` | Language. | `en` |
| `location` | `string` | Geolocation. | `US` |
| `account_index` | `number` | The account index to use. This is useful if you have multiple accounts logged in. **NOTE:** Only works if you are signed in with cookies. | `0` |
| `visitor_data` | `string` | Setting this to a valid and persistent visitor data string will allow YouTube to give this session tailored content even when not logged in. A good way to get a valid one is by either grabbing it from a browser or calling InnerTube's `/visitor_id` endpoint. | `undefined` |
| `retrieve_player` | `boolean` | Specifies whether to retrieve the JS player. Disabling this will make session creation faster. **NOTE:** Deciphering formats is not possible without the JS player. | `true` |
| `enable_safety_mode` | `boolean` | Specifies whether to enable safety mode. This will prevent the session from loading any potentially unsafe content. | `false` |
| `generate_session_locally` | `boolean` | Specifies whether to generate the session data locally or retrieve it from YouTube. This can be useful if you need more performance. **NOTE:** If you are using the cache option and a session has already been generated, this will be ignored. If you want to force a new session to be generated, you must clear the cache or disable session caching. | `false` |
| `enable_session_cache` | `boolean` | Specifies whether to cache the session data. | `true` |
| `device_category` | `DeviceCategory` | Platform to use for the session. | `DESKTOP` |
| `client_type` | `ClientType` | InnerTube client type. | `WEB` |
| `timezone` | `string` | The time zone. | `*` |
| `cache` | `ICache` | Used to cache algorithms, session data, and OAuth2 tokens. | `undefined` |
| `cookie` | `string` | YouTube cookies. | `undefined` |
| `fetch` | `FetchFunction` | Fetch function to use. | `fetch` |
</details>
### Browser Usage
To use YouTube.js in the browser, you must proxy requests through your own server. You can see our simple reference implementation in Deno at [`examples/browser/proxy/deno.ts`](https://github.com/LuanRT/YouTube.js/tree/main/examples/browser/proxy/deno.ts).
You may provide your own fetch implementation to be used by YouTube.js, which we will use to modify and send the requests through a proxy. See [`examples/browser/web`](https://github.com/LuanRT/YouTube.js/tree/main/examples/browser/web) for a simple example using [Vite](https://vitejs.dev/).
```ts
// Multiple exports are available for the web.
// Unbundled ESM version
import { Innertube } from 'youtubei.js/web';
// Bundled ESM version
// import { Innertube } from 'youtubei.js/web.bundle';
// Production Bundled ESM version
// import { Innertube } from 'youtubei.js/web.bundle.min';
await Innertube.create({
fetch: async (input: RequestInfo | URL, init?: RequestInit) => {
// Modify the request
// and send it to the proxy
// fetch the URL
return fetch(request, init);
}
});
```
### Streaming
YouTube.js supports streaming of videos in the browser by converting YouTube's streaming data into an MPEG-DASH manifest.
The example below uses [`dash.js`](https://github.com/Dash-Industry-Forum/dash.js) to play the video.
```ts
import { Innertube } from 'youtubei.js/web';
import dashjs from 'dashjs';
const youtube = await Innertube.create({ /* setup - see above */ });
// Get the video info
const videoInfo = await youtube.getInfo('videoId');
// now convert to a dash manifest
// again - to be able to stream the video in the browser - we must proxy the requests through our own server
// to do this, we provide a method to transform the URLs before writing them to the manifest
const manifest = await videoInfo.toDash(url => {
// modify the url
// and return it
return url;
});
const uri = "data:application/dash+xml;charset=utf-8;base64," + btoa(manifest);
const videoElement = document.getElementById('video_player');
const player = dashjs.MediaPlayer().create();
player.initialize(videoElement, uri, true);
```
A fully working example can be found in [`examples/browser/web`](https://github.com/LuanRT/YouTube.js/blob/main/examples/browser/web).
<a name="custom-fetch"></a>
### Providing your own fetch implementation
You may provide your own fetch implementation to be used by YouTube.js. This can be useful in some cases to modify the requests before they are sent and transform the responses before they are returned (eg. for proxies).
```ts
// provide a fetch implementation
const yt = await Innertube.create({
fetch: async (input: RequestInfo | URL, init?: RequestInit) => {
// make the request with your own fetch implementation
// and return the response
return new Response(
/* ... */
);
}
});
```
<a name="caching"></a>
### Caching
Caching the transformed player instance can greatly improve the performance. Our `UniversalCache` implementation uses different caching methods depending on the environment.
In Node.js, we use the `node:fs` module, `Deno.writeFile()` in Deno, and `indexedDB` in browsers.
By default, the cache stores data in the operating system's temporary directory (or `indexedDB` in browsers). You can make this cache persistent by specifying the path to the cache directory, which will be created if it doesn't exist.
```ts
import { Innertube, UniversalCache } from 'youtubei.js';
// Create a cache that stores files in the OS temp directory (or indexedDB in browsers) by default.
const yt = await Innertube.create({
cache: new UniversalCache(false)
});
// You may want to create a persistent cache instead (on Node and Deno).
const yt = await Innertube.create({
cache: new UniversalCache(
// Enables persistent caching
true,
// Path to the cache directory. The directory will be created if it doesn't exist
'./.cache'
)
});
```
### API
* `Innertube`
<details>
<summary>Properties</summary>
<p>
* [.session](https://github.com/LuanRT/YouTube.js/blob/main/docs/API/session.md)
* [.account](https://github.com/LuanRT/YouTube.js/blob/main/docs/API/account.md)
* [.interact](https://github.com/LuanRT/YouTube.js/blob/main/docs/API/interaction-manager.md)
* [.playlist](https://github.com/LuanRT/YouTube.js/blob/main/docs/API/playlist.md)
* [.music](https://github.com/LuanRT/YouTube.js/blob/main/docs/API/music.md)
* [.studio](https://github.com/LuanRT/YouTube.js/blob/main/docs/API/studio.md)
* [.kids](https://github.com/LuanRT/YouTube.js/blob/main/docs/API/kids.md)
</p>
</details>
<details>
<summary>Methods</summary>
<p>
* [.getInfo(target, client?)](#getinfo)
* [.getBasicInfo(video_id, client?)](#getbasicinfo)
* [.search(query, filters?)](#search)
* [.getSearchSuggestions(query)](#getsearchsuggestions)
* [.getComments(video_id, sort_by?)](#getcomments)
* [.getHomeFeed()](#gethomefeed)
* [.getGuide()](#getguide)
* [.getLibrary()](#getlibrary)
* [.getHistory()](#gethistory)
* [.getTrending()](#gettrending)
* [.getSubscriptionsFeed()](#getsubscriptionsfeed)
* [.getChannel(id)](#getchannel)
* [.getNotifications()](#getnotifications)
* [.getUnseenNotificationsCount()](#getunseennotificationscount)
* [.getPlaylist(id)](#getplaylist)
* [.getHashtag(hashtag)](#gethashtag)
* [.getStreamingData(video_id, options)](#getstreamingdata)
* [.download(video_id, options?)](#download)
* [.resolveURL(url)](#resolveurl)
* [.call(endpoint, args?)](#call)
</p>
</details>
<a name="getinfo"></a>
### `getInfo(target, client?)`
Retrieves video info.
**Returns**: `Promise<VideoInfo>`
| Param | Type | Description |
| --- | --- | --- |
| target | `string` \| `NavigationEndpoint` | If `string`, the id of the video. If `NavigationEndpoint`, the endpoint of watchable elements such as `Video`, `Mix` and `Playlist`. To clarify, valid endpoints have payloads containing at least `videoId` and optionally `playlistId`, `params` and `index`. |
| client? | `InnerTubeClient` | `WEB`, `ANDROID`, `YTMUSIC`, `YTMUSIC_ANDROID` or `TV_EMBEDDED` |
<details>
<summary>Methods & Getters</summary>
<p>
- `<info>#like()`
- Likes the video.
- `<info>#dislike()`
- Dislikes the video.
- `<info>#removeRating()`
- Removes like/dislike.
- `<info>#getLiveChat()`
- Returns a LiveChat instance.
- `<info>#getTrailerInfo()`
- Returns trailer info in a new `VideoInfo` instance, or `null` if none. Typically available for non-purchased movies or films.
- `<info>#chooseFormat(options)`
- Used to choose streaming data formats.
- `<info>#toDash(url_transformer?, format_filter?)`
- Converts streaming data to an MPEG-DASH manifest.
- `<info>#download(options)`
- Downloads the video. See [download](#download).
- `<info>#getTranscript()`
- Retrieves the video's transcript.
- `<info>#filters`
- Returns filters that can be applied to the watch next feed.
- `<info>#selectFilter(name)`
- Applies the given filter to the watch next feed and returns a new instance of [`VideoInfo`](https://github.com/LuanRT/YouTube.js/blob/main/src/parser/youtube/VideoInfo.ts).
- `<info>#getWatchNextContinuation()`
- Retrieves the next batch of items for the watch next feed.
- `<info>#addToWatchHistory()`
- Adds the video to the watch history.
- `<info>#autoplay_video_endpoint`
- Returns the endpoint of the video for Autoplay.
- `<info>#has_trailer`
- Checks if trailer is available.
- `<info>#page`
- Returns original InnerTube response (sanitized).
</p>
</details>
<a name="getbasicinfo"></a>
### `getBasicInfo(video_id, client?)`
Suitable for cases where you only need basic video metadata. Also, it is faster than [`getInfo()`](#getinfo).
**Returns**: `Promise<VideoInfo>`
| Param | Type | Description |
| --- | --- | --- |
| video_id | `string` | The id of the video |
| client? | `InnerTubeClient` | `WEB`, `ANDROID`, `YTMUSIC_ANDROID`, `YTMUSIC`, `TV_EMBEDDED` |
<a name="search"></a>
### `search(query, filters?)`
Searches the given query on YouTube.
**Returns**: `Promise<Search>`
> **Note**
> `Search` extends the [`Feed`](https://github.com/LuanRT/YouTube.js/blob/main/docs/API/feed.md) class.
| Param | Type | Description |
| --- | --- | --- |
| 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>
- `<search>#selectRefinementCard(SearchRefinementCard | string)`
- Applies given refinement card and returns a new Search instance.
- `<search>#refinement_card_queries`
- Returns available refinement cards, this is a simplified version of the `refinement_cards` object.
- `<search>#getContinuation()`
- Retrieves next batch of results.
</p>
</details>
<a name="getsearchsuggestions"></a>
### `getSearchSuggestions(query)`
Retrieves search suggestions for given query.
**Returns**: `Promise<string[]>`
| Param | Type | Description |
| --- | --- | --- |
| query | `string` | The search query |
<a name="getcomments"></a>
### `getComments(video_id, sort_by?)`
Retrieves comments for given video.
**Returns**: `Promise<Comments>`
| Param | Type | Description |
| --- | --- | --- |
| video_id | `string` | The video id |
| sort_by | `string` | Can be: `TOP_COMMENTS` or `NEWEST_FIRST` |
See [`./examples/comments`](https://github.com/LuanRT/YouTube.js/blob/main/examples/comments) for examples.
<a name="gethomefeed"></a>
### `getHomeFeed()`
Retrieves YouTube's home feed.
**Returns**: `Promise<HomeFeed>`
> **Note**
> `HomeFeed` extends the [`FilterableFeed`](https://github.com/LuanRT/YouTube.js/blob/main/docs/API/filterable-feed.md) class.
<details>
<summary>Methods & Getters</summary>
<p>
- `<home_feed>#videos`
- Returns all videos in the home feed.
- `<home_feed>#posts`
- Returns all posts in the home feed.
- `<home_feed>#shelves`
- Returns all shelves in the home feed.
- `<home_feed>#filters`
- Returns available filters.
- `<home_feed>#applyFilter(name | ChipCloudChip)`
- Applies given filter and returns a new HomeFeed instance.
- `<home_feed>#getContinuation()`
- Retrieves feed continuation.
</p>
</details>
<a name="getguide"></a>
### `getGuide()`
Retrieves YouTube's content guide.
**Returns**: `Promise<Guide>`
<a name="getlibrary"></a>
### `getLibrary()`
Retrieves the account's library.
**Returns**: `Promise<Library>`
> **Note**
> `Library` extends the [`Feed`](https://github.com/LuanRT/YouTube.js/blob/main/docs/API/feed.md) class.
<details>
<summary>Methods & Getters</summary>
<p>
- `<library>#history`
- `<library>#watch_later`
- `<library>#liked_videos`
- `<library>#playlists_section`
- `<library>#clips`
</p>
</details>
<a name="gethistory"></a>
### `getHistory()`
Retrieves watch history.
**Returns**: `Promise<History>`
> **Note**
> `History` extends the [`Feed`](https://github.com/LuanRT/YouTube.js/blob/main/docs/API/feed.md) class.
<details>
<summary>Methods & Getters</summary>
<p>
- `<history>#getContinuation()`
- Retrieves next batch of contents.
</p>
</details>
<a name="gettrending"></a>
### `getTrending()`
Retrieves trending content.
**Returns**: `Promise<TabbedFeed<IBrowseResponse>>`
<a name="getsubscriptionsfeed"></a>
### `getSubscriptionsFeed()`
Retrieves the subscriptions feed.
**Returns**: `Promise<Feed<IBrowseResponse>>`
<a name="getchannel"></a>
### `getChannel(id)`
Retrieves contents for a given channel.
**Returns**: `Promise<Channel>`
> **Note**
> `Channel` extends the [`TabbedFeed`](https://github.com/LuanRT/YouTube.js/blob/main/docs/API/tabbed-feed.md) class.
| Param | Type | Description |
| --- | --- | --- |
| id | `string` | Channel id |
<details>
<summary>Methods & Getters</summary>
<p>
- `<channel>#getVideos()`
- `<channel>#getShorts()`
- `<channel>#getLiveStreams()`
- `<channel>#getReleases()`
- `<channel>#getPodcasts()`
- `<channel>#getPlaylists()`
- `<channel>#getHome()`
- `<channel>#getCommunity()`
- `<channel>#getChannels()`
- `<channel>#getAbout()`
- `<channel>#search(query)`
- `<channel>#applyFilter(filter)`
- `<channel>#applyContentTypeFilter(content_type_filter)`
- `<channel>#applySort(sort)`
- `<channel>#getContinuation()`
- `<channel>#filters`
- `<channel>#content_type_filters`
- `<channel>#sort_filters`
- `<channel>#page`
</p>
</details>
See [`./examples/channel`](https://github.com/LuanRT/YouTube.js/blob/main/examples/channel) for examples.
<a name="getnotifications"></a>
### `getNotifications()`
Retrieves notifications.
**Returns**: `Promise<NotificationsMenu>`
<details>
<summary>Methods & Getter</summary>
<p>
- `<notifications>#getContinuation()`
- Retrieves next batch of notifications.
</p>
</details>
<a name="getunseennotificationscount"></a>
### `getUnseenNotificationsCount()`
Retrieves unseen notifications count.
**Returns**: `Promise<number>`
<a name="getplaylist"></a>
### `getPlaylist(id)`
Retrieves playlist contents.
**Returns**: `Promise<Playlist>`
> **Note**
> `Playlist` extends the [`Feed`](https://github.com/LuanRT/YouTube.js/blob/main/docs/API/feed.md) class.
| Param | Type | Description |
| --- | --- | --- |
| id | `string` | Playlist id |
<details>
<summary>Methods & Getter</summary>
<p>
- `<playlist>#items`
- Returns the items of the playlist.
</p>
</details>
<a name="gethashtag"></a>
### `getHashtag(hashtag)`
Retrieves a given hashtag's page.
**Returns**: `Promise<HashtagFeed>`
> **Note**
> `HashtagFeed` extends the [`FilterableFeed`](https://github.com/LuanRT/YouTube.js/blob/main/docs/API/filterable-feed.md) class.
| Param | Type | Description |
| --- | --- | --- |
| hashtag | `string` | The hashtag |
<details>
<summary>Methods & Getter</summary>
<p>
- `<hashtag>#applyFilter(filter)`
- Applies given filter and returns a new `HashtagFeed` instance.
- `<hashtag>#getContinuation()`
- Retrieves next batch of contents.
</p>
</details>
<a name="getstreamingdata"></a>
### `getStreamingData(video_id, options)`
Returns deciphered streaming data.
> **Note**
> This method will be deprecated in the future. We recommend retrieving streaming data from a `VideoInfo` or `TrackInfo` object instead if you want to select formats manually. Please refer to the following example:
```ts
const info = await yt.getBasicInfo('somevideoid');
const url = info.streaming_data?.formats[0].decipher(yt.session.player);
console.info('Playback url:', url);
// or:
const format = info.chooseFormat({ type: 'audio', quality: 'best' });
const url = format?.decipher(yt.session.player);
console.info('Playback url:', url);
```
**Returns**: `Promise<object>`
| Param | Type | Description |
| --- | --- | --- |
| video_id | `string` | Video id |
| options | `FormatOptions` | Format options |
<a name="download"></a>
### `download(video_id, options?)`
Downloads a given video.
**Returns**: `Promise<ReadableStream<Uint8Array>>`
| Param | Type | Description |
| --- | --- | --- |
| video_id | `string` | Video id |
| options | `DownloadOptions` | Download options |
See [`./examples/download`](https://github.com/LuanRT/YouTube.js/blob/main/examples/download) for examples.
<a name="resolveurl"></a>
### `resolveURL(url)`
Resolves a given url.
**Returns**: `Promise<NavigationEndpoint>`
| Param | Type | Description |
| --- | --- | --- |
| url | `string` | Url to resolve |
<a name="call"></a>
### `call(endpoint, args?)`
Utility to call navigation endpoints.
**Returns**: `Promise<T extends IParsedResponse | IParsedResponse | ApiResponse>`
| Param | Type | Description |
| --- | --- | --- |
| endpoint | `NavigationEndpoint` | The target endpoint |
| args? | `object` | Additional payload arguments |
### Extending the library
YouTube.js is modular and easy to extend. Most of the methods, classes, and utilities used internally are exposed and can be used to implement your own extensions without having to modify the library's source code.
For example, let's say we want to implement a method to retrieve video info. We can do that by using an instance of the `Actions` class:
```ts
import { Innertube } from 'youtubei.js';
(async () => {
const yt = await Innertube.create();
async function getVideoInfo(videoId: string) {
const videoInfo = await yt.actions.execute('/player', {
// You can add any additional payloads here, and they'll merge with the default payload sent to InnerTube.
videoId,
client: 'YTMUSIC', // InnerTube client options: ANDROID, YTMUSIC, YTMUSIC_ANDROID, WEB, or TV_EMBEDDED.
parse: true // tells YouTube.js to parse the response (not sent to InnerTube).
});
return videoInfo;
}
const videoInfo = await getVideoInfo('jLTOuvBTLxA');
console.info(videoInfo);
})();
```
Alternatively, suppose we locate a `NavigationEndpoint` in a parsed response and want to see what happens when we call it:
```ts
import { Innertube, YTNodes } from 'youtubei.js';
(async () => {
const yt = await Innertube.create();
const artist = await yt.music.getArtist('UC52ZqHVQz5OoGhvbWiRal6g');
const albums = artist.sections[1].as(YTNodes.MusicCarouselShelf);
// Let's imagine that we wish to click on the “More” button:
const button = albums.as(YTNodes.MusicCarouselShelf).header?.more_content;
if (button) {
// Having ensured that it exists, we can then call its navigation endpoint using the following code:
const page = await button.endpoint.call(yt.actions, { parse: true });
console.info(page);
}
})();
```
### Parser
YouTube.js' parser enables you to parse InnerTube responses and convert their nodes into strongly-typed objects that are simple to manipulate. Additionally, it provides numerous utility methods that make working with InnerTube a breeze.
Here's an example of its usage:
```ts
// See ./examples/parser
import { Parser, YTNodes } from 'youtubei.js';
import { readFileSync } from 'fs';
// YouTube Music's artist page response
const data = readFileSync('./artist.json').toString();
const page = Parser.parseResponse(JSON.parse(data));
const header = page.header?.item().as(YTNodes.MusicImmersiveHeader, YTNodes.MusicVisualHeader);
console.info('Header:', header);
// The parser uses a proxy object to add type safety and utility methods for working with InnerTube's data arrays:
const tab = page.contents?.item().as(YTNodes.SingleColumnBrowseResults).tabs.firstOfType(YTNodes.Tab);
if (!tab)
throw new Error('Target tab not found');
if (!tab.content)
throw new Error('Target tab appears to be empty');
const sections = tab.content?.as(YTNodes.SectionList).contents.as(YTNodes.MusicCarouselShelf, YTNodes.MusicDescriptionShelf, YTNodes.MusicShelf);
console.info('Sections:', sections);
```
Documentation for the parser can be found [here](https://github.com/LuanRT/YouTube.js/blob/main/src/parser).
For detailed usage, check out the [YouTube.js Guide and API Documentation](https://ytjs.dev).
## Contributing
We welcome all contributions, issues and feature requests, whether small or large. If you want to contribute, feel free to check out our [issues page](https://github.com/LuanRT/YouTube.js/issues) and our [guidelines](https://github.com/LuanRT/YouTube.js/blob/main/CONTRIBUTING.md).
We are immensely grateful to all the wonderful people who have contributed to this project. A special shoutout to all our contributors! 🎉
## Contributors
<a href="https://github.com/LuanRT/YouTube.js/graphs/contributors">
<img src="https://contrib.rocks/image?repo=LuanRT/YouTube.js" />
</a>
## Contact
LuanRT - [@thesciencephile][twitter] - luanrt@thatsciencephile.com
Project Link: [https://github.com/LuanRT/YouTube.js][project]
## Disclaimer
This project is not affiliated with, endorsed, or sponsored by YouTube or any of its affiliates or subsidiaries. All trademarks, logos, and brand names used in this project are the property of their respective owners and are used solely to describe the services provided.
As such, any usage of trademarks to refer to such services is considered nominative use. If you have any questions or concerns, please contact me directly via email.
[^1]: https://gizmodo.com/how-project-innertube-helped-pull-youtube-out-of-the-gu-1704946491
As such, any usage of trademarks to refer to such services is considered nominative use. If you have any questions or concerns, please contact me.
## License
Distributed under the [MIT](https://choosealicense.com/licenses/mit/) License.
<p align="right">
(<a href="#top">back to top</a>)
</p>
</p>

View File

@@ -0,0 +1,54 @@
import { exec } from 'child_process';
import { existsSync, mkdirSync, readdirSync, statSync } from 'fs';
import { join } from 'path';
import path from 'path';
import url from 'url';
import os from 'os';
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
const protoDir = './protos';
const outDir = './protos/generated';
if (!existsSync(outDir)) {
mkdirSync(outDir, { recursive: true });
}
const protocGenTs = path.join(
__dirname,
'../node_modules',
'.bin',
os.platform() === 'win32' ? 'protoc-gen-ts_proto.cmd' : 'protoc-gen-ts_proto'
);
function listProtoFiles(dir) {
let protoFiles = [];
const items = readdirSync(dir);
for (const item of items) {
const fullPath = join(dir, item);
if (statSync(fullPath).isDirectory()) {
protoFiles = protoFiles.concat(listProtoFiles(fullPath));
} else if (item.endsWith('.proto')) {
protoFiles.push(fullPath);
}
}
return protoFiles;
}
const protoFiles = listProtoFiles(protoDir);
if (!protoFiles.length) {
console.log('No .proto files found.');
process.exit(0);
}
protoFiles.forEach((file) => {
const command = `protoc --proto_path=${protoDir} --plugin=protoc-gen-ts=${protocGenTs} --ts_opt=env=browser --ts_opt=importSuffix=.js --ts_out=${outDir} --ts_opt=outputJsonMethods=false --ts_opt=outputPartialMethods=false ${file}`;
exec(command, (error, _stdout, stderr) => {
if (error) {
console.error(`Error compiling ${file}:`, stderr);
}
});
});

View File

@@ -1,115 +0,0 @@
# Account
YouTube account manager.
## API
* Account
* [.channel](#channel)
* [.getInfo()](#getinfo)
* [.getTimeWatched()](#gettimewatched)
* [.getSettings()](#getsettings)
* [.getAnalytics](#getanalytics)
<a name="channel"></a>
### channel
Channel settings.
**Returns:** `object`
<details>
<summary>Methods & Getters</summary>
<p>
- `<channel>#editName(new_name)`
- Edits the name of the channel.
- `<channel>#editDescription(new_description)`
- Edits channel description.
- `<channel>#getBasicAnalytics()`
- Alias for [`Account#getAnalytics()`](#getanalytics) — returns basic channel analytics.
</p>
</details>
<a name="getinfo"></a>
### getInfo()
Retrieves account information.
**Returns:** `Promise.<AccountInfo>`
<details>
<summary>Methods & Getters</summary>
<p>
- `<accountinfo>#page`
- Returns the original InnerTube response(s), parsed and sanitized.
</p>
</details>
<a name="gettimewatched"></a>
### getTimeWatched()
Retrieves time watched statistics.
**Returns:** `Promise.<TimeWatched>`
<details>
<summary>Methods & Getters</summary>
<p>
- `<timewatched>#page`
- Returns the original InnerTube response(s), parsed and sanitized.
</p>
</details>
<a name="getsettings"></a>
### getSettings()
Retrieves YouTube settings.
**Returns:** `Promise.<Settings>`
<details>
<summary>Methods & Getters</summary>
<p>
- `<settings>#selectSidebarItem(name)`
- Selects an item from the sidebar menu. Use `settings#sidebar_items` to see available items.
- `<settings>#getSettingOption(name)`
- Finds a setting by name and returns it. Use `settings#setting_options` to see available options.
- `<settings>#setting_options`
- Returns settings available in the page.
- `<settings>#sidebar_items`
- Returns options available in the sidebar menu.
- `<settings>#page`
- Returns the original InnerTube response(s), parsed and sanitized.
</p>
</details>
<a name="getanalytics"></a>
### getAnalytics()
Retrieves basic channel analytics.
**Returns:** `Promise.<Analytics>`
<details>
<summary>Methods & Getters</summary>
<p>
- `<analytics>#page`
- Returns the original InnerTube response(s), parsed and sanitized.
</p>
</details>

View File

@@ -1,115 +0,0 @@
# Feed
Represents a YouTube feed. This class provides a set of utility methods for parsing and interacting with feeds.
## API
* Feed
* [.videos](#videos)
* [.posts](#posts)
* [.channels](#channels)
* [.playlists](#playlists)
* [.shelves](#shelves)
* [.memo](#memo)
* [.page_contents](#page_contents)
* [.secondary_contents](#secondary_contents)
* [.page](#page)
* [.has_continuation](#has_continuation)
* [.getContinuationData()](#getcontinuationdata)
* [.getContinuation()](#getcontinuation)
* [.getShelf(title)](#getshelf)
<a name="videos"></a>
### videos
Returns all videos in the feed.
**Returns:** `ObservedArray<Video | GridVideo | ReelItem | CompactVideo | PlaylistVideo | PlaylistPanelVideo | WatchCardCompactVideo>`
<a name="posts"></a>
### posts
Returns all posts in the feed.
**Returns:** `ObservedArray<Post | BackstagePost>`
<a name="channels"></a>
### channels
Returns all channels in the feed.
**Returns:** `ObservedArray<Channel | GridChannel>`
<a name="playlists"></a>
### playlists
Returns all playlists in the feed.
**Returns:** `ObservedArray<Playlist | GridPlaylist>`
<a name="shelves"></a>
### shelves
Returns all shelves in the feed.
**Returns:** `ObservedArray<Shelf | RichShelf | ReelShelf>`
<a name="memo"></a>
### memo
Returns the memoized feed contents.
**Returns:** `Memo`
<a name="page_contents"></a>
### page_contents
Returns the page contents.
**Returns:** `SectionList | MusicQueue | RichGrid | ReloadContinuationItemsCommand`
<a name="secondary_contents"></a>
### secondary_contents
Returns the secondary contents node.
**Returns:** `SuperParsedResult<YTNode> | undefined `
<a name="page"></a>
### page
Returns the original InnerTube response, parsed and sanitized.
**Returns:** `T extends IParsedResponse = IParsedResponse`
<a name="has_continuation"></a>
### has_continuation
Returns whether the feed has a continuation.
**Returns:** `boolean`
<a name="getcontinuationdata"></a>
### getContinuationData()
Returns the continuation data.
**Returns:** `Promise<T | undefined>`
<a name="getcontinuation"></a>
### getContinuation()
Retrieves the feed's continuation.
**Returns:** `Promise<Feed<T>>`
<a name="getshelf"></a>
### getShelf(title)
Gets a shelf by its title.
**Returns:** `Shelf | RichShelf | ReelShelf | undefined`
| Param | Type | Description |
| --- | --- | --- |
| title | `string` | The title of the shelf to get |

View File

@@ -1,38 +0,0 @@
# FilterableFeed
Represents a feed that can be filtered.
> **Note**
> This class extends the [Feed](feed.md) class.
## API
* FilterableFeed
* [.filter_chips](#filter_chips)
* [.filters](#filters)
* [.getFilteredFeed(filter: string | ChipCloudChip)](#getfilteredfeed)
<a name="filter_chips"></a>
### filter_chips
Returns the feed's filter chips.
**Returns:** `ObservedArray<ChipCloudChip>`
<a name="filters"></a>
### filters
Returns the feed's filter chips as an array of strings.
**Returns:** `string[]`
<a name="getfilteredfeed"></a>
### getFilteredFeed(filter: string | ChipCloudChip)
Returns a new [Feed](feed.md) with the given filter applied.
**Returns:** `Promise<Feed<T>>`
| Param | Type | Description |
| --- | --- | --- |
| filter | `string` \| `ChipCloudChip` | The filter to apply |

View File

@@ -1,108 +0,0 @@
# InteractionManager
Handles direct interactions.
## API
* InteractionManager
* [.like(video_id)](#like)
* [.dislike(video_id)](#dislike)
* [.removeRating(video_id)](#removerating)
* [.subscribe(video_id)](#subscribe)
* [.unsubscribe(video_id)](#unsubscribe)
* [.comment(video_id, text)](#comment)
* [.translate(text, target_language, args?)](#translate)
* [.setNotificationPreferences(channel_id, type)](#setnotificationpreferences)
<a name="like"></a>
### like(video_id)
Likes given video.
**Returns:** `Promise.<ApiResponse>`
| Param | Type | Description |
| --- | --- | --- |
| video_id | `string` | Video id |
<a name="dislike"></a>
### dislike(video_id)
Dislikes given video.
**Returns:** `Promise.<ApiResponse>`
| Param | Type | Description |
| --- | --- | --- |
| video_id | `string` | Video id |
<a name="removerating"></a>
### removeRating(video_id)
Remover like/dislike.
**Returns:** `Promise.<ApiResponse>`
| Param | Type | Description |
| --- | --- | --- |
| video_id | `string` | Video id |
<a name="subscribe"></a>
### subscribe(channel_id)
Subscribes to given channel.
**Returns:** `Promise.<ApiResponse>`
| Param | Type | Description |
| --- | --- | --- |
| channel_id | `string` | Channel id |
<a name="unsubscribe"></a>
### unsubscribe(channel_id)
Unsubscribes from given channel.
**Returns:** `Promise.<ApiResponse>`
| Param | Type | Description |
| --- | --- | --- |
| channel_id | `string` | Channel id |
<a name="comment"></a>
### comment(video_id, text)
Posts a comment on given video.
**Returns:** `Promise.<ApiResponse>`
| Param | Type | Description |
| --- | --- | --- |
| video_id | `string` | Video id |
| text | `string` | Comment content |
<a name="translate"></a>
### translate(text, target_language, args?)
Translates given text using YouTube's comment translation feature.
**Returns:** `Promise.<ApiResponse>`
| Param | Type | Description |
| --- | --- | --- |
| text | `string` | Text to be translated |
| target_language | `string` | ISO language code |
| args? | `object` | Additional arguments |
<a name="setnotificationpreferences"></a>
### setNotificationPreferences(channel_id, type)
Changes notification preferences for a given channel.
Only works with channels you are subscribed to.
**Returns:** `Promise.<ApiResponse>`
| Param | Type | Description |
| --- | --- | --- |
| channel_id | `string` | Channel id |
| type | `string` | `PERSONALIZED`, `ALL` or `NONE` |

View File

@@ -1,127 +0,0 @@
# 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
* Kids
* [.search(query)](#search)
* [.getInfo(video_id)](#getinfo)
* [.getChannel(channel_id)](#getchannel)
* [.getHomeFeed()](#gethomefeed)
* [.blockChannel(channel_id)](#blockchannel)
<a name="search"></a>
### search(query)
Searches the given query on YouTube Kids.
**Returns:** `Promise.<Search>`
| Param | Type | Description |
| --- | --- | --- |
| query | `string` | The query to search |
<details>
<summary>Methods & Getters</summary>
<p>
- `<search>#page`
- Returns the original InnerTube response(s), parsed and sanitized.
</p>
</details>
<a name="getinfo"></a>
### getInfo(video_id)
Retrieves video info.
**Returns:** `Promise.<VideoInfo>`
| Param | Type | Description |
| --- | --- | --- |
| video_id | `string` | The video id |
<details>
<summary>Methods & Getters</summary>
<p>
- `<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.
</p>
</details>
<a name="getchannel"></a>
### getChannel(channel_id)
Retrieves channel info.
**Returns:** `Promise.<Channel>`
| Param | Type | Description |
| --- | --- | --- |
| channel_id | `string` | The channel id |
<details>
<summary>Methods & Getters</summary>
<p>
- `<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.
</p>
</details>
<a name="gethomefeed"></a>
### getHomeFeed()
Retrieves the home feed.
**Returns:** `Promise.<HomeFeed>`
<details>
<summary>Methods & Getters</summary>
<p>
- `<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.
</details>
<a name="blockChannel"></a>
### 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 |

View File

@@ -1,347 +0,0 @@
# YouTube Music
YouTube Music is a music streaming service developed by YouTube, a subsidiary of Google. It provides a tailored interface for the service oriented towards music streaming, with a greater emphasis on browsing and discovery compared to its main service. This class allows you to interact with its API.
## API
* Music
* [.getInfo(target)](#getinfo)
* [.search(query, filters?)](#search)
* [.getHomeFeed()](#gethomefeed)
* [.getExplore()](#getexplore)
* [.getLibrary()](#getlibrary)
* [.getArtist(artist_id)](#getartist)
* [.getAlbum(album_id)](#getalbum)
* [.getPlaylist(playlist_id)](#getplaylist)
* [.getLyrics(video_id)](#getlyrics)
* [.getUpNext(video_id, automix?)](#getupnext)
* [.getRelated(video_id)](#getrelated)
* [.getRecap()](#getrecap)
* [.getSearchSuggestions(query)](#getsearchsuggestions)
<a name="getinfo"></a>
### getInfo(target)
Retrieves track info.
**Returns:** `Promise.<TrackInfo>`
| Param | Type | Description |
| --- | --- | --- |
| target | `string` or `MusicTwoRowItem` | video id or list item |
<details>
<summary>Methods & Getters</summary>
<p>
- `<info>#getTab(title)`
- Retrieves contents of the given tab.
- `<info>#getUpNext(automix?)`
- Retrieves up next.
- `<info>#getRelated()`
- Retrieves related content.
- `<info>#getLyrics()`
- Retrieves song lyrics.
- `<info>#available_tabs`
- Returns available tabs.
- `<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 track.
- `<info>#addToWatchHistory()`
- Adds the song to the watch history.
- `<info>#page`
- Returns the original InnerTube response(s), parsed and sanitized.
</p>
</details>
<a name="search"></a>
### search(query, filters?)
Searches on YouTube Music.
**Returns:** `Promise.<Search>`
| Param | Type | Description |
| --- | --- | --- |
| query | `string` | Search query |
| filters? | `MusicSearchFilters` | 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>
- `<search>#getMore(shelf)`
- Equivalent to clicking on the shelf to load more items.
- `<search>#getContinuation()`
- Retrieves continuation, only works for individual sections or filtered results.
- `<search>#selectFilter(name)`
- Applies given filter to the search.
- `<search>#has_continuation`
- Checks if continuation is available.
- `<search>#filters`
- Returns available filters.
- `<search>#songs`
- Returns songs shelf.
- `<search>#videos`
- Returns videos shelf.
- `<search>#albums`
- Returns albums shelf.
- `<search>#artists`
- Returns artists shelf.
- `<search>#playlists`
- Returns songs shelf.
- `<search>#page`
- Returns the original InnerTube response(s), parsed and sanitized.
</p>
</details>
<a name="gethomefeed"></a>
### getHomeFeed()
Retrieves home feed.
**Returns:** `Promise.<HomeFeed>`
<details>
<summary>Methods & Getters</summary>
<p>
- `<homefeed>#getContinuation()`
- Retrieves continuation, only works for individual sections or filtered results.
- `<homefeed>#has_continuation`
- Checks if continuation is available.
- `<homefeed>#page`
- Returns original InnerTube response (sanitized).
- `<homefeed>#page`
- Returns the original InnerTube response(s), parsed and sanitized.
</p>
</details>
<a name="getexplore"></a>
### getExplore()
Retrieves “Explore” feed.
**Returns:** `Promise.<Explore>`
<details>
<summary>Methods & Getters</summary>
<p>
- `<explore>#page`
- Returns the original InnerTube response(s), parsed and sanitized.
</p>
</details>
<a name="getlibrary"></a>
### getLibrary()
Retrieves library.
**Returns:** `Library`
<details>
<summary>Methods & Getters</summary>
<p>
- `<library>#applyFilter(filter)`
- Applies given filter to the library.
- `<library>#applySort(sort_by)`
- Applies given sort option to the library items.
- `<library>#getContinuation()`
- Retrieves continuation of the library items.
- `<library>#has_continuation`
- Checks if continuation is available.
- `<library>#filters`
- Returns available filters.
- `<library>#sort_options`
- Returns available sort options.
- `<library>#page`
- Returns the original InnerTube response(s), parsed and sanitized.
</p>
</details>
<a name="getartist"></a>
### getArtist(artist_id)
Retrieves artist's info & content.
**Returns:** `Promise.<Artist>`
| Param | Type | Description |
| --- | --- | --- |
| artist_id | `string` | Artist id |
<details>
<summary>Methods & Getters</summary>
<p>
- `<artist>#page`
- Returns the original InnerTube response(s), parsed and sanitized.
</p>
</details>
<a name="getalbum"></a>
### getAlbum(album_id)
Retrieves given album.
**Returns:** `Promise.<Album>`
| Param | Type | Description |
| --- | --- | --- |
| album_id | `string` | Album id |
<details>
<summary>Methods & Getters</summary>
<p>
- `<album>#page`
- Returns the original InnerTube response(s), parsed and sanitized.
</p>
</details>
<a name="getplaylist"></a>
### getPlaylist(playlist_id)
Retrieves given playlist.
**Returns:** `Promise.<Playlist>`
| Param | Type | Description |
| --- | --- | --- |
| playlist_id | `string` | Playlist id |
<details>
<summary>Methods & Getters</summary>
<p>
- `<playlist>#getRelated()`
- Retrieves related playlists.
- `<playlist>#getSuggestions()`
- Retrieves playlist suggestions.
- `<playlist>#getContinuation()`
- Retrieves continuation.
- `<playlist>#has_continuation`
- Checks if continuation is available.
- `<playlist>#page`
- Returns the original InnerTube response(s), parsed and sanitized.
</p>
</details>
<a name="getlyrics"></a>
### getLyrics(video_id)
Retrieves song lyrics.
**Returns:** `Promise.<MusicDescriptionShelf | undefined>`
| Param | Type | Description |
| --- | --- | --- |
| video_id | `string` | Video id |
<a name="getupnext"></a>
### getUpNext(video_id, automix?)
Retrieves up next content.
**Returns:** `Promise.<PlaylistPanel>`
| Param | Type | Description |
| --- | --- | --- |
| video_id | `string` | Video id |
| automix? | `boolean` | if automix should be fetched |
<a name="getrelated"></a>
### getRelated(video_id)
Retrieves related content.
**Returns:** `Promise.<Array.<MusicCarouselShelf | MusicDescriptionShelf>>`
| Param | Type | Description |
| --- | --- | --- |
| video_id | `string` | Video id |
<a name="getrecap"></a>
### getRecap()
Retrieves your YouTube Music recap.
**Returns:** `Promise.<Recap>`
<details>
<summary>Methods & Getters</summary>
<p>
- `<recap>#getPlaylist()`
- Retrieves recap playlist.
- `<recap>#page`
- Returns the original InnerTube response(s), parsed and sanitized.
</p>
</details>
<a name="getsearchsuggestions"></a>
### getSearchSuggestions(query)
Retrieves search suggestions.
**Returns:** `Promise.<Array.<SearchSuggestion | HistorySuggestion>>`
| Param | Type | Description |
| --- | --- | --- |
| query | `string` | Search query |

View File

@@ -1,99 +0,0 @@
# PlaylistManager
Playlist management class.
## API
* PlaylistManager
* [.create(title, video_ids)](#create)
* [.delete(playlist_id)](#delete)
* [.addVideos(playlist_id, video_ids)](#addvideos)
* [.removeVideos(playlist_id, video_ids)](#removevideos)
* [.moveVideo(playlist_id, moved_video_id, predecessor_video_id)](#movevideo)
* [.setName(playlist_id, name)](#setname)
* [.setDescription(playlist_id, description)](#setdescription)
<a name="create"></a>
### create(title, video_ids)
Creates a playlist.
**Returns:** `Promise.<ApiResponse>`
| Param | Type | Description |
| --- | --- | --- |
| title | `string` | Playlist name |
| video_ids | `string[]` | array of videos |
<a name="delete"></a>
### delete(playlist_id)
Deletes given playlist.
**Returns:** `Promise.<ApiResponse>`
| Param | Type | Description |
| --- | --- | --- |
| playlist_id | `string` | Playlist id |
<a name="addvideos"></a>
### addVideos(playlist_id, video_ids)
Adds videos to given playlist.
**Returns:** `Promise.<{ playlist_id: string; action_result: any[] }>`
| Param | Type | Description |
| --- | --- | --- |
| playlist_id | `string` | Playlist id |
| video_ids | `string` | array of videos |
<a name="removevideos"></a>
### removeVideos(playlist_id, video_ids)
Removes videos from given playlist.
**Returns:** `Promise.<{ playlist_id: string; action_result: any[] }>`
| Param | Type | Description |
| --- | --- | --- |
| playlist_id | `string` | Playlist id |
| video_ids | `string` | array of videos |
<a name="movevideo"></a>
### moveVideo(playlist_id, moved_video_id, predecessor_video_id)
Moves a video to a new position within a given playlist.
**Returns:** `Promise.<{ playlist_id: string; action_result: any[] }>`
| Param | Type | Description |
| --- | --- | --- |
| playlist_id | `string` | Playlist id |
| moved_video_id | `string` | the video to be moved |
| predecessor_video_id | `string` | the video present in the target position |
<a name="setname"></a>
### setName(playlist_id, name)
Sets the name / title for the given playlist.
**Returns:** `Promise.<ApiResponse>`
| Param | Type | Description |
| --- | --- | --- |
| playlist_id | `string` | Playlist id |
| name | `string` | Name / title |
<a name="setdescription"></a>
### setDescription(playlist_id, description)
Sets the description for the given playlist.
**Returns:** `Promise.<ApiResponse>`
| Param | Type | Description |
| --- | --- | --- |
| playlist_id | `string` | Playlist id |
| description | `string` | Description |

View File

@@ -1,83 +0,0 @@
# Session
Represents an InnerTube session.
## API
* Session
* [.signIn(credentials?)](#signin) ⇒ `function`
* [.signOut()](#signout) ⇒ `function`
* [.key](#key) ⇒ `getter`
* [.api_version](#api_version) ⇒ `getter`
* [.client_version](#client_version) ⇒ `getter`
* [.client_name](#client_name) ⇒ `getter`
* [.context](#context) ⇒ `getter`
* [.player](#player) ⇒ `getter`
* [.lang](#lang) ⇒ `getter`
<a name="signin"></a>
### signIn(credentials?)
Signs in with given credentials.
**Returns:** `Promise<void>`
| Param | Type | Description |
| --- | --- | --- |
| credentials? | `Credentials` | OAuth credentials |
<a name="signout"></a>
### signOut()
Signs out of the current account.
**Returns:** `Promise<ActionsResponse>`
<a name="key"></a>
### key
InnerTube API key.
**Returns:** `string`
<a name="api_version"></a>
### api_version
InnerTube API version.
**Returns:** `string`
<a name="client_version"></a>
### client_version
InnerTube client version.
**Returns:** `string`
<a name="client_name"></a>
### client_name
InnerTube client name.
**Returns:** `string`
<a name="context"></a>
### context
InnerTube context.
**Returns:** `Context`
<a name="player"></a>
### player
Player script object.
**Returns:** `Player`
<a name="lang"></a>
### lang
Client language.
**Returns:** `string`

View File

@@ -1,46 +0,0 @@
# Studio
YouTube Studio class (WIP).
## API
* Studio
* [.setThumbnail(video_id, buffer)](#setthumbnail)
* [.updateVideoMetadata(video_id, metadata)](#updatemetadata)
* [.upload(file, metadata)](#upload)
<a name="setthumbnail"></a>
### setThumbnail(video_id, buffer)
Uploads a custom thumbnail and sets it for a video.
**Returns:** `Promise.<ApiResponse>`
| Param | Type | Description |
| --- | --- | --- |
| video_id | `string` | Video id |
| buffer | `Uint8Array` | Thumbnail buffer |
<a name="updatemetadata"></a>
### updateVideoMetadata(video_id, metadata)
Updates given video's metadata.
**Returns:** `Promise.<ApiResponse>`
| Param | Type | Description |
| --- | --- | --- |
| video_id | `string` | Video id |
| metadata | `VideoMetadata` | Video metadata |
<a name="upload"></a>
### upload(file, metadata)
Uploads a video to YouTube.
**Returns:** `Promise.<ApiResponse>`
| Param | Type | Description |
| --- | --- | --- |
| file | `BodyInit` | Video file |
| metadata | `UploadedVideoMetadata` | Video metadata |

View File

@@ -1,62 +0,0 @@
# TabbedFeed
Represents a feed with tabs.
> **Note**
> This class extends the [Feed](feed.md) class.
## API
* TabbedFeed
* [.tabs](#tabs)
* [.getTabByName(title: string)](#gettabbyname)
* [.getTabByURL(url: string)](#gettabbyurl)
* [.hasTabWithURL(url: string)](#hastabwithurl)
* [.title](#title)
<a name="tabs"></a>
### tabs
Returns the feed's tabs as an array of strings.
**Returns:** `string[]`
<a name="gettabbyname"></a>
### getTabByName(title: string)
Fetches a tab by its title.
**Returns:** `Promise<TabbedFeed<T>>`
| Param | Type | Description |
| --- | --- | --- |
| title | `string` | The title of the tab to get |
<a name="gettabbyurl"></a>
### getTabByURL(url: string)
Fetches a tab by its URL.
**Returns:** `Promise<TabbedFeed<T>>`
| Param | Type | Description |
| --- | --- | --- |
| url | `string` | The URL of the tab to get |
<a name="hastabwithurl"></a>
### hasTabWithURL(url: string)
Returns whether the feed has a tab with the given URL.
**Returns:** `boolean`
| Param | Type | Description |
| --- | --- | --- |
| url | `string` | The URL to check |
<a name="title"></a>
### title
Returns the currently selected tab's title.
**Returns:** `string | undefined`

212
docs/api/README.md Normal file
View File

@@ -0,0 +1,212 @@
# youtubei.js
## References
### AppendContinuationItemsAction
Re-exports [AppendContinuationItemsAction](namespaces/YTNodes/classes/AppendContinuationItemsAction.md)
***
### CpnSource
Re-exports [CpnSource](namespaces/APIResponseTypes/type-aliases/CpnSource.md)
***
### default
Renames and re-exports [Innertube](classes/Innertube.md)
***
### IBrowseResponse
Re-exports [IBrowseResponse](namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)
***
### IGetNotificationsMenuResponse
Re-exports [IGetNotificationsMenuResponse](namespaces/APIResponseTypes/type-aliases/IGetNotificationsMenuResponse.md)
***
### IGetTranscriptResponse
Re-exports [IGetTranscriptResponse](namespaces/APIResponseTypes/type-aliases/IGetTranscriptResponse.md)
***
### IGuideResponse
Re-exports [IGuideResponse](namespaces/APIResponseTypes/type-aliases/IGuideResponse.md)
***
### INextResponse
Re-exports [INextResponse](namespaces/APIResponseTypes/type-aliases/INextResponse.md)
***
### IParsedResponse
Re-exports [IParsedResponse](namespaces/APIResponseTypes/interfaces/IParsedResponse.md)
***
### IPlayabilityStatus
Re-exports [IPlayabilityStatus](namespaces/APIResponseTypes/interfaces/IPlayabilityStatus.md)
***
### IPlaybackTracking
Re-exports [IPlaybackTracking](namespaces/APIResponseTypes/interfaces/IPlaybackTracking.md)
***
### IPlayerConfig
Re-exports [IPlayerConfig](namespaces/APIResponseTypes/interfaces/IPlayerConfig.md)
***
### IPlayerResponse
Re-exports [IPlayerResponse](namespaces/APIResponseTypes/type-aliases/IPlayerResponse.md)
***
### IRawPlayerConfig
Re-exports [IRawPlayerConfig](namespaces/APIResponseTypes/interfaces/IRawPlayerConfig.md)
***
### IRawResponse
Re-exports [IRawResponse](namespaces/APIResponseTypes/interfaces/IRawResponse.md)
***
### IResolveURLResponse
Re-exports [IResolveURLResponse](namespaces/APIResponseTypes/type-aliases/IResolveURLResponse.md)
***
### IResponseContext
Re-exports [IResponseContext](namespaces/APIResponseTypes/interfaces/IResponseContext.md)
***
### ISearchResponse
Re-exports [ISearchResponse](namespaces/APIResponseTypes/type-aliases/ISearchResponse.md)
***
### IServiceTrackingParams
Re-exports [IServiceTrackingParams](namespaces/APIResponseTypes/interfaces/IServiceTrackingParams.md)
***
### IStreamingData
Re-exports [IStreamingData](namespaces/APIResponseTypes/interfaces/IStreamingData.md)
***
### IUpdatedMetadataResponse
Re-exports [IUpdatedMetadataResponse](namespaces/APIResponseTypes/type-aliases/IUpdatedMetadataResponse.md)
***
### RawData
Re-exports [RawData](namespaces/APIResponseTypes/type-aliases/RawData.md)
***
### RawNode
Re-exports [RawNode](namespaces/APIResponseTypes/type-aliases/RawNode.md)
## Namespaces
- [APIResponseTypes](namespaces/APIResponseTypes/README.md)
- [Clients](namespaces/Clients/README.md)
- [Constants](namespaces/Constants/README.md)
- [Endpoints](namespaces/Endpoints/README.md)
- [FormatUtils](namespaces/FormatUtils/README.md)
- [Generator](namespaces/Generator/README.md)
- [Helpers](namespaces/Helpers/README.md)
- [LZW](namespaces/LZW/README.md)
- [Managers](namespaces/Managers/README.md)
- [Misc](namespaces/Misc/README.md)
- [Mixins](namespaces/Mixins/README.md)
- [Parser](namespaces/Parser/README.md)
- [ProtoUtils](namespaces/ProtoUtils/README.md)
- [Types](namespaces/Types/README.md)
- [Utils](namespaces/Utils/README.md)
- [YT](namespaces/YT/README.md)
- [YTKids](namespaces/YTKids/README.md)
- [YTMusic](namespaces/YTMusic/README.md)
- [YTNodes](namespaces/YTNodes/README.md)
- [YTShorts](namespaces/YTShorts/README.md)
## Enumerations
- [ClientType](enumerations/ClientType.md)
## Classes
- [Actions](classes/Actions.md)
- [Continuation](classes/Continuation.md)
- [ContinuationCommand](classes/ContinuationCommand.md)
- [EventEmitter](classes/EventEmitter.md)
- [GridContinuation](classes/GridContinuation.md)
- [HTTPClient](classes/HTTPClient.md)
- [Innertube](classes/Innertube.md)
- [ItemSectionContinuation](classes/ItemSectionContinuation.md)
- [LiveChatContinuation](classes/LiveChatContinuation.md)
- [Log](classes/Log.md)
- [MusicPlaylistShelfContinuation](classes/MusicPlaylistShelfContinuation.md)
- [MusicShelfContinuation](classes/MusicShelfContinuation.md)
- [NavigateAction](classes/NavigateAction.md)
- [OAuth2](classes/OAuth2.md)
- [Platform](classes/Platform.md)
- [Player](classes/Player.md)
- [PlaylistPanelContinuation](classes/PlaylistPanelContinuation.md)
- [ReloadContinuationItemsCommand](classes/ReloadContinuationItemsCommand.md)
- [SectionListContinuation](classes/SectionListContinuation.md)
- [Session](classes/Session.md)
- [ShowMiniplayerCommand](classes/ShowMiniplayerCommand.md)
- [UniversalCache](classes/UniversalCache.md)
## Interfaces
- [ApiResponse](interfaces/ApiResponse.md)
- [HTTPClientInit](interfaces/HTTPClientInit.md)
## Type Aliases
- [Context](type-aliases/Context.md)
- [DeviceAndUserCode](type-aliases/DeviceAndUserCode.md)
- [InnertubeEndpoint](type-aliases/InnertubeEndpoint.md)
- [OAuth2AuthErrorEventHandler](type-aliases/OAuth2AuthErrorEventHandler.md)
- [OAuth2AuthEventHandler](type-aliases/OAuth2AuthEventHandler.md)
- [OAuth2AuthPendingEventHandler](type-aliases/OAuth2AuthPendingEventHandler.md)
- [OAuth2ClientID](type-aliases/OAuth2ClientID.md)
- [OAuth2Tokens](type-aliases/OAuth2Tokens.md)
- [ParsedResponse](type-aliases/ParsedResponse.md)
- [SessionArgs](type-aliases/SessionArgs.md)
- [SessionData](type-aliases/SessionData.md)
- [SessionOptions](type-aliases/SessionOptions.md)
- [SWSessionData](type-aliases/SWSessionData.md)

131
docs/api/classes/Actions.md Normal file
View File

@@ -0,0 +1,131 @@
[youtubei.js](../README.md) / Actions
# Class: Actions
## Constructors
### new Actions()
> **new Actions**(`session`): [`Actions`](Actions.md)
#### Parameters
**session**: [`Session`](Session.md)
#### Returns
[`Actions`](Actions.md)
#### Defined in
[src/core/Actions.ts:34](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Actions.ts#L34)
## Properties
### session
> **session**: [`Session`](Session.md)
#### Defined in
[src/core/Actions.ts:32](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Actions.ts#L32)
## Methods
### execute()
#### execute(endpoint, args)
> **execute**\<`T`\>(`endpoint`, `args`): `Promise`\<[`ParsedResponse`](../type-aliases/ParsedResponse.md)\<`T`\>\>
Executes an API call.
##### Type Parameters
**T** *extends* `string`
##### Parameters
**endpoint**: `T`
The endpoint to call.
**args**
Call arguments
**args.parse**: `true`
**args.protobuf?**: `false`
**args.serialized\_data?**: `any`
##### Returns
`Promise`\<[`ParsedResponse`](../type-aliases/ParsedResponse.md)\<`T`\>\>
##### Defined in
[src/core/Actions.ts:78](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Actions.ts#L78)
#### execute(endpoint, args)
> **execute**\<`T`\>(`endpoint`, `args`?): `Promise`\<[`ApiResponse`](../interfaces/ApiResponse.md)\>
##### Type Parameters
**T** *extends* `string`
##### Parameters
**endpoint**: `T`
**args?**
**args.parse?**: `false`
**args.protobuf?**: `true`
**args.serialized\_data?**: `any`
##### Returns
`Promise`\<[`ApiResponse`](../interfaces/ApiResponse.md)\>
##### Defined in
[src/core/Actions.ts:79](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Actions.ts#L79)
***
### stats()
> **stats**(`url`, `client`, `params`): `Promise`\<`Response`\>
Makes calls to the playback tracking API.
#### Parameters
**url**: `string`
The URL to call.
**client**
The client to use.
**client.client\_name**: `string`
**client.client\_version**: `string`
**params**
Call parameters.
#### Returns
`Promise`\<`Response`\>
#### Defined in
[src/core/Actions.ts:56](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Actions.ts#L56)

View File

@@ -0,0 +1,233 @@
[youtubei.js](../README.md) / Continuation
# Class: Continuation
## Extends
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
## Constructors
### new Continuation()
> **new Continuation**(`data`): [`Continuation`](Continuation.md)
#### Parameters
**data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
#### Returns
[`Continuation`](Continuation.md)
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`constructor`](../namespaces/Helpers/classes/YTNode.md#constructors)
#### Defined in
[src/parser/continuations.ts:147](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L147)
## Properties
### continuation\_type
> **continuation\_type**: `string`
#### Defined in
[src/parser/continuations.ts:142](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L142)
***
### time\_until\_last\_message\_ms?
> `optional` **time\_until\_last\_message\_ms**: `number`
#### Defined in
[src/parser/continuations.ts:144](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L144)
***
### timeout\_ms?
> `optional` **timeout\_ms**: `number`
#### Defined in
[src/parser/continuations.ts:143](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L143)
***
### token
> **token**: `string`
#### Defined in
[src/parser/continuations.ts:145](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L145)
***
### type
> `readonly` **type**: `string`
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type)
#### Defined in
[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L8)
***
### type
> `readonly` `static` **type**: `"continuation"` = `'continuation'`
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type-1)
#### Defined in
[src/parser/continuations.ts:140](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L140)
## Methods
### as()
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
Cast to one of the given types.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
#### Returns
`InstanceType`\<`K`\[`number`\]\>
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:35](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L35)
***
### hasKey()
> **hasKey**\<`T`, `R`\>(`key`): `this is Continuation & { [k in string]: R }`
Check for a key without asserting the type.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
`this is Continuation & { [k in string]: R }`
Whether the node has the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`hasKey`](../namespaces/Helpers/classes/YTNode.md#haskey)
#### Defined in
[src/parser/helpers.ts:47](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L47)
***
### is()
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
Check if the node is of the given type.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
The type to check
#### Returns
`this is InstanceType<K[number]>`
whether the node is of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`is`](../namespaces/Helpers/classes/YTNode.md#is)
#### Defined in
[src/parser/helpers.ts:28](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L28)
***
### key()
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
Assert that the node has the given key and return it.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
The value of the key wrapped in a Maybe
#### Throws
If the node does not have the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`key`](../namespaces/Helpers/classes/YTNode.md#key)
#### Defined in
[src/parser/helpers.ts:57](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L57)

View File

@@ -0,0 +1,213 @@
[youtubei.js](../README.md) / ContinuationCommand
# Class: ContinuationCommand
## Extends
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
## Constructors
### new ContinuationCommand()
> **new ContinuationCommand**(`data`): [`ContinuationCommand`](ContinuationCommand.md)
#### Parameters
**data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
#### Returns
[`ContinuationCommand`](ContinuationCommand.md)
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`constructor`](../namespaces/Helpers/classes/YTNode.md#constructors)
#### Defined in
[src/parser/continuations.ts:220](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L220)
## Properties
### request
> **request**: `string`
#### Defined in
[src/parser/continuations.ts:217](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L217)
***
### token
> **token**: `string`
#### Defined in
[src/parser/continuations.ts:218](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L218)
***
### type
> `readonly` **type**: `string`
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type)
#### Defined in
[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L8)
***
### type
> `readonly` `static` **type**: `"ContinuationCommand"` = `'ContinuationCommand'`
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type-1)
#### Defined in
[src/parser/continuations.ts:215](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L215)
## Methods
### as()
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
Cast to one of the given types.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
#### Returns
`InstanceType`\<`K`\[`number`\]\>
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:35](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L35)
***
### hasKey()
> **hasKey**\<`T`, `R`\>(`key`): `this is ContinuationCommand & { [k in string]: R }`
Check for a key without asserting the type.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
`this is ContinuationCommand & { [k in string]: R }`
Whether the node has the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`hasKey`](../namespaces/Helpers/classes/YTNode.md#haskey)
#### Defined in
[src/parser/helpers.ts:47](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L47)
***
### is()
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
Check if the node is of the given type.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
The type to check
#### Returns
`this is InstanceType<K[number]>`
whether the node is of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`is`](../namespaces/Helpers/classes/YTNode.md#is)
#### Defined in
[src/parser/helpers.ts:28](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L28)
***
### key()
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
Assert that the node has the given key and return it.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
The value of the key wrapped in a Maybe
#### Throws
If the node does not have the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`key`](../namespaces/Helpers/classes/YTNode.md#key)
#### Defined in
[src/parser/helpers.ts:57](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L57)

View File

@@ -0,0 +1,208 @@
[youtubei.js](../README.md) / EventEmitter
# Class: EventEmitter
## Extends
- `EventTarget`
## Extended by
- [`Session`](Session.md)
- [`LiveChat`](../namespaces/YT/classes/LiveChat.md)
## Constructors
### new EventEmitter()
> **new EventEmitter**(): [`EventEmitter`](EventEmitter.md)
#### Returns
[`EventEmitter`](EventEmitter.md)
#### Overrides
`EventTarget.constructor`
#### Defined in
[src/utils/EventEmitterLike.ts:6](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/EventEmitterLike.ts#L6)
## Methods
### addEventListener()
> **addEventListener**(`type`, `callback`, `options`?): `void`
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
#### Parameters
**type**: `string`
**callback**: `null` \| `EventListenerOrEventListenerObject`
**options?**: `boolean` \| `AddEventListenerOptions`
#### Returns
`void`
#### Inherited from
`EventTarget.addEventListener`
#### Defined in
node\_modules/typescript/lib/lib.dom.d.ts:8256
***
### dispatchEvent()
> **dispatchEvent**(`event`): `boolean`
Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
#### Parameters
**event**: `Event`
#### Returns
`boolean`
#### Inherited from
`EventTarget.dispatchEvent`
#### Defined in
node\_modules/typescript/lib/lib.dom.d.ts:8262
***
### emit()
> **emit**(`type`, ...`args`): `void`
#### Parameters
**type**: `string`
• ...**args**: `any`[]
#### Returns
`void`
#### Defined in
[src/utils/EventEmitterLike.ts:10](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/EventEmitterLike.ts#L10)
***
### off()
> **off**(`type`, `listener`): `void`
#### Parameters
**type**: `string`
**listener**
#### Returns
`void`
#### Defined in
[src/utils/EventEmitterLike.ts:40](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/EventEmitterLike.ts#L40)
***
### on()
> **on**(`type`, `listener`): `void`
#### Parameters
**type**: `string`
**listener**
#### Returns
`void`
#### Defined in
[src/utils/EventEmitterLike.ts:15](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/EventEmitterLike.ts#L15)
***
### once()
> **once**(`type`, `listener`): `void`
#### Parameters
**type**: `string`
**listener**
#### Returns
`void`
#### Defined in
[src/utils/EventEmitterLike.ts:27](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/EventEmitterLike.ts#L27)
***
### removeEventListener()
> **removeEventListener**(`type`, `callback`, `options`?): `void`
Removes the event listener in target's event listener list with the same type, callback, and options.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
#### Parameters
**type**: `string`
**callback**: `null` \| `EventListenerOrEventListenerObject`
**options?**: `boolean` \| `EventListenerOptions`
#### Returns
`void`
#### Inherited from
`EventTarget.removeEventListener`
#### Defined in
node\_modules/typescript/lib/lib.dom.d.ts:8268

View File

@@ -0,0 +1,227 @@
[youtubei.js](../README.md) / GridContinuation
# Class: GridContinuation
## Extends
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
## Constructors
### new GridContinuation()
> **new GridContinuation**(`data`): [`GridContinuation`](GridContinuation.md)
#### Parameters
**data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
#### Returns
[`GridContinuation`](GridContinuation.md)
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`constructor`](../namespaces/Helpers/classes/YTNode.md#constructors)
#### Defined in
[src/parser/continuations.ts:114](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L114)
## Properties
### continuation
> **continuation**: `string`
#### Defined in
[src/parser/continuations.ts:111](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L111)
***
### items
> **items**: `null` \| [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/continuations.ts:112](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L112)
***
### type
> `readonly` **type**: `string`
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type)
#### Defined in
[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L8)
***
### type
> `readonly` `static` **type**: `"gridContinuation"` = `'gridContinuation'`
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type-1)
#### Defined in
[src/parser/continuations.ts:109](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L109)
## Accessors
### contents
> `get` **contents**(): `null` \| [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
#### Returns
`null` \| [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/continuations.ts:120](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L120)
## Methods
### as()
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
Cast to one of the given types.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
#### Returns
`InstanceType`\<`K`\[`number`\]\>
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:35](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L35)
***
### hasKey()
> **hasKey**\<`T`, `R`\>(`key`): `this is GridContinuation & { [k in string]: R }`
Check for a key without asserting the type.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
`this is GridContinuation & { [k in string]: R }`
Whether the node has the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`hasKey`](../namespaces/Helpers/classes/YTNode.md#haskey)
#### Defined in
[src/parser/helpers.ts:47](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L47)
***
### is()
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
Check if the node is of the given type.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
The type to check
#### Returns
`this is InstanceType<K[number]>`
whether the node is of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`is`](../namespaces/Helpers/classes/YTNode.md#is)
#### Defined in
[src/parser/helpers.ts:28](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L28)
***
### key()
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
Assert that the node has the given key and return it.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
The value of the key wrapped in a Maybe
#### Throws
If the node does not have the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`key`](../namespaces/Helpers/classes/YTNode.md#key)
#### Defined in
[src/parser/helpers.ts:57](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L57)

View File

@@ -0,0 +1,71 @@
[youtubei.js](../README.md) / HTTPClient
# Class: HTTPClient
## Constructors
### new HTTPClient()
> **new HTTPClient**(`session`, `cookie`?, `fetch`?): [`HTTPClient`](HTTPClient.md)
#### Parameters
**session**: [`Session`](Session.md)
**cookie?**: `string`
**fetch?**
#### Returns
[`HTTPClient`](HTTPClient.md)
#### Defined in
[src/utils/HTTPClient.ts:23](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/HTTPClient.ts#L23)
## Accessors
### fetch\_function
> `get` **fetch\_function**(): (`input`, `init`?) => `Promise`\<`Response`\>
#### Returns
`Function`
[MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch)
##### Parameters
**input**: `URL` \| `RequestInfo`
**init?**: `RequestInit`
##### Returns
`Promise`\<`Response`\>
#### Defined in
[src/utils/HTTPClient.ts:29](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/HTTPClient.ts#L29)
## Methods
### fetch()
> **fetch**(`input`, `init`?): `Promise`\<`Response`\>
#### Parameters
**input**: `string` \| `URL` \| `Request`
**init?**: `RequestInit` & [`HTTPClientInit`](../interfaces/HTTPClientInit.md)
#### Returns
`Promise`\<`Response`\>
#### Defined in
[src/utils/HTTPClient.ts:33](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/HTTPClient.ts#L33)

View File

@@ -0,0 +1,619 @@
[youtubei.js](../README.md) / Innertube
# Class: Innertube
Provides access to various services and modules in the YouTube API.
## Constructors
### new Innertube()
> **new Innertube**(`session`): [`Innertube`](Innertube.md)
#### Parameters
**session**: [`Session`](Session.md)
#### Returns
[`Innertube`](Innertube.md)
#### Defined in
[src/Innertube.ts:59](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L59)
## Accessors
### account
> `get` **account**(): [`AccountManager`](../namespaces/Managers/classes/AccountManager.md)
An interface for managing and retrieving account information.
#### Returns
[`AccountManager`](../namespaces/Managers/classes/AccountManager.md)
#### Defined in
[src/Innertube.ts:478](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L478)
***
### actions
> `get` **actions**(): [`Actions`](Actions.md)
An internal class used to dispatch requests.
#### Returns
[`Actions`](Actions.md)
#### Defined in
[src/Innertube.ts:499](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L499)
***
### interact
> `get` **interact**(): [`InteractionManager`](../namespaces/Managers/classes/InteractionManager.md)
An interface for directly interacting with certain YouTube features.
#### Returns
[`InteractionManager`](../namespaces/Managers/classes/InteractionManager.md)
#### Defined in
[src/Innertube.ts:492](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L492)
***
### kids
> `get` **kids**(): [`Kids`](../namespaces/Clients/classes/Kids.md)
An interface for interacting with YouTube Kids.
#### Returns
[`Kids`](../namespaces/Clients/classes/Kids.md)
#### Defined in
[src/Innertube.ts:471](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L471)
***
### music
> `get` **music**(): [`Music`](../namespaces/Clients/classes/Music.md)
An interface for interacting with YouTube Music.
#### Returns
[`Music`](../namespaces/Clients/classes/Music.md)
#### Defined in
[src/Innertube.ts:457](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L457)
***
### playlist
> `get` **playlist**(): [`PlaylistManager`](../namespaces/Managers/classes/PlaylistManager.md)
An interface for managing playlists.
#### Returns
[`PlaylistManager`](../namespaces/Managers/classes/PlaylistManager.md)
#### Defined in
[src/Innertube.ts:485](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L485)
***
### session
> `get` **session**(): [`Session`](Session.md)
The session used by this instance.
#### Returns
[`Session`](Session.md)
#### Defined in
[src/Innertube.ts:506](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L506)
***
### studio
> `get` **studio**(): [`Studio`](../namespaces/Clients/classes/Studio.md)
An interface for interacting with YouTube Studio.
#### Returns
[`Studio`](../namespaces/Clients/classes/Studio.md)
#### Defined in
[src/Innertube.ts:464](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L464)
## Methods
### call()
#### call(endpoint, args)
> **call**\<`T`\>(`endpoint`, `args`): `Promise`\<`T`\>
Utility method to call an endpoint without having to use [Actions](Actions.md).
##### Type Parameters
**T** *extends* [`IParsedResponse`](../namespaces/APIResponseTypes/interfaces/IParsedResponse.md)
##### Parameters
**endpoint**: [`NavigationEndpoint`](../namespaces/YTNodes/classes/NavigationEndpoint.md)
The endpoint to call.
**args**
Call arguments.
**args.parse**: `true`
##### Returns
`Promise`\<`T`\>
##### Defined in
[src/Innertube.ts:448](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L448)
#### call(endpoint, args)
> **call**(`endpoint`, `args`?): `Promise`\<[`ApiResponse`](../interfaces/ApiResponse.md)\>
##### Parameters
**endpoint**: [`NavigationEndpoint`](../namespaces/YTNodes/classes/NavigationEndpoint.md)
**args?**
**args.parse?**: `false`
##### Returns
`Promise`\<[`ApiResponse`](../interfaces/ApiResponse.md)\>
##### Defined in
[src/Innertube.ts:449](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L449)
***
### download()
> **download**(`video_id`, `options`?): `Promise`\<`ReadableStream`\<`Uint8Array`\>\>
Downloads a given video. If all you need the direct download link, see [getStreamingData](Innertube.md#getstreamingdata).
If you wish to retrieve the video info too, have a look at [getBasicInfo](Innertube.md#getbasicinfo) or [getInfo](Innertube.md#getinfo).
#### Parameters
**video\_id**: `string`
The video id.
**options?**: [`DownloadOptions`](../namespaces/Types/interfaces/DownloadOptions.md)
Download options.
#### Returns
`Promise`\<`ReadableStream`\<`Uint8Array`\>\>
#### Defined in
[src/Innertube.ts:423](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L423)
***
### getBasicInfo()
> **getBasicInfo**(`video_id`, `client`?): `Promise`\<[`VideoInfo`](../namespaces/YT/classes/VideoInfo.md)\>
#### Parameters
**video\_id**: `string`
**client?**: [`InnerTubeClient`](../namespaces/Types/type-aliases/InnerTubeClient.md)
#### Returns
`Promise`\<[`VideoInfo`](../namespaces/YT/classes/VideoInfo.md)\>
#### Defined in
[src/Innertube.ts:107](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L107)
***
### getChannel()
> **getChannel**(`id`): `Promise`\<[`Channel`](../namespaces/YT/classes/Channel.md)\>
#### Parameters
**id**: `string`
#### Returns
`Promise`\<[`Channel`](../namespaces/YT/classes/Channel.md)\>
#### Defined in
[src/Innertube.ts:331](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L331)
***
### getChannelsFeed()
> **getChannelsFeed**(): `Promise`\<[`Feed`](../namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)\>\>
#### Returns
`Promise`\<[`Feed`](../namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)\>\>
#### Defined in
[src/Innertube.ts:324](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L324)
***
### getComments()
> **getComments**(`video_id`, `sort_by`?, `comment_id`?): `Promise`\<[`Comments`](../namespaces/YT/classes/Comments.md)\>
#### Parameters
**video\_id**: `string`
**sort\_by?**: `"TOP_COMMENTS"` \| `"NEWEST_FIRST"`
**comment\_id?**: `string`
#### Returns
`Promise`\<[`Comments`](../namespaces/YT/classes/Comments.md)\>
#### Defined in
[src/Innertube.ts:250](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L250)
***
### getGuide()
> **getGuide**(): `Promise`\<[`Guide`](../namespaces/YT/classes/Guide.md)\>
Retrieves YouTube's content guide.
#### Returns
`Promise`\<[`Guide`](../namespaces/YT/classes/Guide.md)\>
#### Defined in
[src/Innertube.ts:291](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L291)
***
### getHashtag()
> **getHashtag**(`hashtag`): `Promise`\<[`HashtagFeed`](../namespaces/YT/classes/HashtagFeed.md)\>
#### Parameters
**hashtag**: `string`
#### Returns
`Promise`\<[`HashtagFeed`](../namespaces/YT/classes/HashtagFeed.md)\>
#### Defined in
[src/Innertube.ts:378](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L378)
***
### getHistory()
> **getHistory**(): `Promise`\<[`History`](../namespaces/YT/classes/History.md)\>
#### Returns
`Promise`\<[`History`](../namespaces/YT/classes/History.md)\>
#### Defined in
[src/Innertube.ts:303](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L303)
***
### getHomeFeed()
> **getHomeFeed**(): `Promise`\<[`HomeFeed`](../namespaces/YT/classes/HomeFeed.md)\>
#### Returns
`Promise`\<[`HomeFeed`](../namespaces/YT/classes/HomeFeed.md)\>
#### Defined in
[src/Innertube.ts:281](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L281)
***
### getInfo()
> **getInfo**(`target`, `client`?): `Promise`\<[`VideoInfo`](../namespaces/YT/classes/VideoInfo.md)\>
#### Parameters
**target**: `string` \| [`NavigationEndpoint`](../namespaces/YTNodes/classes/NavigationEndpoint.md)
**client?**: [`InnerTubeClient`](../namespaces/Types/type-aliases/InnerTubeClient.md)
#### Returns
`Promise`\<[`VideoInfo`](../namespaces/YT/classes/VideoInfo.md)\>
#### Defined in
[src/Innertube.ts:67](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L67)
***
### getLibrary()
> **getLibrary**(): `Promise`\<[`Library`](../namespaces/YT/classes/Library.md)\>
#### Returns
`Promise`\<[`Library`](../namespaces/YT/classes/Library.md)\>
#### Defined in
[src/Innertube.ts:296](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L296)
***
### getNotifications()
> **getNotifications**(): `Promise`\<[`NotificationsMenu`](../namespaces/YT/classes/NotificationsMenu.md)\>
#### Returns
`Promise`\<[`NotificationsMenu`](../namespaces/YT/classes/NotificationsMenu.md)\>
#### Defined in
[src/Innertube.ts:339](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L339)
***
### getPlaylist()
> **getPlaylist**(`id`): `Promise`\<[`Playlist`](../namespaces/YT/classes/Playlist.md)\>
#### Parameters
**id**: `string`
#### Returns
`Promise`\<[`Playlist`](../namespaces/YT/classes/Playlist.md)\>
#### Defined in
[src/Innertube.ts:364](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L364)
***
### getPlaylists()
> **getPlaylists**(): `Promise`\<[`Feed`](../namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)\>\>
Retrieves the user's playlists.
#### Returns
`Promise`\<[`Feed`](../namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)\>\>
#### Defined in
[src/Innertube.ts:357](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L357)
***
### getSearchSuggestions()
> **getSearchSuggestions**(`query`): `Promise`\<`string`[]\>
#### Parameters
**query**: `string`
#### Returns
`Promise`\<`string`[]\>
#### Defined in
[src/Innertube.ts:229](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L229)
***
### getShortsVideoInfo()
> **getShortsVideoInfo**(`video_id`, `client`?): `Promise`\<[`ShortFormVideoInfo`](../namespaces/YTShorts/classes/ShortFormVideoInfo.md)\>
#### Parameters
**video\_id**: `string`
**client?**: [`InnerTubeClient`](../namespaces/Types/type-aliases/InnerTubeClient.md)
#### Returns
`Promise`\<[`ShortFormVideoInfo`](../namespaces/YTShorts/classes/ShortFormVideoInfo.md)\>
#### Defined in
[src/Innertube.ts:124](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L124)
***
### getStreamingData()
> **getStreamingData**(`video_id`, `options`): `Promise`\<[`Format`](../namespaces/Misc/classes/Format.md)\>
An alternative to [download](Innertube.md#download).
Returns deciphered streaming data.
If you wish to retrieve the video info too, have a look at [getBasicInfo](Innertube.md#getbasicinfo) or [getInfo](Innertube.md#getinfo).
#### Parameters
**video\_id**: `string`
The video id.
**options**: [`FormatOptions`](../namespaces/Types/interfaces/FormatOptions.md) = `{}`
Format options.
#### Returns
`Promise`\<[`Format`](../namespaces/Misc/classes/Format.md)\>
#### Defined in
[src/Innertube.ts:408](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L408)
***
### getSubscriptionsFeed()
> **getSubscriptionsFeed**(): `Promise`\<[`Feed`](../namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)\>\>
#### Returns
`Promise`\<[`Feed`](../namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)\>\>
#### Defined in
[src/Innertube.ts:317](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L317)
***
### getTrending()
> **getTrending**(): `Promise`\<[`TabbedFeed`](../namespaces/Mixins/classes/TabbedFeed.md)\<[`IBrowseResponse`](../namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)\>\>
#### Returns
`Promise`\<[`TabbedFeed`](../namespaces/Mixins/classes/TabbedFeed.md)\<[`IBrowseResponse`](../namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)\>\>
#### Defined in
[src/Innertube.ts:310](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L310)
***
### getUnseenNotificationsCount()
> **getUnseenNotificationsCount**(): `Promise`\<`number`\>
#### Returns
`Promise`\<`number`\>
#### Defined in
[src/Innertube.ts:348](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L348)
***
### resolveURL()
> **resolveURL**(`url`): `Promise`\<[`NavigationEndpoint`](../namespaces/YTNodes/classes/NavigationEndpoint.md)\>
Resolves the given URL.
#### Parameters
**url**: `string`
The URL.
#### Returns
`Promise`\<[`NavigationEndpoint`](../namespaces/YTNodes/classes/NavigationEndpoint.md)\>
#### Defined in
[src/Innertube.ts:432](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L432)
***
### search()
> **search**(`query`, `filters`): `Promise`\<[`Search`](../namespaces/YT/classes/Search.md)\>
#### Parameters
**query**: `string`
**filters**: [`SearchFilters`](../namespaces/Types/type-aliases/SearchFilters.md) = `{}`
#### Returns
`Promise`\<[`Search`](../namespaces/YT/classes/Search.md)\>
#### Defined in
[src/Innertube.ts:155](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L155)
***
### create()
> `static` **create**(`config`): `Promise`\<[`Innertube`](Innertube.md)\>
#### Parameters
**config**: [`SessionOptions`](../type-aliases/SessionOptions.md) = `{}`
#### Returns
`Promise`\<[`Innertube`](Innertube.md)\>
#### Defined in
[src/Innertube.ts:63](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/Innertube.ts#L63)

View File

@@ -0,0 +1,213 @@
[youtubei.js](../README.md) / ItemSectionContinuation
# Class: ItemSectionContinuation
## Extends
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
## Constructors
### new ItemSectionContinuation()
> **new ItemSectionContinuation**(`data`): [`ItemSectionContinuation`](ItemSectionContinuation.md)
#### Parameters
**data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
#### Returns
[`ItemSectionContinuation`](ItemSectionContinuation.md)
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`constructor`](../namespaces/Helpers/classes/YTNode.md#constructors)
#### Defined in
[src/parser/continuations.ts:15](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L15)
## Properties
### contents
> **contents**: `null` \| [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/continuations.ts:12](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L12)
***
### continuation?
> `optional` **continuation**: `string`
#### Defined in
[src/parser/continuations.ts:13](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L13)
***
### type
> `readonly` **type**: `string`
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type)
#### Defined in
[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L8)
***
### type
> `readonly` `static` **type**: `"itemSectionContinuation"` = `'itemSectionContinuation'`
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type-1)
#### Defined in
[src/parser/continuations.ts:10](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L10)
## Methods
### as()
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
Cast to one of the given types.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
#### Returns
`InstanceType`\<`K`\[`number`\]\>
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:35](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L35)
***
### hasKey()
> **hasKey**\<`T`, `R`\>(`key`): `this is ItemSectionContinuation & { [k in string]: R }`
Check for a key without asserting the type.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
`this is ItemSectionContinuation & { [k in string]: R }`
Whether the node has the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`hasKey`](../namespaces/Helpers/classes/YTNode.md#haskey)
#### Defined in
[src/parser/helpers.ts:47](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L47)
***
### is()
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
Check if the node is of the given type.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
The type to check
#### Returns
`this is InstanceType<K[number]>`
whether the node is of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`is`](../namespaces/Helpers/classes/YTNode.md#is)
#### Defined in
[src/parser/helpers.ts:28](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L28)
***
### key()
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
Assert that the node has the given key and return it.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
The value of the key wrapped in a Maybe
#### Throws
If the node does not have the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`key`](../namespaces/Helpers/classes/YTNode.md#key)
#### Defined in
[src/parser/helpers.ts:57](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L57)

View File

@@ -0,0 +1,283 @@
[youtubei.js](../README.md) / LiveChatContinuation
# Class: LiveChatContinuation
## Extends
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
## Constructors
### new LiveChatContinuation()
> **new LiveChatContinuation**(`data`): [`LiveChatContinuation`](LiveChatContinuation.md)
#### Parameters
**data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
#### Returns
[`LiveChatContinuation`](LiveChatContinuation.md)
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`constructor`](../namespaces/Helpers/classes/YTNode.md#constructors)
#### Defined in
[src/parser/continuations.ts:174](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L174)
## Properties
### action\_panel
> **action\_panel**: `null` \| [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
#### Defined in
[src/parser/continuations.ts:160](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L160)
***
### actions
> **actions**: [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/continuations.ts:159](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L159)
***
### continuation
> **continuation**: [`Continuation`](Continuation.md)
#### Defined in
[src/parser/continuations.ts:171](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L171)
***
### emojis
> **emojis**: `object`[]
#### Defined in
[src/parser/continuations.ts:165](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L165)
***
### header
> **header**: `null` \| [`LiveChatHeader`](../namespaces/YTNodes/classes/LiveChatHeader.md)
#### Defined in
[src/parser/continuations.ts:162](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L162)
***
### item\_list
> **item\_list**: `null` \| [`LiveChatItemList`](../namespaces/YTNodes/classes/LiveChatItemList.md)
#### Defined in
[src/parser/continuations.ts:161](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L161)
***
### participants\_list
> **participants\_list**: `null` \| [`LiveChatParticipantsList`](../namespaces/YTNodes/classes/LiveChatParticipantsList.md)
#### Defined in
[src/parser/continuations.ts:163](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L163)
***
### popout\_message
> **popout\_message**: `null` \| [`Message`](../namespaces/YTNodes/classes/Message.md)
#### Defined in
[src/parser/continuations.ts:164](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L164)
***
### type
> `readonly` **type**: `string`
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type)
#### Defined in
[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L8)
***
### viewer\_name
> **viewer\_name**: `string`
#### Defined in
[src/parser/continuations.ts:172](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L172)
***
### type
> `readonly` `static` **type**: `"liveChatContinuation"` = `'liveChatContinuation'`
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type-1)
#### Defined in
[src/parser/continuations.ts:157](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L157)
## Methods
### as()
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
Cast to one of the given types.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
#### Returns
`InstanceType`\<`K`\[`number`\]\>
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:35](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L35)
***
### hasKey()
> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatContinuation & { [k in string]: R }`
Check for a key without asserting the type.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
`this is LiveChatContinuation & { [k in string]: R }`
Whether the node has the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`hasKey`](../namespaces/Helpers/classes/YTNode.md#haskey)
#### Defined in
[src/parser/helpers.ts:47](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L47)
***
### is()
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
Check if the node is of the given type.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
The type to check
#### Returns
`this is InstanceType<K[number]>`
whether the node is of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`is`](../namespaces/Helpers/classes/YTNode.md#is)
#### Defined in
[src/parser/helpers.ts:28](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L28)
***
### key()
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
Assert that the node has the given key and return it.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
The value of the key wrapped in a Maybe
#### Throws
If the node does not have the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`key`](../namespaces/Helpers/classes/YTNode.md#key)
#### Defined in
[src/parser/helpers.ts:57](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L57)

161
docs/api/classes/Log.md Normal file
View File

@@ -0,0 +1,161 @@
[youtubei.js](../README.md) / Log
# Class: Log
## Constructors
### new Log()
> **new Log**(): [`Log`](Log.md)
#### Returns
[`Log`](Log.md)
## Properties
### Level
> `static` **Level**: `object`
#### DEBUG
> **DEBUG**: `number` = `4`
#### ERROR
> **ERROR**: `number` = `1`
#### INFO
> **INFO**: `number` = `3`
#### NONE
> **NONE**: `number` = `0`
#### WARNING
> **WARNING**: `number` = `2`
#### Defined in
[src/utils/Log.ts:4](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Log.ts#L4)
## Methods
### debug()
> `static` **debug**(`tag`?, ...`args`?): `void`
#### Parameters
**tag?**: `string`
• ...**args?**: `any`[]
#### Returns
`void`
#### Defined in
[src/utils/Log.ts:32](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Log.ts#L32)
***
### error()
> `static` **error**(`tag`?, ...`args`?): `void`
#### Parameters
**tag?**: `string`
• ...**args?**: `any`[]
#### Returns
`void`
#### Defined in
[src/utils/Log.ts:30](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Log.ts#L30)
***
### info()
> `static` **info**(`tag`?, ...`args`?): `void`
#### Parameters
**tag?**: `string`
• ...**args?**: `any`[]
#### Returns
`void`
#### Defined in
[src/utils/Log.ts:31](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Log.ts#L31)
***
### setLevel()
> `static` **setLevel**(...`args`): `void`
#### Parameters
• ...**args**: `number`[]
#### Returns
`void`
#### Defined in
[src/utils/Log.ts:46](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Log.ts#L46)
***
### warn()
> `static` **warn**(`tag`?, ...`args`?): `void`
#### Parameters
**tag?**: `string`
• ...**args?**: `any`[]
#### Returns
`void`
#### Defined in
[src/utils/Log.ts:29](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Log.ts#L29)
***
### warnOnce()
> `static` **warnOnce**(`id`, ...`args`): `void`
#### Parameters
**id**: `string`
• ...**args**: `any`[]
#### Returns
`void`
#### Defined in
[src/utils/Log.ts:22](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Log.ts#L22)

View File

@@ -0,0 +1,213 @@
[youtubei.js](../README.md) / MusicPlaylistShelfContinuation
# Class: MusicPlaylistShelfContinuation
## Extends
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
## Constructors
### new MusicPlaylistShelfContinuation()
> **new MusicPlaylistShelfContinuation**(`data`): [`MusicPlaylistShelfContinuation`](MusicPlaylistShelfContinuation.md)
#### Parameters
**data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
#### Returns
[`MusicPlaylistShelfContinuation`](MusicPlaylistShelfContinuation.md)
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`constructor`](../namespaces/Helpers/classes/YTNode.md#constructors)
#### Defined in
[src/parser/continuations.ts:86](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L86)
## Properties
### contents
> **contents**: `null` \| [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/continuations.ts:84](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L84)
***
### continuation
> **continuation**: `string`
#### Defined in
[src/parser/continuations.ts:83](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L83)
***
### type
> `readonly` **type**: `string`
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type)
#### Defined in
[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L8)
***
### type
> `readonly` `static` **type**: `"musicPlaylistShelfContinuation"` = `'musicPlaylistShelfContinuation'`
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type-1)
#### Defined in
[src/parser/continuations.ts:81](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L81)
## Methods
### as()
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
Cast to one of the given types.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
#### Returns
`InstanceType`\<`K`\[`number`\]\>
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:35](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L35)
***
### hasKey()
> **hasKey**\<`T`, `R`\>(`key`): `this is MusicPlaylistShelfContinuation & { [k in string]: R }`
Check for a key without asserting the type.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
`this is MusicPlaylistShelfContinuation & { [k in string]: R }`
Whether the node has the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`hasKey`](../namespaces/Helpers/classes/YTNode.md#haskey)
#### Defined in
[src/parser/helpers.ts:47](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L47)
***
### is()
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
Check if the node is of the given type.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
The type to check
#### Returns
`this is InstanceType<K[number]>`
whether the node is of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`is`](../namespaces/Helpers/classes/YTNode.md#is)
#### Defined in
[src/parser/helpers.ts:28](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L28)
***
### key()
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
Assert that the node has the given key and return it.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
The value of the key wrapped in a Maybe
#### Throws
If the node does not have the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`key`](../namespaces/Helpers/classes/YTNode.md#key)
#### Defined in
[src/parser/helpers.ts:57](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L57)

View File

@@ -0,0 +1,213 @@
[youtubei.js](../README.md) / MusicShelfContinuation
# Class: MusicShelfContinuation
## Extends
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
## Constructors
### new MusicShelfContinuation()
> **new MusicShelfContinuation**(`data`): [`MusicShelfContinuation`](MusicShelfContinuation.md)
#### Parameters
**data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
#### Returns
[`MusicShelfContinuation`](MusicShelfContinuation.md)
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`constructor`](../namespaces/Helpers/classes/YTNode.md#constructors)
#### Defined in
[src/parser/continuations.ts:99](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L99)
## Properties
### contents
> **contents**: `null` \| [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/continuations.ts:97](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L97)
***
### continuation
> **continuation**: `string`
#### Defined in
[src/parser/continuations.ts:96](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L96)
***
### type
> `readonly` **type**: `string`
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type)
#### Defined in
[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L8)
***
### type
> `readonly` `static` **type**: `"musicShelfContinuation"` = `'musicShelfContinuation'`
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type-1)
#### Defined in
[src/parser/continuations.ts:94](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L94)
## Methods
### as()
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
Cast to one of the given types.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
#### Returns
`InstanceType`\<`K`\[`number`\]\>
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:35](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L35)
***
### hasKey()
> **hasKey**\<`T`, `R`\>(`key`): `this is MusicShelfContinuation & { [k in string]: R }`
Check for a key without asserting the type.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
`this is MusicShelfContinuation & { [k in string]: R }`
Whether the node has the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`hasKey`](../namespaces/Helpers/classes/YTNode.md#haskey)
#### Defined in
[src/parser/helpers.ts:47](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L47)
***
### is()
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
Check if the node is of the given type.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
The type to check
#### Returns
`this is InstanceType<K[number]>`
whether the node is of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`is`](../namespaces/Helpers/classes/YTNode.md#is)
#### Defined in
[src/parser/helpers.ts:28](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L28)
***
### key()
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
Assert that the node has the given key and return it.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
The value of the key wrapped in a Maybe
#### Throws
If the node does not have the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`key`](../namespaces/Helpers/classes/YTNode.md#key)
#### Defined in
[src/parser/helpers.ts:57](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L57)

View File

@@ -0,0 +1,203 @@
[youtubei.js](../README.md) / NavigateAction
# Class: NavigateAction
## Extends
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
## Constructors
### new NavigateAction()
> **new NavigateAction**(`data`): [`NavigateAction`](NavigateAction.md)
#### Parameters
**data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
#### Returns
[`NavigateAction`](NavigateAction.md)
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`constructor`](../namespaces/Helpers/classes/YTNode.md#constructors)
#### Defined in
[src/parser/continuations.ts:29](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L29)
## Properties
### endpoint
> **endpoint**: [`NavigationEndpoint`](../namespaces/YTNodes/classes/NavigationEndpoint.md)
#### Defined in
[src/parser/continuations.ts:27](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L27)
***
### type
> `readonly` **type**: `string`
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type)
#### Defined in
[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L8)
***
### type
> `readonly` `static` **type**: `"navigateAction"` = `'navigateAction'`
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type-1)
#### Defined in
[src/parser/continuations.ts:25](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L25)
## Methods
### as()
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
Cast to one of the given types.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
#### Returns
`InstanceType`\<`K`\[`number`\]\>
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:35](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L35)
***
### hasKey()
> **hasKey**\<`T`, `R`\>(`key`): `this is NavigateAction & { [k in string]: R }`
Check for a key without asserting the type.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
`this is NavigateAction & { [k in string]: R }`
Whether the node has the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`hasKey`](../namespaces/Helpers/classes/YTNode.md#haskey)
#### Defined in
[src/parser/helpers.ts:47](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L47)
***
### is()
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
Check if the node is of the given type.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
The type to check
#### Returns
`this is InstanceType<K[number]>`
whether the node is of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`is`](../namespaces/Helpers/classes/YTNode.md#is)
#### Defined in
[src/parser/helpers.ts:28](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L28)
***
### key()
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
Assert that the node has the given key and return it.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
The value of the key wrapped in a Maybe
#### Throws
If the node does not have the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`key`](../namespaces/Helpers/classes/YTNode.md#key)
#### Defined in
[src/parser/helpers.ts:57](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L57)

251
docs/api/classes/OAuth2.md Normal file
View File

@@ -0,0 +1,251 @@
[youtubei.js](../README.md) / OAuth2
# Class: OAuth2
## Constructors
### new OAuth2()
> **new OAuth2**(`session`): [`OAuth2`](OAuth2.md)
#### Parameters
**session**: [`Session`](Session.md)
#### Returns
[`OAuth2`](OAuth2.md)
#### Defined in
[src/core/OAuth2.ts:46](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L46)
## Properties
### AUTH\_SERVER\_CODE\_URL
> **AUTH\_SERVER\_CODE\_URL**: `URL`
#### Defined in
[src/core/OAuth2.ts:39](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L39)
***
### AUTH\_SERVER\_REVOKE\_TOKEN\_URL
> **AUTH\_SERVER\_REVOKE\_TOKEN\_URL**: `URL`
#### Defined in
[src/core/OAuth2.ts:41](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L41)
***
### AUTH\_SERVER\_TOKEN\_URL
> **AUTH\_SERVER\_TOKEN\_URL**: `URL`
#### Defined in
[src/core/OAuth2.ts:40](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L40)
***
### client\_id
> **client\_id**: `undefined` \| [`OAuth2ClientID`](../type-aliases/OAuth2ClientID.md)
#### Defined in
[src/core/OAuth2.ts:43](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L43)
***
### oauth2\_tokens
> **oauth2\_tokens**: `undefined` \| [`OAuth2Tokens`](../type-aliases/OAuth2Tokens.md)
#### Defined in
[src/core/OAuth2.ts:44](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L44)
***
### YTTV\_URL
> **YTTV\_URL**: `URL`
#### Defined in
[src/core/OAuth2.ts:38](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L38)
## Methods
### cacheCredentials()
> **cacheCredentials**(): `Promise`\<`void`\>
#### Returns
`Promise`\<`void`\>
#### Defined in
[src/core/OAuth2.ts:105](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L105)
***
### getClientID()
> **getClientID**(): `Promise`\<[`OAuth2ClientID`](../type-aliases/OAuth2ClientID.md)\>
#### Returns
`Promise`\<[`OAuth2ClientID`](../type-aliases/OAuth2ClientID.md)\>
#### Defined in
[src/core/OAuth2.ts:268](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L268)
***
### getDeviceAndUserCode()
> **getDeviceAndUserCode**(): `Promise`\<[`DeviceAndUserCode`](../type-aliases/DeviceAndUserCode.md)\>
#### Returns
`Promise`\<[`DeviceAndUserCode`](../type-aliases/DeviceAndUserCode.md)\>
#### Defined in
[src/core/OAuth2.ts:236](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L236)
***
### init()
> **init**(`tokens`?): `Promise`\<`void`\>
#### Parameters
**tokens?**: [`OAuth2Tokens`](../type-aliases/OAuth2Tokens.md)
#### Returns
`Promise`\<`void`\>
#### Defined in
[src/core/OAuth2.ts:54](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L54)
***
### pollForAccessToken()
> **pollForAccessToken**(`device_and_user_code`): `Promise`\<`void`\>
#### Parameters
**device\_and\_user\_code**: [`DeviceAndUserCode`](../type-aliases/DeviceAndUserCode.md)
#### Returns
`Promise`\<`void`\>
#### Defined in
[src/core/OAuth2.ts:130](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L130)
***
### refreshAccessToken()
> **refreshAccessToken**(): `Promise`\<`void`\>
#### Returns
`Promise`\<`void`\>
#### Defined in
[src/core/OAuth2.ts:197](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L197)
***
### removeCache()
> **removeCache**(): `Promise`\<`void`\>
#### Returns
`Promise`\<`void`\>
#### Defined in
[src/core/OAuth2.ts:126](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L126)
***
### revokeCredentials()
> **revokeCredentials**(): `Promise`\<`undefined` \| `Response`\>
#### Returns
`Promise`\<`undefined` \| `Response`\>
#### Defined in
[src/core/OAuth2.ts:185](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L185)
***
### setTokens()
> **setTokens**(`tokens`): `void`
#### Parameters
**tokens**: [`OAuth2Tokens`](../type-aliases/OAuth2Tokens.md)
#### Returns
`void`
#### Defined in
[src/core/OAuth2.ts:85](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L85)
***
### shouldRefreshToken()
> **shouldRefreshToken**(): `boolean`
#### Returns
`boolean`
#### Defined in
[src/core/OAuth2.ts:313](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L313)
***
### validateTokens()
> **validateTokens**(`tokens`): `boolean`
#### Parameters
**tokens**: [`OAuth2Tokens`](../type-aliases/OAuth2Tokens.md)
#### Returns
`boolean`
#### Defined in
[src/core/OAuth2.ts:319](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/OAuth2.ts#L319)

View File

@@ -0,0 +1,45 @@
[youtubei.js](../README.md) / Platform
# Class: Platform
## Constructors
### new Platform()
> **new Platform**(): [`Platform`](Platform.md)
#### Returns
[`Platform`](Platform.md)
## Accessors
### shim
> `get` `static` **shim**(): [`PlatformShim`](../namespaces/Types/interfaces/PlatformShim.md)
#### Returns
[`PlatformShim`](../namespaces/Types/interfaces/PlatformShim.md)
#### Defined in
[src/utils/Utils.ts:18](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Utils.ts#L18)
## Methods
### load()
> `static` **load**(`platform`): `void`
#### Parameters
**platform**: [`PlatformShim`](../namespaces/Types/interfaces/PlatformShim.md)
#### Returns
`void`
#### Defined in
[src/utils/Utils.ts:15](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Utils.ts#L15)

271
docs/api/classes/Player.md Normal file
View File

@@ -0,0 +1,271 @@
[youtubei.js](../README.md) / Player
# Class: Player
Represents YouTube's player script. This is required to decipher signatures.
## Constructors
### new Player()
> **new Player**(`player_id`, `signature_timestamp`, `sig_sc`?, `nsig_sc`?): [`Player`](Player.md)
#### Parameters
**player\_id**: `string`
**signature\_timestamp**: `number`
**sig\_sc?**: `string`
**nsig\_sc?**: `string`
#### Returns
[`Player`](Player.md)
#### Defined in
[src/core/Player.ts:17](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Player.ts#L17)
## Properties
### nsig\_sc?
> `optional` **nsig\_sc**: `string`
#### Defined in
[src/core/Player.ts:13](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Player.ts#L13)
***
### player\_id
> **player\_id**: `string`
#### Defined in
[src/core/Player.ts:11](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Player.ts#L11)
***
### po\_token?
> `optional` **po\_token**: `string`
#### Defined in
[src/core/Player.ts:15](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Player.ts#L15)
***
### sig\_sc?
> `optional` **sig\_sc**: `string`
#### Defined in
[src/core/Player.ts:14](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Player.ts#L14)
***
### sts
> **sts**: `number`
#### Defined in
[src/core/Player.ts:12](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Player.ts#L12)
## Accessors
### url
> `get` **url**(): `string`
#### Returns
`string`
#### Defined in
[src/core/Player.ts:244](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Player.ts#L244)
***
### LIBRARY\_VERSION
> `get` `static` **LIBRARY\_VERSION**(): `number`
#### Returns
`number`
#### Defined in
[src/core/Player.ts:248](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Player.ts#L248)
## Methods
### cache()
> **cache**(`cache`?): `Promise`\<`void`\>
#### Parameters
**cache?**: [`ICache`](../namespaces/Types/interfaces/ICache.md)
#### Returns
`Promise`\<`void`\>
#### Defined in
[src/core/Player.ts:200](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Player.ts#L200)
***
### decipher()
> **decipher**(`url`?, `signature_cipher`?, `cipher`?, `this_response_nsig_cache`?): `string`
#### Parameters
**url?**: `string`
**signature\_cipher?**: `string`
**cipher?**: `string`
**this\_response\_nsig\_cache?**: `Map`\<`string`, `string`\>
#### Returns
`string`
#### Defined in
[src/core/Player.ts:78](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Player.ts#L78)
***
### create()
> `static` **create**(`cache`, `fetch`, `po_token`?): `Promise`\<[`Player`](Player.md)\>
#### Parameters
**cache**: `undefined` \| [`ICache`](../namespaces/Types/interfaces/ICache.md)
**fetch** = `Platform.shim.fetch`
**po\_token?**: `string`
#### Returns
`Promise`\<[`Player`](Player.md)\>
#### Defined in
[src/core/Player.ts:24](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Player.ts#L24)
***
### extractNSigSourceCode()
> `static` **extractNSigSourceCode**(`data`): `undefined` \| `string`
#### Parameters
**data**: `string`
#### Returns
`undefined` \| `string`
#### Defined in
[src/core/Player.ts:237](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Player.ts#L237)
***
### extractSigSourceCode()
> `static` **extractSigSourceCode**(`data`): `string`
#### Parameters
**data**: `string`
#### Returns
`string`
#### Defined in
[src/core/Player.ts:226](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Player.ts#L226)
***
### extractSigTimestamp()
> `static` **extractSigTimestamp**(`data`): `number`
#### Parameters
**data**: `string`
#### Returns
`number`
#### Defined in
[src/core/Player.ts:222](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Player.ts#L222)
***
### fromCache()
> `static` **fromCache**(`cache`, `player_id`): `Promise`\<`null` \| [`Player`](Player.md)\>
#### Parameters
**cache**: [`ICache`](../namespaces/Types/interfaces/ICache.md)
**player\_id**: `string`
#### Returns
`Promise`\<`null` \| [`Player`](Player.md)\>
#### Defined in
[src/core/Player.ts:170](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Player.ts#L170)
***
### fromSource()
> `static` **fromSource**(`player_id`, `sig_timestamp`, `cache`?, `sig_sc`?, `nsig_sc`?): `Promise`\<[`Player`](Player.md)\>
#### Parameters
**player\_id**: `string`
**sig\_timestamp**: `number`
**cache?**: [`ICache`](../namespaces/Types/interfaces/ICache.md)
**sig\_sc?**: `string`
**nsig\_sc?**: `string`
#### Returns
`Promise`\<[`Player`](Player.md)\>
#### Defined in
[src/core/Player.ts:194](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Player.ts#L194)

View File

@@ -0,0 +1,213 @@
[youtubei.js](../README.md) / PlaylistPanelContinuation
# Class: PlaylistPanelContinuation
## Extends
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
## Constructors
### new PlaylistPanelContinuation()
> **new PlaylistPanelContinuation**(`data`): [`PlaylistPanelContinuation`](PlaylistPanelContinuation.md)
#### Parameters
**data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
#### Returns
[`PlaylistPanelContinuation`](PlaylistPanelContinuation.md)
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`constructor`](../namespaces/Helpers/classes/YTNode.md#constructors)
#### Defined in
[src/parser/continuations.ts:131](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L131)
## Properties
### contents
> **contents**: `null` \| [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/continuations.ts:129](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L129)
***
### continuation
> **continuation**: `string`
#### Defined in
[src/parser/continuations.ts:128](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L128)
***
### type
> `readonly` **type**: `string`
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type)
#### Defined in
[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L8)
***
### type
> `readonly` `static` **type**: `"playlistPanelContinuation"` = `'playlistPanelContinuation'`
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type-1)
#### Defined in
[src/parser/continuations.ts:126](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L126)
## Methods
### as()
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
Cast to one of the given types.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
#### Returns
`InstanceType`\<`K`\[`number`\]\>
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:35](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L35)
***
### hasKey()
> **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistPanelContinuation & { [k in string]: R }`
Check for a key without asserting the type.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
`this is PlaylistPanelContinuation & { [k in string]: R }`
Whether the node has the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`hasKey`](../namespaces/Helpers/classes/YTNode.md#haskey)
#### Defined in
[src/parser/helpers.ts:47](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L47)
***
### is()
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
Check if the node is of the given type.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
The type to check
#### Returns
`this is InstanceType<K[number]>`
whether the node is of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`is`](../namespaces/Helpers/classes/YTNode.md#is)
#### Defined in
[src/parser/helpers.ts:28](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L28)
***
### key()
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
Assert that the node has the given key and return it.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
The value of the key wrapped in a Maybe
#### Throws
If the node does not have the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`key`](../namespaces/Helpers/classes/YTNode.md#key)
#### Defined in
[src/parser/helpers.ts:57](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L57)

View File

@@ -0,0 +1,223 @@
[youtubei.js](../README.md) / ReloadContinuationItemsCommand
# Class: ReloadContinuationItemsCommand
## Extends
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
## Constructors
### new ReloadContinuationItemsCommand()
> **new ReloadContinuationItemsCommand**(`data`): [`ReloadContinuationItemsCommand`](ReloadContinuationItemsCommand.md)
#### Parameters
**data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
#### Returns
[`ReloadContinuationItemsCommand`](ReloadContinuationItemsCommand.md)
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`constructor`](../namespaces/Helpers/classes/YTNode.md#constructors)
#### Defined in
[src/parser/continuations.ts:57](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L57)
## Properties
### contents
> **contents**: `null` \| [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/continuations.ts:54](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L54)
***
### slot?
> `optional` **slot**: `string`
#### Defined in
[src/parser/continuations.ts:55](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L55)
***
### target\_id
> **target\_id**: `string`
#### Defined in
[src/parser/continuations.ts:53](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L53)
***
### type
> `readonly` **type**: `string`
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type)
#### Defined in
[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L8)
***
### type
> `readonly` `static` **type**: `"reloadContinuationItemsCommand"` = `'reloadContinuationItemsCommand'`
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type-1)
#### Defined in
[src/parser/continuations.ts:51](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L51)
## Methods
### as()
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
Cast to one of the given types.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
#### Returns
`InstanceType`\<`K`\[`number`\]\>
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:35](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L35)
***
### hasKey()
> **hasKey**\<`T`, `R`\>(`key`): `this is ReloadContinuationItemsCommand & { [k in string]: R }`
Check for a key without asserting the type.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
`this is ReloadContinuationItemsCommand & { [k in string]: R }`
Whether the node has the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`hasKey`](../namespaces/Helpers/classes/YTNode.md#haskey)
#### Defined in
[src/parser/helpers.ts:47](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L47)
***
### is()
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
Check if the node is of the given type.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
The type to check
#### Returns
`this is InstanceType<K[number]>`
whether the node is of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`is`](../namespaces/Helpers/classes/YTNode.md#is)
#### Defined in
[src/parser/helpers.ts:28](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L28)
***
### key()
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
Assert that the node has the given key and return it.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
The value of the key wrapped in a Maybe
#### Throws
If the node does not have the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`key`](../namespaces/Helpers/classes/YTNode.md#key)
#### Defined in
[src/parser/helpers.ts:57](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L57)

View File

@@ -0,0 +1,213 @@
[youtubei.js](../README.md) / SectionListContinuation
# Class: SectionListContinuation
## Extends
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
## Constructors
### new SectionListContinuation()
> **new SectionListContinuation**(`data`): [`SectionListContinuation`](SectionListContinuation.md)
#### Parameters
**data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
#### Returns
[`SectionListContinuation`](SectionListContinuation.md)
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`constructor`](../namespaces/Helpers/classes/YTNode.md#constructors)
#### Defined in
[src/parser/continuations.ts:71](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L71)
## Properties
### contents
> **contents**: `null` \| [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/continuations.ts:69](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L69)
***
### continuation
> **continuation**: `string`
#### Defined in
[src/parser/continuations.ts:68](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L68)
***
### type
> `readonly` **type**: `string`
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type)
#### Defined in
[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L8)
***
### type
> `readonly` `static` **type**: `"sectionListContinuation"` = `'sectionListContinuation'`
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type-1)
#### Defined in
[src/parser/continuations.ts:66](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L66)
## Methods
### as()
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
Cast to one of the given types.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
#### Returns
`InstanceType`\<`K`\[`number`\]\>
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:35](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L35)
***
### hasKey()
> **hasKey**\<`T`, `R`\>(`key`): `this is SectionListContinuation & { [k in string]: R }`
Check for a key without asserting the type.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
`this is SectionListContinuation & { [k in string]: R }`
Whether the node has the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`hasKey`](../namespaces/Helpers/classes/YTNode.md#haskey)
#### Defined in
[src/parser/helpers.ts:47](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L47)
***
### is()
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
Check if the node is of the given type.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
The type to check
#### Returns
`this is InstanceType<K[number]>`
whether the node is of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`is`](../namespaces/Helpers/classes/YTNode.md#is)
#### Defined in
[src/parser/helpers.ts:28](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L28)
***
### key()
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
Assert that the node has the given key and return it.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
The value of the key wrapped in a Maybe
#### Throws
If the node does not have the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`key`](../namespaces/Helpers/classes/YTNode.md#key)
#### Defined in
[src/parser/helpers.ts:57](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L57)

645
docs/api/classes/Session.md Normal file
View File

@@ -0,0 +1,645 @@
[youtubei.js](../README.md) / Session
# Class: Session
Represents an InnerTube session. This holds all the data needed to make requests to YouTube.
## Extends
- [`EventEmitter`](EventEmitter.md)
## Constructors
### new Session()
> **new Session**(`context`, `api_key`, `api_version`, `account_index`, `player`?, `cookie`?, `fetch`?, `cache`?, `po_token`?): [`Session`](Session.md)
#### Parameters
**context**: [`Context`](../type-aliases/Context.md)
**api\_key**: `string`
**api\_version**: `string`
**account\_index**: `number`
**player?**: [`Player`](Player.md)
**cookie?**: `string`
**fetch?**
**cache?**: [`ICache`](../namespaces/Types/interfaces/ICache.md)
**po\_token?**: `string`
#### Returns
[`Session`](Session.md)
#### Overrides
[`EventEmitter`](EventEmitter.md).[`constructor`](EventEmitter.md#constructors)
#### Defined in
[src/core/Session.ts:226](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L226)
## Properties
### account\_index
> **account\_index**: `number`
#### Defined in
[src/core/Session.ts:223](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L223)
***
### actions
> **actions**: [`Actions`](Actions.md)
#### Defined in
[src/core/Session.ts:219](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L219)
***
### api\_version
> **api\_version**: `string`
#### Defined in
[src/core/Session.ts:222](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L222)
***
### cache?
> `optional` **cache**: [`ICache`](../namespaces/Types/interfaces/ICache.md)
#### Defined in
[src/core/Session.ts:220](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L220)
***
### context
> **context**: [`Context`](../type-aliases/Context.md)
#### Defined in
[src/core/Session.ts:214](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L214)
***
### http
> **http**: [`HTTPClient`](HTTPClient.md)
#### Defined in
[src/core/Session.ts:217](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L217)
***
### key
> **key**: `string`
#### Defined in
[src/core/Session.ts:221](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L221)
***
### logged\_in
> **logged\_in**: `boolean`
#### Defined in
[src/core/Session.ts:218](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L218)
***
### oauth
> **oauth**: [`OAuth2`](OAuth2.md)
#### Defined in
[src/core/Session.ts:216](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L216)
***
### player?
> `optional` **player**: [`Player`](Player.md)
#### Defined in
[src/core/Session.ts:215](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L215)
***
### po\_token?
> `optional` **po\_token**: `string`
#### Defined in
[src/core/Session.ts:224](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L224)
## Accessors
### client\_name
> `get` **client\_name**(): `string`
#### Returns
`string`
#### Defined in
[src/core/Session.ts:569](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L569)
***
### client\_version
> `get` **client\_version**(): `string`
#### Returns
`string`
#### Defined in
[src/core/Session.ts:565](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L565)
***
### lang
> `get` **lang**(): `string`
#### Returns
`string`
#### Defined in
[src/core/Session.ts:573](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L573)
## Methods
### addEventListener()
> **addEventListener**(`type`, `callback`, `options`?): `void`
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
#### Parameters
**type**: `string`
**callback**: `null` \| `EventListenerOrEventListenerObject`
**options?**: `boolean` \| `AddEventListenerOptions`
#### Returns
`void`
#### Inherited from
[`EventEmitter`](EventEmitter.md).[`addEventListener`](EventEmitter.md#addeventlistener)
#### Defined in
node\_modules/typescript/lib/lib.dom.d.ts:8256
***
### dispatchEvent()
> **dispatchEvent**(`event`): `boolean`
Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
#### Parameters
**event**: `Event`
#### Returns
`boolean`
#### Inherited from
[`EventEmitter`](EventEmitter.md).[`dispatchEvent`](EventEmitter.md#dispatchevent)
#### Defined in
node\_modules/typescript/lib/lib.dom.d.ts:8262
***
### emit()
> **emit**(`type`, ...`args`): `void`
#### Parameters
**type**: `string`
• ...**args**: `any`[]
#### Returns
`void`
#### Inherited from
[`EventEmitter`](EventEmitter.md).[`emit`](EventEmitter.md#emit)
#### Defined in
[src/utils/EventEmitterLike.ts:10](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/EventEmitterLike.ts#L10)
***
### off()
> **off**(`type`, `listener`): `void`
#### Parameters
**type**: `string`
**listener**
#### Returns
`void`
#### Inherited from
[`EventEmitter`](EventEmitter.md).[`off`](EventEmitter.md#off)
#### Defined in
[src/utils/EventEmitterLike.ts:40](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/EventEmitterLike.ts#L40)
***
### on()
#### on(type, listener)
> **on**(`type`, `listener`): `void`
##### Parameters
**type**: `"auth"`
**listener**: [`OAuth2AuthEventHandler`](../type-aliases/OAuth2AuthEventHandler.md)
##### Returns
`void`
##### Overrides
[`EventEmitter`](EventEmitter.md).[`on`](EventEmitter.md#on)
##### Defined in
[src/core/Session.ts:241](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L241)
#### on(type, listener)
> **on**(`type`, `listener`): `void`
##### Parameters
**type**: `"auth-pending"`
**listener**: [`OAuth2AuthPendingEventHandler`](../type-aliases/OAuth2AuthPendingEventHandler.md)
##### Returns
`void`
##### Overrides
`EventEmitter.on`
##### Defined in
[src/core/Session.ts:242](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L242)
#### on(type, listener)
> **on**(`type`, `listener`): `void`
##### Parameters
**type**: `"auth-error"`
**listener**: [`OAuth2AuthErrorEventHandler`](../type-aliases/OAuth2AuthErrorEventHandler.md)
##### Returns
`void`
##### Overrides
`EventEmitter.on`
##### Defined in
[src/core/Session.ts:243](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L243)
#### on(type, listener)
> **on**(`type`, `listener`): `void`
##### Parameters
**type**: `"update-credentials"`
**listener**: [`OAuth2AuthEventHandler`](../type-aliases/OAuth2AuthEventHandler.md)
##### Returns
`void`
##### Overrides
`EventEmitter.on`
##### Defined in
[src/core/Session.ts:244](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L244)
***
### once()
#### once(type, listener)
> **once**(`type`, `listener`): `void`
##### Parameters
**type**: `"auth"`
**listener**: [`OAuth2AuthEventHandler`](../type-aliases/OAuth2AuthEventHandler.md)
##### Returns
`void`
##### Overrides
[`EventEmitter`](EventEmitter.md).[`once`](EventEmitter.md#once)
##### Defined in
[src/core/Session.ts:250](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L250)
#### once(type, listener)
> **once**(`type`, `listener`): `void`
##### Parameters
**type**: `"auth-pending"`
**listener**: [`OAuth2AuthPendingEventHandler`](../type-aliases/OAuth2AuthPendingEventHandler.md)
##### Returns
`void`
##### Overrides
`EventEmitter.once`
##### Defined in
[src/core/Session.ts:251](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L251)
#### once(type, listener)
> **once**(`type`, `listener`): `void`
##### Parameters
**type**: `"auth-error"`
**listener**: [`OAuth2AuthErrorEventHandler`](../type-aliases/OAuth2AuthErrorEventHandler.md)
##### Returns
`void`
##### Overrides
`EventEmitter.once`
##### Defined in
[src/core/Session.ts:252](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L252)
***
### removeEventListener()
> **removeEventListener**(`type`, `callback`, `options`?): `void`
Removes the event listener in target's event listener list with the same type, callback, and options.
[MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
#### Parameters
**type**: `string`
**callback**: `null` \| `EventListenerOrEventListenerObject`
**options?**: `boolean` \| `EventListenerOptions`
#### Returns
`void`
#### Inherited from
[`EventEmitter`](EventEmitter.md).[`removeEventListener`](EventEmitter.md#removeeventlistener)
#### Defined in
node\_modules/typescript/lib/lib.dom.d.ts:8268
***
### signIn()
> **signIn**(`credentials`?): `Promise`\<`void`\>
#### Parameters
**credentials?**: [`OAuth2Tokens`](../type-aliases/OAuth2Tokens.md)
#### Returns
`Promise`\<`void`\>
#### Defined in
[src/core/Session.ts:532](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L532)
***
### signOut()
> **signOut**(): `Promise`\<`undefined` \| `Response`\>
Signs out of the current account and revokes the credentials.
#### Returns
`Promise`\<`undefined` \| `Response`\>
#### Defined in
[src/core/Session.ts:555](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L555)
***
### create()
> `static` **create**(`options`): `Promise`\<[`Session`](Session.md)\>
#### Parameters
**options**: [`SessionOptions`](../type-aliases/SessionOptions.md) = `{}`
#### Returns
`Promise`\<[`Session`](Session.md)\>
#### Defined in
[src/core/Session.ts:258](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L258)
***
### fromCache()
> `static` **fromCache**(`cache`, `session_args`): `Promise`\<`null` \| [`SessionData`](../type-aliases/SessionData.md)\>
Retrieves session data from cache.
#### Parameters
**cache**: [`ICache`](../namespaces/Types/interfaces/ICache.md)
A valid cache implementation.
**session\_args**: [`SessionArgs`](../type-aliases/SessionArgs.md)
User provided session arguments.
#### Returns
`Promise`\<`null` \| [`SessionData`](../type-aliases/SessionData.md)\>
#### Defined in
[src/core/Session.ts:288](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L288)
***
### getSessionData()
> `static` **getSessionData**(`lang`, `location`, `account_index`, `visitor_data`, `enable_safety_mode`, `generate_session_locally`, `device_category`, `client_name`, `tz`, `fetch`, `on_behalf_of_user`?, `cache`?, `enable_session_cache`?, `po_token`?): `Promise`\<`object`\>
#### Parameters
**lang**: `string` = `''`
**location**: `string` = `''`
**account\_index**: `number` = `0`
**visitor\_data**: `string` = `''`
**enable\_safety\_mode**: `boolean` = `false`
**generate\_session\_locally**: `boolean` = `false`
**device\_category**: [`DeviceCategory`](../namespaces/Utils/type-aliases/DeviceCategory.md) = `'desktop'`
**client\_name**: [`ClientType`](../enumerations/ClientType.md) = `ClientType.WEB`
**tz**: `string` = `...`
**fetch** = `Platform.shim.fetch`
**on\_behalf\_of\_user?**: `string`
**cache?**: [`ICache`](../namespaces/Types/interfaces/ICache.md)
**enable\_session\_cache?**: `boolean` = `true`
**po\_token?**: `string`
#### Returns
`Promise`\<`object`\>
##### account\_index
> **account\_index**: `number`
##### api\_key
> **api\_key**: `string`
##### api\_version
> **api\_version**: `string`
##### context
> **context**: [`Context`](../type-aliases/Context.md)
#### Defined in
[src/core/Session.ts:324](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L324)

View File

@@ -0,0 +1,213 @@
[youtubei.js](../README.md) / ShowMiniplayerCommand
# Class: ShowMiniplayerCommand
## Extends
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
## Constructors
### new ShowMiniplayerCommand()
> **new ShowMiniplayerCommand**(`data`): [`ShowMiniplayerCommand`](ShowMiniplayerCommand.md)
#### Parameters
**data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
#### Returns
[`ShowMiniplayerCommand`](ShowMiniplayerCommand.md)
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`constructor`](../namespaces/Helpers/classes/YTNode.md#constructors)
#### Defined in
[src/parser/continuations.ts:41](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L41)
## Properties
### miniplayer\_command
> **miniplayer\_command**: [`NavigationEndpoint`](../namespaces/YTNodes/classes/NavigationEndpoint.md)
#### Defined in
[src/parser/continuations.ts:38](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L38)
***
### show\_premium\_branding
> **show\_premium\_branding**: `boolean`
#### Defined in
[src/parser/continuations.ts:39](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L39)
***
### type
> `readonly` **type**: `string`
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type)
#### Defined in
[src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L8)
***
### type
> `readonly` `static` **type**: `"showMiniplayerCommand"` = `'showMiniplayerCommand'`
#### Overrides
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`type`](../namespaces/Helpers/classes/YTNode.md#type-1)
#### Defined in
[src/parser/continuations.ts:36](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/continuations.ts#L36)
## Methods
### as()
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
Cast to one of the given types.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
#### Returns
`InstanceType`\<`K`\[`number`\]\>
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:35](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L35)
***
### hasKey()
> **hasKey**\<`T`, `R`\>(`key`): `this is ShowMiniplayerCommand & { [k in string]: R }`
Check for a key without asserting the type.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
`this is ShowMiniplayerCommand & { [k in string]: R }`
Whether the node has the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`hasKey`](../namespaces/Helpers/classes/YTNode.md#haskey)
#### Defined in
[src/parser/helpers.ts:47](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L47)
***
### is()
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
Check if the node is of the given type.
#### Type Parameters
**T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
**K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
#### Parameters
• ...**types**: `K`
The type to check
#### Returns
`this is InstanceType<K[number]>`
whether the node is of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`is`](../namespaces/Helpers/classes/YTNode.md#is)
#### Defined in
[src/parser/helpers.ts:28](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L28)
***
### key()
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
Assert that the node has the given key and return it.
#### Type Parameters
**T** *extends* `string`
**R** = `any`
#### Parameters
**key**: `T`
The key to check
#### Returns
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
The value of the key wrapped in a Maybe
#### Throws
If the node does not have the key
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`key`](../namespaces/Helpers/classes/YTNode.md#key)
#### Defined in
[src/parser/helpers.ts:57](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/helpers.ts#L57)

View File

@@ -0,0 +1,113 @@
[youtubei.js](../README.md) / UniversalCache
# Class: UniversalCache
## Implements
- [`ICache`](../namespaces/Types/interfaces/ICache.md)
## Constructors
### new UniversalCache()
> **new UniversalCache**(`persistent`, `persistent_directory`?): [`UniversalCache`](UniversalCache.md)
#### Parameters
**persistent**: `boolean`
**persistent\_directory?**: `string`
#### Returns
[`UniversalCache`](UniversalCache.md)
#### Defined in
[src/utils/Cache.ts:6](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Cache.ts#L6)
## Accessors
### cache\_dir
> `get` **cache\_dir**(): `string`
#### Returns
`string`
#### Implementation of
[`ICache`](../namespaces/Types/interfaces/ICache.md).[`cache_dir`](../namespaces/Types/interfaces/ICache.md#cache_dir)
#### Defined in
[src/utils/Cache.ts:9](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Cache.ts#L9)
## Methods
### get()
> **get**(`key`): `Promise`\<`undefined` \| `ArrayBuffer`\>
#### Parameters
**key**: `string`
#### Returns
`Promise`\<`undefined` \| `ArrayBuffer`\>
#### Implementation of
[`ICache`](../namespaces/Types/interfaces/ICache.md).[`get`](../namespaces/Types/interfaces/ICache.md#get)
#### Defined in
[src/utils/Cache.ts:12](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Cache.ts#L12)
***
### remove()
> **remove**(`key`): `Promise`\<`void`\>
#### Parameters
**key**: `string`
#### Returns
`Promise`\<`void`\>
#### Implementation of
[`ICache`](../namespaces/Types/interfaces/ICache.md).[`remove`](../namespaces/Types/interfaces/ICache.md#remove)
#### Defined in
[src/utils/Cache.ts:18](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Cache.ts#L18)
***
### set()
> **set**(`key`, `value`): `Promise`\<`void`\>
#### Parameters
**key**: `string`
**value**: `ArrayBuffer`
#### Returns
`Promise`\<`void`\>
#### Implementation of
[`ICache`](../namespaces/Types/interfaces/ICache.md).[`set`](../namespaces/Types/interfaces/ICache.md#set)
#### Defined in
[src/utils/Cache.ts:15](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Cache.ts#L15)

View File

@@ -0,0 +1,93 @@
[youtubei.js](../README.md) / ClientType
# Enumeration: ClientType
## Enumeration Members
### ANDROID
> **ANDROID**: `"ANDROID"`
#### Defined in
[src/core/Session.ts:21](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L21)
***
### ANDROID\_CREATOR
> **ANDROID\_CREATOR**: `"ANDROID_CREATOR"`
#### Defined in
[src/core/Session.ts:23](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L23)
***
### ANDROID\_MUSIC
> **ANDROID\_MUSIC**: `"ANDROID_MUSIC"`
#### Defined in
[src/core/Session.ts:22](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L22)
***
### IOS
> **IOS**: `"iOS"`
#### Defined in
[src/core/Session.ts:20](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L20)
***
### KIDS
> **KIDS**: `"WEB_KIDS"`
#### Defined in
[src/core/Session.ts:18](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L18)
***
### MUSIC
> **MUSIC**: `"WEB_REMIX"`
#### Defined in
[src/core/Session.ts:19](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L19)
***
### TV\_EMBEDDED
> **TV\_EMBEDDED**: `"TVHTML5_SIMPLY_EMBEDDED_PLAYER"`
#### Defined in
[src/core/Session.ts:24](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L24)
***
### WEB
> **WEB**: `"WEB"`
#### Defined in
[src/core/Session.ts:17](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L17)
***
### WEB\_EMBEDDED
> **WEB\_EMBEDDED**: `"WEB_EMBEDDED_PLAYER"`
#### Defined in
[src/core/Session.ts:25](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Session.ts#L25)

View File

@@ -0,0 +1,33 @@
[youtubei.js](../README.md) / ApiResponse
# Interface: ApiResponse
## Properties
### data
> **data**: [`IRawResponse`](../namespaces/APIResponseTypes/interfaces/IRawResponse.md)
#### Defined in
[src/core/Actions.ts:16](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Actions.ts#L16)
***
### status\_code
> **status\_code**: `number`
#### Defined in
[src/core/Actions.ts:15](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Actions.ts#L15)
***
### success
> **success**: `boolean`
#### Defined in
[src/core/Actions.ts:14](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/Actions.ts#L14)

View File

@@ -0,0 +1,13 @@
[youtubei.js](../README.md) / HTTPClientInit
# Interface: HTTPClientInit
## Properties
### baseURL?
> `optional` **baseURL**: `string`
#### Defined in
[src/utils/HTTPClient.ts:15](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/HTTPClient.ts#L15)

View File

@@ -0,0 +1,32 @@
[youtubei.js](../../README.md) / APIResponseTypes
# APIResponseTypes
## Index
### Interfaces
- [IParsedResponse](interfaces/IParsedResponse.md)
- [IPlayabilityStatus](interfaces/IPlayabilityStatus.md)
- [IPlaybackTracking](interfaces/IPlaybackTracking.md)
- [IPlayerConfig](interfaces/IPlayerConfig.md)
- [IRawPlayerConfig](interfaces/IRawPlayerConfig.md)
- [IRawResponse](interfaces/IRawResponse.md)
- [IResponseContext](interfaces/IResponseContext.md)
- [IServiceTrackingParams](interfaces/IServiceTrackingParams.md)
- [IStreamingData](interfaces/IStreamingData.md)
### Type Aliases
- [CpnSource](type-aliases/CpnSource.md)
- [IBrowseResponse](type-aliases/IBrowseResponse.md)
- [IGetNotificationsMenuResponse](type-aliases/IGetNotificationsMenuResponse.md)
- [IGetTranscriptResponse](type-aliases/IGetTranscriptResponse.md)
- [IGuideResponse](type-aliases/IGuideResponse.md)
- [INextResponse](type-aliases/INextResponse.md)
- [IPlayerResponse](type-aliases/IPlayerResponse.md)
- [IResolveURLResponse](type-aliases/IResolveURLResponse.md)
- [ISearchResponse](type-aliases/ISearchResponse.md)
- [IUpdatedMetadataResponse](type-aliases/IUpdatedMetadataResponse.md)
- [RawData](type-aliases/RawData.md)
- [RawNode](type-aliases/RawNode.md)

View File

@@ -0,0 +1,491 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IParsedResponse
# Interface: IParsedResponse
## Properties
### actions?
> `optional` **actions**: [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:26](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L26)
***
### actions\_memo?
> `optional` **actions\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:27](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L27)
***
### alerts?
> `optional` **alerts**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`Alert`](../../YTNodes/classes/Alert.md) \| [`AlertWithButton`](../../YTNodes/classes/AlertWithButton.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:50](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L50)
***
### annotations?
> `optional` **annotations**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`PlayerAnnotationsExpanded`](../../YTNodes/classes/PlayerAnnotationsExpanded.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:62](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L62)
***
### background?
> `optional` **background**: [`MusicThumbnail`](../../YTNodes/classes/MusicThumbnail.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:25](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L25)
***
### captions?
> `optional` **captions**: [`PlayerCaptionsTracklist`](../../YTNodes/classes/PlayerCaptionsTracklist.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:60](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L60)
***
### cards?
> `optional` **cards**: [`CardCollection`](../../YTNodes/classes/CardCollection.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:65](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L65)
***
### contents?
> `optional` **contents**: [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:28](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L28)
***
### contents\_memo?
> `optional` **contents\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:29](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L29)
***
### continuation?
> `optional` **continuation**: [`Continuation`](../../../classes/Continuation.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:43](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L43)
***
### continuation\_contents?
> `optional` **continuation\_contents**: [`ItemSectionContinuation`](../../../classes/ItemSectionContinuation.md) \| [`SectionListContinuation`](../../../classes/SectionListContinuation.md) \| [`LiveChatContinuation`](../../../classes/LiveChatContinuation.md) \| [`MusicPlaylistShelfContinuation`](../../../classes/MusicPlaylistShelfContinuation.md) \| [`MusicShelfContinuation`](../../../classes/MusicShelfContinuation.md) \| [`GridContinuation`](../../../classes/GridContinuation.md) \| [`PlaylistPanelContinuation`](../../../classes/PlaylistPanelContinuation.md) \| [`ContinuationCommand`](../../../classes/ContinuationCommand.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:44](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L44)
***
### continuation\_contents\_memo?
> `optional` **continuation\_contents\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:46](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L46)
***
### continuation\_endpoint?
> `optional` **continuation\_endpoint**: [`YTNode`](../../Helpers/classes/YTNode.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:74](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L74)
***
### cpn\_info?
> `optional` **cpn\_info**: `object`
#### cpn
> **cpn**: `string`
#### cpn\_source
> **cpn\_source**: [`CpnSource`](../type-aliases/CpnSource.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:66](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L66)
***
### current\_video\_endpoint?
> `optional` **current\_video\_endpoint**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:58](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L58)
***
### endpoint?
> `optional` **endpoint**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:59](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L59)
***
### endscreen?
> `optional` **endscreen**: [`Endscreen`](../../YTNodes/classes/Endscreen.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:64](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L64)
***
### engagement\_panels?
> `optional` **engagement\_panels**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`EngagementPanelSectionList`](../../YTNodes/classes/EngagementPanelSectionList.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:70](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L70)
***
### entries?
> `optional` **entries**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)[]
#### Defined in
[src/parser/types/ParsedResponse.ts:72](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L72)
***
### entries\_memo?
> `optional` **entries\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:73](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L73)
***
### estimated\_results?
> `optional` **estimated\_results**: `number`
#### Defined in
[src/parser/types/ParsedResponse.ts:52](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L52)
***
### header?
> `optional` **header**: [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:30](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L30)
***
### header\_memo?
> `optional` **header\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:31](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L31)
***
### items?
> `optional` **items**: [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:71](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L71)
***
### items\_memo?
> `optional` **items\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:36](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L36)
***
### live\_chat\_item\_context\_menu\_supported\_renderers?
> `optional` **live\_chat\_item\_context\_menu\_supported\_renderers**: [`YTNode`](../../Helpers/classes/YTNode.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:34](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L34)
***
### live\_chat\_item\_context\_menu\_supported\_renderers\_memo?
> `optional` **live\_chat\_item\_context\_menu\_supported\_renderers\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:35](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L35)
***
### metadata?
> `optional` **metadata**: [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:47](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L47)
***
### microformat?
> `optional` **microformat**: [`YTNode`](../../Helpers/classes/YTNode.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:48](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L48)
***
### on\_response\_received\_actions?
> `optional` **on\_response\_received\_actions**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReloadContinuationItemsCommand`](../../../classes/ReloadContinuationItemsCommand.md) \| [`AppendContinuationItemsAction`](../../YTNodes/classes/AppendContinuationItemsAction.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:37](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L37)
***
### on\_response\_received\_actions\_memo?
> `optional` **on\_response\_received\_actions\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:38](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L38)
***
### on\_response\_received\_commands?
> `optional` **on\_response\_received\_commands**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReloadContinuationItemsCommand`](../../../classes/ReloadContinuationItemsCommand.md) \| [`AppendContinuationItemsAction`](../../YTNodes/classes/AppendContinuationItemsAction.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:41](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L41)
***
### on\_response\_received\_commands\_memo?
> `optional` **on\_response\_received\_commands\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:42](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L42)
***
### on\_response\_received\_endpoints?
> `optional` **on\_response\_received\_endpoints**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`ReloadContinuationItemsCommand`](../../../classes/ReloadContinuationItemsCommand.md) \| [`AppendContinuationItemsAction`](../../YTNodes/classes/AppendContinuationItemsAction.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:39](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L39)
***
### on\_response\_received\_endpoints\_memo?
> `optional` **on\_response\_received\_endpoints\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:40](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L40)
***
### overlay?
> `optional` **overlay**: [`YTNode`](../../Helpers/classes/YTNode.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:49](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L49)
***
### playability\_status?
> `optional` **playability\_status**: [`IPlayabilityStatus`](IPlayabilityStatus.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:55](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L55)
***
### playback\_tracking?
> `optional` **playback\_tracking**: [`IPlaybackTracking`](IPlaybackTracking.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:54](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L54)
***
### player\_config?
> `optional` **player\_config**: [`IPlayerConfig`](IPlayerConfig.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:57](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L57)
***
### player\_overlays?
> `optional` **player\_overlays**: [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:53](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L53)
***
### player\_response?
> `optional` **player\_response**: [`IPlayerResponse`](../type-aliases/IPlayerResponse.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:75](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L75)
***
### refinements?
> `optional` **refinements**: `string`[]
#### Defined in
[src/parser/types/ParsedResponse.ts:51](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L51)
***
### sidebar?
> `optional` **sidebar**: [`YTNode`](../../Helpers/classes/YTNode.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:32](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L32)
***
### sidebar\_memo?
> `optional` **sidebar\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:33](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L33)
***
### storyboards?
> `optional` **storyboards**: [`PlayerLiveStoryboardSpec`](../../YTNodes/classes/PlayerLiveStoryboardSpec.md) \| [`PlayerStoryboardSpec`](../../YTNodes/classes/PlayerStoryboardSpec.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:63](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L63)
***
### streaming\_data?
> `optional` **streaming\_data**: [`IStreamingData`](IStreamingData.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:56](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L56)
***
### video\_details?
> `optional` **video\_details**: [`VideoDetails`](../../Misc/classes/VideoDetails.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:61](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L61)
***
### watch\_next\_response?
> `optional` **watch\_next\_response**: [`INextResponse`](../type-aliases/INextResponse.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:76](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L76)

View File

@@ -0,0 +1,53 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IPlayabilityStatus
# Interface: IPlayabilityStatus
## Properties
### audio\_only\_playablility
> **audio\_only\_playablility**: `null` \| [`AudioOnlyPlayability`](../../YTNodes/classes/AudioOnlyPlayability.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:86](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L86)
***
### embeddable
> **embeddable**: `boolean`
#### Defined in
[src/parser/types/ParsedResponse.ts:87](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L87)
***
### error\_screen
> **error\_screen**: `null` \| [`YTNode`](../../Helpers/classes/YTNode.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:85](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L85)
***
### reason
> **reason**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:88](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L88)
***
### status
> **status**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:84](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L84)

View File

@@ -0,0 +1,23 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IPlaybackTracking
# Interface: IPlaybackTracking
## Properties
### videostats\_playback\_url
> **videostats\_playback\_url**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:81](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L81)
***
### videostats\_watchtime\_url
> **videostats\_watchtime\_url**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:80](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L80)

View File

@@ -0,0 +1,73 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IPlayerConfig
# Interface: IPlayerConfig
## Properties
### audio\_config
> **audio\_config**: `object`
#### enable\_per\_format\_loudness
> **enable\_per\_format\_loudness**: `boolean`
#### loudness\_db?
> `optional` **loudness\_db**: `number`
#### perceptual\_loudness\_db?
> `optional` **perceptual\_loudness\_db**: `number`
#### Defined in
[src/parser/types/ParsedResponse.ts:92](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L92)
***
### media\_common\_config
> **media\_common\_config**: `object`
#### dynamic\_readahead\_config
> **dynamic\_readahead\_config**: `object`
#### dynamic\_readahead\_config.max\_read\_ahead\_media\_time\_ms
> **max\_read\_ahead\_media\_time\_ms**: `number`
#### dynamic\_readahead\_config.min\_read\_ahead\_media\_time\_ms
> **min\_read\_ahead\_media\_time\_ms**: `number`
#### dynamic\_readahead\_config.read\_ahead\_growth\_rate\_ms
> **read\_ahead\_growth\_rate\_ms**: `number`
#### media\_ustreamer\_request\_config?
> `optional` **media\_ustreamer\_request\_config**: `object`
#### media\_ustreamer\_request\_config.video\_playback\_ustreamer\_config?
> `optional` **video\_playback\_ustreamer\_config**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:100](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L100)
***
### stream\_selection\_config
> **stream\_selection\_config**: `object`
#### max\_bitrate
> **max\_bitrate**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:97](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L97)

View File

@@ -0,0 +1,73 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IRawPlayerConfig
# Interface: IRawPlayerConfig
## Properties
### audioConfig
> **audioConfig**: `object`
#### enablePerFormatLoudness
> **enablePerFormatLoudness**: `boolean`
#### loudnessDb?
> `optional` **loudnessDb**: `number`
#### perceptualLoudnessDb?
> `optional` **perceptualLoudnessDb**: `number`
#### Defined in
[src/parser/types/RawResponse.ts:20](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L20)
***
### mediaCommonConfig
> **mediaCommonConfig**: `object`
#### dynamicReadaheadConfig?
> `optional` **dynamicReadaheadConfig**: `object`
#### dynamicReadaheadConfig.maxReadAheadMediaTimeMs
> **maxReadAheadMediaTimeMs**: `number`
#### dynamicReadaheadConfig.minReadAheadMediaTimeMs
> **minReadAheadMediaTimeMs**: `number`
#### dynamicReadaheadConfig.readAheadGrowthRateMs
> **readAheadGrowthRateMs**: `number`
#### mediaUstreamerRequestConfig?
> `optional` **mediaUstreamerRequestConfig**: `object`
#### mediaUstreamerRequestConfig.videoPlaybackUstreamerConfig
> **videoPlaybackUstreamerConfig**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:28](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L28)
***
### streamSelectionConfig
> **streamSelectionConfig**: `object`
#### maxBitrate
> **maxBitrate**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:25](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L25)

View File

@@ -0,0 +1,475 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IRawResponse
# Interface: IRawResponse
## Indexable
\[`key`: `string`\]: `any`
## Properties
### actions?
> `optional` **actions**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:48](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L48)
***
### alerts?
> `optional` **alerts**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:56](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L56)
***
### annotations?
> `optional` **annotations**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:92](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L92)
***
### background?
> `optional` **background**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:42](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L42)
***
### captions?
> `optional` **captions**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:90](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L90)
***
### cards?
> `optional` **cards**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:95](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L95)
***
### contents?
> `optional` **contents**: [`RawData`](../type-aliases/RawData.md)
#### Defined in
[src/parser/types/RawResponse.ts:43](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L43)
***
### continuation?
> `optional` **continuation**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:52](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L52)
***
### continuationContents?
> `optional` **continuationContents**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:47](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L47)
***
### cpnInfo?
> `optional` **cpnInfo**: `object`
#### cpn
> **cpn**: `string`
#### cpnSource
> **cpnSource**: [`CpnSource`](../type-aliases/CpnSource.md)
#### Defined in
[src/parser/types/RawResponse.ts:96](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L96)
***
### currentVideoEndpoint?
> `optional` **currentVideoEndpoint**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:86](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L86)
***
### endpoint?
> `optional` **endpoint**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:89](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L89)
***
### endscreen?
> `optional` **endscreen**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:94](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L94)
***
### engagementPanels?
> `optional` **engagementPanels**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:102](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L102)
***
### entries?
> `optional` **entries**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:103](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L103)
***
### estimatedResults?
> `optional` **estimatedResults**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:58](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L58)
***
### frameworkUpdates?
> `optional` **frameworkUpdates**: `any`
#### Defined in
[src/parser/types/RawResponse.ts:101](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L101)
***
### header?
> `optional` **header**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:50](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L50)
***
### items?
> `optional` **items**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:100](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L100)
***
### liveChatItemContextMenuSupportedRenderers?
> `optional` **liveChatItemContextMenuSupportedRenderers**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:49](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L49)
***
### metadata?
> `optional` **metadata**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:53](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L53)
***
### microformat?
> `optional` **microformat**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:54](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L54)
***
### onResponseReceivedActions?
> `optional` **onResponseReceivedActions**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:44](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L44)
***
### onResponseReceivedCommands?
> `optional` **onResponseReceivedCommands**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:46](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L46)
***
### onResponseReceivedEndpoints?
> `optional` **onResponseReceivedEndpoints**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:45](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L45)
***
### overlay?
> `optional` **overlay**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:55](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L55)
***
### playabilityStatus?
> `optional` **playabilityStatus**: `object`
#### audioOnlyPlayability?
> `optional` **audioOnlyPlayability**: [`RawNode`](../type-aliases/RawNode.md)
#### errorScreen?
> `optional` **errorScreen**: [`RawNode`](../type-aliases/RawNode.md)
#### playableInEmbed?
> `optional` **playableInEmbed**: `boolean`
#### reason?
> `optional` **reason**: `string`
#### status
> **status**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:68](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L68)
***
### playbackTracking?
> `optional` **playbackTracking**: `object`
#### videostatsPlaybackUrl
> **videostatsPlaybackUrl**: `object`
#### videostatsPlaybackUrl.baseUrl
> **baseUrl**: `string`
#### videostatsWatchtimeUrl
> **videostatsWatchtimeUrl**: `object`
#### videostatsWatchtimeUrl.baseUrl
> **baseUrl**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:60](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L60)
***
### playerConfig?
> `optional` **playerConfig**: [`IRawPlayerConfig`](IRawPlayerConfig.md)
#### Defined in
[src/parser/types/RawResponse.ts:83](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L83)
***
### playerOverlays?
> `optional` **playerOverlays**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:59](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L59)
***
### playerResponse?
> `optional` **playerResponse**: [`IRawResponse`](IRawResponse.md)
#### Defined in
[src/parser/types/RawResponse.ts:84](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L84)
***
### playlistId?
> `optional` **playlistId**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:88](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L88)
***
### refinements?
> `optional` **refinements**: `string`[]
#### Defined in
[src/parser/types/RawResponse.ts:57](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L57)
***
### responseContext?
> `optional` **responseContext**: [`IResponseContext`](IResponseContext.md)
#### Defined in
[src/parser/types/RawResponse.ts:41](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L41)
***
### sidebar?
> `optional` **sidebar**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:51](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L51)
***
### storyboards?
> `optional` **storyboards**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:93](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L93)
***
### streamingData?
> `optional` **streamingData**: `object`
#### adaptiveFormats
> **adaptiveFormats**: [`RawNode`](../type-aliases/RawNode.md)[]
#### dashManifestUrl?
> `optional` **dashManifestUrl**: `string`
#### expiresInSeconds
> **expiresInSeconds**: `string`
#### formats
> **formats**: [`RawNode`](../type-aliases/RawNode.md)[]
#### hlsManifestUrl?
> `optional` **hlsManifestUrl**: `string`
#### serverAbrStreamingUrl?
> `optional` **serverAbrStreamingUrl**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:75](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L75)
***
### unseenCount?
> `optional` **unseenCount**: `number`
#### Defined in
[src/parser/types/RawResponse.ts:87](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L87)
***
### videoDetails?
> `optional` **videoDetails**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:91](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L91)
***
### watchNextResponse?
> `optional` **watchNextResponse**: [`IRawResponse`](IRawResponse.md)
#### Defined in
[src/parser/types/RawResponse.ts:85](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L85)

View File

@@ -0,0 +1,23 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IResponseContext
# Interface: IResponseContext
## Properties
### maxAgeSeconds
> **maxAgeSeconds**: `number`
#### Defined in
[src/parser/types/RawResponse.ts:16](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L16)
***
### serviceTrackingParams
> **serviceTrackingParams**: [`IServiceTrackingParams`](IServiceTrackingParams.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:15](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L15)

View File

@@ -0,0 +1,23 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IServiceTrackingParams
# Interface: IServiceTrackingParams
## Properties
### params?
> `optional` **params**: `object`[]
#### Defined in
[src/parser/types/RawResponse.ts:8](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L8)
***
### service
> **service**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:7](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L7)

View File

@@ -0,0 +1,63 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IStreamingData
# Interface: IStreamingData
## Properties
### adaptive\_formats
> **adaptive\_formats**: [`Format`](../../Misc/classes/Format.md)[]
#### Defined in
[src/parser/types/ParsedResponse.ts:115](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L115)
***
### dash\_manifest\_url?
> `optional` **dash\_manifest\_url**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:116](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L116)
***
### expires
> **expires**: `Date`
#### Defined in
[src/parser/types/ParsedResponse.ts:113](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L113)
***
### formats
> **formats**: [`Format`](../../Misc/classes/Format.md)[]
#### Defined in
[src/parser/types/ParsedResponse.ts:114](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L114)
***
### hls\_manifest\_url?
> `optional` **hls\_manifest\_url**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:117](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L117)
***
### server\_abr\_streaming\_url?
> `optional` **server\_abr\_streaming\_url**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:118](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L118)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / CpnSource
# Type Alias: CpnSource
> **CpnSource**: `"CPN_SOURCE_TYPE_CLIENT"` \| `"CPN_SOURCE_TYPE_WATCH_SERVER"`
## Defined in
[src/parser/types/RawResponse.ts:4](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L4)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IBrowseResponse
# Type Alias: IBrowseResponse
> **IBrowseResponse**: `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"background"` \| `"continuation_contents"` \| `"continuation_contents_memo"` \| `"on_response_received_actions"` \| `"on_response_received_actions_memo"` \| `"on_response_received_endpoints"` \| `"on_response_received_endpoints_memo"` \| `"contents"` \| `"contents_memo"` \| `"header"` \| `"header_memo"` \| `"metadata"` \| `"microformat"` \| `"alerts"` \| `"sidebar"` \| `"sidebar_memo"`\>
## Defined in
[src/parser/types/ParsedResponse.ts:123](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L123)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IGetNotificationsMenuResponse
# Type Alias: IGetNotificationsMenuResponse
> **IGetNotificationsMenuResponse**: `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"actions"` \| `"actions_memo"`\>
## Defined in
[src/parser/types/ParsedResponse.ts:127](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L127)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IGetTranscriptResponse
# Type Alias: IGetTranscriptResponse
> **IGetTranscriptResponse**: `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"actions"` \| `"actions_memo"`\>
## Defined in
[src/parser/types/ParsedResponse.ts:126](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L126)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IGuideResponse
# Type Alias: IGuideResponse
> **IGuideResponse**: `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"items"` \| `"items_memo"`\>
## Defined in
[src/parser/types/ParsedResponse.ts:129](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L129)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / INextResponse
# Type Alias: INextResponse
> **INextResponse**: `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"contents"` \| `"contents_memo"` \| `"current_video_endpoint"` \| `"on_response_received_endpoints"` \| `"on_response_received_endpoints_memo"` \| `"player_overlays"` \| `"engagement_panels"`\>
## Defined in
[src/parser/types/ParsedResponse.ts:122](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L122)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IPlayerResponse
# Type Alias: IPlayerResponse
> **IPlayerResponse**: `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"captions"` \| `"cards"` \| `"endscreen"` \| `"microformat"` \| `"annotations"` \| `"playability_status"` \| `"streaming_data"` \| `"player_config"` \| `"playback_tracking"` \| `"storyboards"` \| `"video_details"`\>
## Defined in
[src/parser/types/ParsedResponse.ts:121](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L121)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IResolveURLResponse
# Type Alias: IResolveURLResponse
> **IResolveURLResponse**: `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"endpoint"`\>
## Defined in
[src/parser/types/ParsedResponse.ts:125](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L125)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / ISearchResponse
# Type Alias: ISearchResponse
> **ISearchResponse**: `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"header"` \| `"header_memo"` \| `"contents"` \| `"contents_memo"` \| `"on_response_received_commands"` \| `"continuation_contents"` \| `"continuation_contents_memo"` \| `"refinements"` \| `"estimated_results"`\>
## Defined in
[src/parser/types/ParsedResponse.ts:124](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L124)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IUpdatedMetadataResponse
# Type Alias: IUpdatedMetadataResponse
> **IUpdatedMetadataResponse**: `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"actions"` \| `"actions_memo"` \| `"continuation"`\>
## Defined in
[src/parser/types/ParsedResponse.ts:128](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/ParsedResponse.ts#L128)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / RawData
# Type Alias: RawData
> **RawData**: [`RawNode`](RawNode.md) \| [`RawNode`](RawNode.md)[]
## Defined in
[src/parser/types/RawResponse.ts:2](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L2)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / RawNode
# Type Alias: RawNode
> **RawNode**: `Record`\<`string`, `any`\>
## Defined in
[src/parser/types/RawResponse.ts:1](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/parser/types/RawResponse.ts#L1)

View File

@@ -0,0 +1,11 @@
[youtubei.js](../../README.md) / Clients
# Clients
## Index
### Classes
- [Kids](classes/Kids.md)
- [Music](classes/Music.md)
- [Studio](classes/Studio.md)

View File

@@ -0,0 +1,128 @@
[youtubei.js](../../../README.md) / [Clients](../README.md) / Kids
# Class: Kids
## Constructors
### new Kids()
> **new Kids**(`session`): [`Kids`](Kids.md)
#### Parameters
**session**: [`Session`](../../../classes/Session.md)
#### Returns
[`Kids`](Kids.md)
#### Defined in
[src/core/clients/Kids.ts:18](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Kids.ts#L18)
## Methods
### blockChannel()
> **blockChannel**(`channel_id`): `Promise`\<[`ApiResponse`](../../../interfaces/ApiResponse.md)[]\>
Retrieves the list of supervised accounts that the signed-in user has
access to, and blocks the given channel for each of them.
#### Parameters
**channel\_id**: `string`
The channel id to block.
#### Returns
`Promise`\<[`ApiResponse`](../../../interfaces/ApiResponse.md)[]\>
A list of API responses.
#### Defined in
[src/core/clients/Kids.ts:91](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Kids.ts#L91)
***
### getChannel()
> **getChannel**(`channel_id`): `Promise`\<[`Channel`](../../YTKids/classes/Channel.md)\>
Retrieves the contents of the given channel.
#### Parameters
**channel\_id**: `string`
The channel id.
#### Returns
`Promise`\<[`Channel`](../../YTKids/classes/Channel.md)\>
#### Defined in
[src/core/clients/Kids.ts:62](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Kids.ts#L62)
***
### getHomeFeed()
> **getHomeFeed**(): `Promise`\<[`HomeFeed`](../../YTKids/classes/HomeFeed.md)\>
Retrieves the home feed.
#### Returns
`Promise`\<[`HomeFeed`](../../YTKids/classes/HomeFeed.md)\>
#### Defined in
[src/core/clients/Kids.ts:75](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Kids.ts#L75)
***
### getInfo()
> **getInfo**(`video_id`): `Promise`\<[`VideoInfo`](../../YTKids/classes/VideoInfo.md)\>
Retrieves video info.
#### Parameters
**video\_id**: `string`
The video id.
#### Returns
`Promise`\<[`VideoInfo`](../../YTKids/classes/VideoInfo.md)\>
#### Defined in
[src/core/clients/Kids.ts:37](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Kids.ts#L37)
***
### search()
> **search**(`query`): `Promise`\<[`Search`](../../YTKids/classes/Search.md)\>
Searches the given query.
#### Parameters
**query**: `string`
The query.
#### Returns
`Promise`\<[`Search`](../../YTKids/classes/Search.md)\>
#### Defined in
[src/core/clients/Kids.ts:26](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Kids.ts#L26)

View File

@@ -0,0 +1,291 @@
[youtubei.js](../../../README.md) / [Clients](../README.md) / Music
# Class: Music
## Constructors
### new Music()
> **new Music**(`session`): [`Music`](Music.md)
#### Parameters
**session**: [`Session`](../../../classes/Session.md)
#### Returns
[`Music`](Music.md)
#### Defined in
[src/core/clients/Music.ts:40](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Music.ts#L40)
## Methods
### getAlbum()
> **getAlbum**(`album_id`): `Promise`\<[`Album`](../../YTMusic/classes/Album.md)\>
Retrieves album.
#### Parameters
**album\_id**: `string`
The album id.
#### Returns
`Promise`\<[`Album`](../../YTMusic/classes/Album.md)\>
#### Defined in
[src/core/clients/Music.ts:209](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Music.ts#L209)
***
### getArtist()
> **getArtist**(`artist_id`): `Promise`\<[`Artist`](../../YTMusic/classes/Artist.md)\>
Retrieves artist's info & content.
#### Parameters
**artist\_id**: `string`
The artist id.
#### Returns
`Promise`\<[`Artist`](../../YTMusic/classes/Artist.md)\>
#### Defined in
[src/core/clients/Music.ts:189](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Music.ts#L189)
***
### getExplore()
> **getExplore**(): `Promise`\<[`Explore`](../../YTMusic/classes/Explore.md)\>
Retrieves the Explore feed.
#### Returns
`Promise`\<[`Explore`](../../YTMusic/classes/Explore.md)\>
#### Defined in
[src/core/clients/Music.ts:159](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Music.ts#L159)
***
### getHomeFeed()
> **getHomeFeed**(): `Promise`\<[`HomeFeed`](../../YTMusic/classes/HomeFeed.md)\>
Retrieves the home feed.
#### Returns
`Promise`\<[`HomeFeed`](../../YTMusic/classes/HomeFeed.md)\>
#### Defined in
[src/core/clients/Music.ts:145](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Music.ts#L145)
***
### getInfo()
> **getInfo**(`target`): `Promise`\<[`TrackInfo`](../../YTMusic/classes/TrackInfo.md)\>
Retrieves track info. Passing a list item of type MusicTwoRowItem automatically starts a radio.
#### Parameters
**target**: `string` \| [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md) \| [`MusicResponsiveListItem`](../../YTNodes/classes/MusicResponsiveListItem.md) \| [`MusicTwoRowItem`](../../YTNodes/classes/MusicTwoRowItem.md)
Video id or a list item.
#### Returns
`Promise`\<[`TrackInfo`](../../YTMusic/classes/TrackInfo.md)\>
#### Defined in
[src/core/clients/Music.ts:49](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Music.ts#L49)
***
### getLibrary()
> **getLibrary**(): `Promise`\<[`Library`](../../YTMusic/classes/Library.md)\>
Retrieves the library.
#### Returns
`Promise`\<[`Library`](../../YTMusic/classes/Library.md)\>
#### Defined in
[src/core/clients/Music.ts:174](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Music.ts#L174)
***
### getLyrics()
> **getLyrics**(`video_id`): `Promise`\<`undefined` \| [`MusicDescriptionShelf`](../../YTNodes/classes/MusicDescriptionShelf.md)\>
Retrieves song lyrics.
#### Parameters
**video\_id**: `string`
The video id.
#### Returns
`Promise`\<`undefined` \| [`MusicDescriptionShelf`](../../YTNodes/classes/MusicDescriptionShelf.md)\>
#### Defined in
[src/core/clients/Music.ts:325](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Music.ts#L325)
***
### getPlaylist()
> **getPlaylist**(`playlist_id`): `Promise`\<[`Playlist`](../../YTMusic/classes/Playlist.md)\>
Retrieves playlist.
#### Parameters
**playlist\_id**: `string`
The playlist id.
#### Returns
`Promise`\<[`Playlist`](../../YTMusic/classes/Playlist.md)\>
#### Defined in
[src/core/clients/Music.ts:229](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Music.ts#L229)
***
### getRecap()
> **getRecap**(): `Promise`\<[`Recap`](../../YTMusic/classes/Recap.md)\>
Retrieves recap.
#### Returns
`Promise`\<[`Recap`](../../YTMusic/classes/Recap.md)\>
#### Defined in
[src/core/clients/Music.ts:355](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Music.ts#L355)
***
### getRelated()
> **getRelated**(`video_id`): `Promise`\<[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`Message`](../../YTNodes/classes/Message.md)\>
Retrieves related content.
#### Parameters
**video\_id**: `string`
The video id.
#### Returns
`Promise`\<[`SectionList`](../../YTNodes/classes/SectionList.md) \| [`Message`](../../YTNodes/classes/Message.md)\>
#### Defined in
[src/core/clients/Music.ts:297](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Music.ts#L297)
***
### getSearchSuggestions()
> **getSearchSuggestions**(`query`): `Promise`\<[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`SearchSuggestionsSection`](../../YTNodes/classes/SearchSuggestionsSection.md)\>\>
Retrieves search suggestions for the given query.
#### Parameters
**query**: `string`
The query.
#### Returns
`Promise`\<[`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`SearchSuggestionsSection`](../../YTNodes/classes/SearchSuggestionsSection.md)\>\>
#### Defined in
[src/core/clients/Music.ts:370](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Music.ts#L370)
***
### getUpNext()
> **getUpNext**(`video_id`, `automix`): `Promise`\<[`PlaylistPanel`](../../YTNodes/classes/PlaylistPanel.md)\>
Retrieves up next.
#### Parameters
**video\_id**: `string`
The video id.
**automix**: `boolean` = `true`
Whether to enable automix.
#### Returns
`Promise`\<[`PlaylistPanel`](../../YTNodes/classes/PlaylistPanel.md)\>
#### Defined in
[src/core/clients/Music.ts:251](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Music.ts#L251)
***
### search()
> **search**(`query`, `filters`): `Promise`\<[`Search`](../../YTMusic/classes/Search.md)\>
Searches on YouTube Music.
#### Parameters
**query**: `string`
Search query.
**filters**: [`MusicSearchFilters`](../../Types/type-aliases/MusicSearchFilters.md) = `{}`
Search filters.
#### Returns
`Promise`\<[`Search`](../../YTMusic/classes/Search.md)\>
#### Defined in
[src/core/clients/Music.ts:116](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Music.ts#L116)

View File

@@ -0,0 +1,89 @@
[youtubei.js](../../../README.md) / [Clients](../README.md) / Studio
# Class: Studio
## Constructors
### new Studio()
> **new Studio**(`session`): [`Studio`](Studio.md)
#### Parameters
**session**: [`Session`](../../../classes/Session.md)
#### Returns
[`Studio`](Studio.md)
#### Defined in
[src/core/clients/Studio.ts:26](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Studio.ts#L26)
## Methods
### updateVideoMetadata()
> **updateVideoMetadata**(`video_id`, `metadata`): `Promise`\<[`ApiResponse`](../../../interfaces/ApiResponse.md)\>
Updates the metadata of a video.
#### Parameters
**video\_id**: `string`
**metadata**: `Partial`\<`object`\>
#### Returns
`Promise`\<[`ApiResponse`](../../../interfaces/ApiResponse.md)\>
#### Example
```ts
const videoId = 'abcdefg';
const thumbnail = fs.readFileSync('./my_awesome_thumbnail.jpg');
const response = await yt.studio.updateVideoMetadata(videoId, {
tags: [ 'astronomy', 'NASA', 'APOD' ],
title: 'Artemis Mission',
description: 'A nicely written description...',
category: 27,
license: 'creative_commons',
thumbnail,
// ...
});
```
#### Defined in
[src/core/clients/Studio.ts:48](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Studio.ts#L48)
***
### upload()
> **upload**(`file`, `metadata`): `Promise`\<[`ApiResponse`](../../../interfaces/ApiResponse.md)\>
Uploads a video to YouTube.
#### Parameters
**file**: `BodyInit`
**metadata**: `Partial`\<`object`\> = `{}`
#### Returns
`Promise`\<[`ApiResponse`](../../../interfaces/ApiResponse.md)\>
#### Example
```ts
const file = fs.readFileSync('./my_awesome_video.mp4');
const response = await yt.studio.upload(file.buffer, { title: 'Wow!' });
```
#### Defined in
[src/core/clients/Studio.ts:151](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/clients/Studio.ts#L151)

View File

@@ -0,0 +1,14 @@
[youtubei.js](../../README.md) / Constants
# Constants
## Index
### Variables
- [CLIENTS](variables/CLIENTS.md)
- [INNERTUBE\_HEADERS\_BASE](variables/INNERTUBE_HEADERS_BASE.md)
- [OAUTH](variables/OAUTH.md)
- [STREAM\_HEADERS](variables/STREAM_HEADERS.md)
- [SUPPORTED\_CLIENTS](variables/SUPPORTED_CLIENTS.md)
- [URLS](variables/URLS.md)

View File

@@ -0,0 +1,195 @@
[youtubei.js](../../../README.md) / [Constants](../README.md) / CLIENTS
# Variable: CLIENTS
> `const` **CLIENTS**: `Readonly`\<`object`\>
## Type declaration
### ANDROID
> **ANDROID**: `object`
### ANDROID.NAME
> **NAME**: `string` = `'ANDROID'`
### ANDROID.NAME\_ID
> **NAME\_ID**: `string` = `'3'`
### ANDROID.SDK\_VERSION
> **SDK\_VERSION**: `number` = `33`
### ANDROID.USER\_AGENT
> **USER\_AGENT**: `string` = `'com.google.android.youtube/18.48.37(Linux; U; Android 13; en_US; sdk_gphone64_x86_64 Build/UPB4.230623.005) gzip'`
### ANDROID.VERSION
> **VERSION**: `string` = `'18.48.37'`
### IOS
> **IOS**: `object`
### IOS.DEVICE\_MODEL
> **DEVICE\_MODEL**: `string` = `'iPhone10,6'`
### IOS.NAME
> **NAME**: `string` = `'iOS'`
### IOS.NAME\_ID
> **NAME\_ID**: `string` = `'5'`
### IOS.USER\_AGENT
> **USER\_AGENT**: `string` = `'com.google.ios.youtube/18.06.35 (iPhone; CPU iPhone OS 14_4 like Mac OS X; en_US)'`
### IOS.VERSION
> **VERSION**: `string` = `'18.06.35'`
### TV\_EMBEDDED
> **TV\_EMBEDDED**: `object`
### TV\_EMBEDDED.NAME
> **NAME**: `string` = `'TVHTML5_SIMPLY_EMBEDDED_PLAYER'`
### TV\_EMBEDDED.NAME\_ID
> **NAME\_ID**: `string` = `'85'`
### TV\_EMBEDDED.VERSION
> **VERSION**: `string` = `'2.0'`
### WEB
> **WEB**: `object`
### WEB.API\_KEY
> **API\_KEY**: `string` = `'AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8'`
### WEB.API\_VERSION
> **API\_VERSION**: `string` = `'v1'`
### WEB.NAME
> **NAME**: `string` = `'WEB'`
### WEB.NAME\_ID
> **NAME\_ID**: `string` = `'1'`
### WEB.STATIC\_VISITOR\_ID
> **STATIC\_VISITOR\_ID**: `string` = `'6zpwvWUNAco'`
### WEB.VERSION
> **VERSION**: `string` = `'2.20240111.09.00'`
### WEB\_EMBEDDED
> **WEB\_EMBEDDED**: `object`
### WEB\_EMBEDDED.API\_KEY
> **API\_KEY**: `string` = `'AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8'`
### WEB\_EMBEDDED.API\_VERSION
> **API\_VERSION**: `string` = `'v1'`
### WEB\_EMBEDDED.NAME
> **NAME**: `string` = `'WEB_EMBEDDED_PLAYER'`
### WEB\_EMBEDDED.NAME\_ID
> **NAME\_ID**: `string` = `'56'`
### WEB\_EMBEDDED.STATIC\_VISITOR\_ID
> **STATIC\_VISITOR\_ID**: `string` = `'6zpwvWUNAco'`
### WEB\_EMBEDDED.VERSION
> **VERSION**: `string` = `'2.20240111.09.00'`
### WEB\_KIDS
> **WEB\_KIDS**: `object`
### WEB\_KIDS.NAME
> **NAME**: `string` = `'WEB_KIDS'`
### WEB\_KIDS.NAME\_ID
> **NAME\_ID**: `string` = `'76'`
### WEB\_KIDS.VERSION
> **VERSION**: `string` = `'2.20230111.00.00'`
### YTMUSIC
> **YTMUSIC**: `object`
### YTMUSIC.NAME
> **NAME**: `string` = `'WEB_REMIX'`
### YTMUSIC.NAME\_ID
> **NAME\_ID**: `string` = `'67'`
### YTMUSIC.VERSION
> **VERSION**: `string` = `'1.20211213.00.00'`
### YTMUSIC\_ANDROID
> **YTMUSIC\_ANDROID**: `object`
### YTMUSIC\_ANDROID.NAME
> **NAME**: `string` = `'ANDROID_MUSIC'`
### YTMUSIC\_ANDROID.NAME\_ID
> **NAME\_ID**: `string` = `'21'`
### YTMUSIC\_ANDROID.VERSION
> **VERSION**: `string` = `'5.34.51'`
### YTSTUDIO\_ANDROID
> **YTSTUDIO\_ANDROID**: `object`
### YTSTUDIO\_ANDROID.NAME
> **NAME**: `string` = `'ANDROID_CREATOR'`
### YTSTUDIO\_ANDROID.NAME\_ID
> **NAME\_ID**: `string` = `'14'`
### YTSTUDIO\_ANDROID.VERSION
> **VERSION**: `string` = `'22.43.101'`
## Defined in
[src/utils/Constants.ts:25](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Constants.ts#L25)

View File

@@ -0,0 +1,23 @@
[youtubei.js](../../../README.md) / [Constants](../README.md) / INNERTUBE\_HEADERS\_BASE
# Variable: INNERTUBE\_HEADERS\_BASE
> `const` **INNERTUBE\_HEADERS\_BASE**: `Readonly`\<`object`\>
## Type declaration
### accept
> **accept**: `"*/*"` = `'*/*'`
### accept-encoding
> **accept-encoding**: `"gzip, deflate"` = `'gzip, deflate'`
### content-type
> **content-type**: `"application/json"` = `'application/json'`
## Defined in
[src/utils/Constants.ts:88](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Constants.ts#L88)

View File

@@ -0,0 +1,25 @@
[youtubei.js](../../../README.md) / [Constants](../README.md) / OAUTH
# Variable: OAUTH
> `const` **OAUTH**: `Readonly`\<`object`\>
## Type declaration
### REGEX
> **REGEX**: `Readonly`\<`object`\>
#### Type declaration
##### CLIENT\_IDENTITY
> **CLIENT\_IDENTITY**: `RegExp`
##### TV\_SCRIPT
> **TV\_SCRIPT**: `RegExp`
## Defined in
[src/utils/Constants.ts:19](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Constants.ts#L19)

View File

@@ -0,0 +1,27 @@
[youtubei.js](../../../README.md) / [Constants](../README.md) / STREAM\_HEADERS
# Variable: STREAM\_HEADERS
> `const` **STREAM\_HEADERS**: `Readonly`\<`object`\>
## Type declaration
### accept
> **accept**: `"*/*"` = `'*/*'`
### DNT
> **DNT**: `"?1"` = `'?1'`
### origin
> **origin**: `"https://www.youtube.com"` = `'https://www.youtube.com'`
### referer
> **referer**: `"https://www.youtube.com"` = `'https://www.youtube.com'`
## Defined in
[src/utils/Constants.ts:82](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Constants.ts#L82)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../README.md) / [Constants](../README.md) / SUPPORTED\_CLIENTS
# Variable: SUPPORTED\_CLIENTS
> `const` **SUPPORTED\_CLIENTS**: `string`[]
## Defined in
[src/utils/Constants.ts:94](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Constants.ts#L94)

View File

@@ -0,0 +1,69 @@
[youtubei.js](../../../README.md) / [Constants](../README.md) / URLS
# Variable: URLS
> `const` **URLS**: `Readonly`\<`object`\>
## Type declaration
### API
> **API**: `Readonly`\<`object`\>
#### Type declaration
##### BASE
> **BASE**: `"https://youtubei.googleapis.com"` = `'https://youtubei.googleapis.com'`
##### CAMI
> **CAMI**: `"http://cami-youtubei.sandbox.googleapis.com/youtubei/"` = `'http://cami-youtubei.sandbox.googleapis.com/youtubei/'`
##### PRODUCTION\_1
> **PRODUCTION\_1**: `"https://www.youtube.com/youtubei/"` = `'https://www.youtube.com/youtubei/'`
##### PRODUCTION\_2
> **PRODUCTION\_2**: `"https://youtubei.googleapis.com/youtubei/"` = `'https://youtubei.googleapis.com/youtubei/'`
##### RELEASE
> **RELEASE**: `"https://release-youtubei.sandbox.googleapis.com/youtubei/"` = `'https://release-youtubei.sandbox.googleapis.com/youtubei/'`
##### STAGING
> **STAGING**: `"https://green-youtubei.sandbox.googleapis.com/youtubei/"` = `'https://green-youtubei.sandbox.googleapis.com/youtubei/'`
##### TEST
> **TEST**: `"https://test-youtubei.sandbox.googleapis.com/youtubei/"` = `'https://test-youtubei.sandbox.googleapis.com/youtubei/'`
##### UYTFE
> **UYTFE**: `"https://uytfe.sandbox.google.com/youtubei/"` = `'https://uytfe.sandbox.google.com/youtubei/'`
### GOOGLE\_SEARCH\_BASE
> **GOOGLE\_SEARCH\_BASE**: `"https://www.google.com/"` = `'https://www.google.com/'`
### YT\_BASE
> **YT\_BASE**: `"https://www.youtube.com"` = `'https://www.youtube.com'`
### YT\_MUSIC\_BASE
> **YT\_MUSIC\_BASE**: `"https://music.youtube.com"` = `'https://music.youtube.com'`
### YT\_SUGGESTIONS
> **YT\_SUGGESTIONS**: `"https://suggestqueries.google.com/complete/"` = `'https://suggestqueries.google.com/complete/'`
### YT\_UPLOAD
> **YT\_UPLOAD**: `"https://upload.youtube.com/"` = `'https://upload.youtube.com/'`
## Defined in
[src/utils/Constants.ts:2](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/Constants.ts#L2)

View File

@@ -0,0 +1,27 @@
[youtubei.js](../../README.md) / Endpoints
# Endpoints
## Index
### Namespaces
- [Account](namespaces/Account/README.md)
- [Browse](namespaces/Browse/README.md)
- [BrowseEndpoint](namespaces/BrowseEndpoint/README.md)
- [Channel](namespaces/Channel/README.md)
- [Comment](namespaces/Comment/README.md)
- [GetNotificationMenuEndpoint](namespaces/GetNotificationMenuEndpoint/README.md)
- [GuideEndpoint](namespaces/GuideEndpoint/README.md)
- [Kids](namespaces/Kids/README.md)
- [Like](namespaces/Like/README.md)
- [Music](namespaces/Music/README.md)
- [NextEndpoint](namespaces/NextEndpoint/README.md)
- [Notification](namespaces/Notification/README.md)
- [PlayerEndpoint](namespaces/PlayerEndpoint/README.md)
- [Playlist](namespaces/Playlist/README.md)
- [Reel](namespaces/Reel/README.md)
- [ResolveURLEndpoint](namespaces/ResolveURLEndpoint/README.md)
- [SearchEndpoint](namespaces/SearchEndpoint/README.md)
- [Subscription](namespaces/Subscription/README.md)
- [Upload](namespaces/Upload/README.md)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../../README.md) / [Endpoints](../../README.md) / Account
# Account
## Index
### Namespaces
- [AccountListEndpoint](namespaces/AccountListEndpoint/README.md)

View File

@@ -0,0 +1,13 @@
[youtubei.js](../../../../../../README.md) / [Endpoints](../../../../README.md) / [Account](../../README.md) / AccountListEndpoint
# AccountListEndpoint
## Index
### Variables
- [PATH](variables/PATH.md)
### Functions
- [build](functions/build.md)

View File

@@ -0,0 +1,17 @@
[youtubei.js](../../../../../../../README.md) / [Endpoints](../../../../../README.md) / [Account](../../../README.md) / [AccountListEndpoint](../README.md) / build
# Function: build()
> **build**(): [`IAccountListRequest`](../../../../../../Types/interfaces/IAccountListRequest.md)
Builds a `/account/accounts_list` request payload.
## Returns
[`IAccountListRequest`](../../../../../../Types/interfaces/IAccountListRequest.md)
The payload.
## Defined in
[src/core/endpoints/account/AccountListEndpoint.ts:9](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/endpoints/account/AccountListEndpoint.ts#L9)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../../../../../README.md) / [Endpoints](../../../../../README.md) / [Account](../../../README.md) / [AccountListEndpoint](../README.md) / PATH
# Variable: PATH
> `const` **PATH**: `"/account/accounts_list"` = `'/account/accounts_list'`
## Defined in
[src/core/endpoints/account/AccountListEndpoint.ts:3](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/endpoints/account/AccountListEndpoint.ts#L3)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../../README.md) / [Endpoints](../../README.md) / Browse
# Browse
## Index
### Namespaces
- [EditPlaylistEndpoint](namespaces/EditPlaylistEndpoint/README.md)

View File

@@ -0,0 +1,13 @@
[youtubei.js](../../../../../../README.md) / [Endpoints](../../../../README.md) / [Browse](../../README.md) / EditPlaylistEndpoint
# EditPlaylistEndpoint
## Index
### Variables
- [PATH](variables/PATH.md)
### Functions
- [build](functions/build.md)

View File

@@ -0,0 +1,23 @@
[youtubei.js](../../../../../../../README.md) / [Endpoints](../../../../../README.md) / [Browse](../../../README.md) / [EditPlaylistEndpoint](../README.md) / build
# Function: build()
> **build**(`opts`): [`IEditPlaylistRequest`](../../../../../../Types/type-aliases/IEditPlaylistRequest.md)
Builds a `/browse/edit_playlist` request payload.
## Parameters
**opts**: [`EditPlaylistEndpointOptions`](../../../../../../Types/type-aliases/EditPlaylistEndpointOptions.md)
The options to use.
## Returns
[`IEditPlaylistRequest`](../../../../../../Types/type-aliases/IEditPlaylistRequest.md)
The payload.
## Defined in
[src/core/endpoints/browse/EditPlaylistEndpoint.ts:10](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/endpoints/browse/EditPlaylistEndpoint.ts#L10)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../../../../../README.md) / [Endpoints](../../../../../README.md) / [Browse](../../../README.md) / [EditPlaylistEndpoint](../README.md) / PATH
# Variable: PATH
> `const` **PATH**: `"/browse/edit_playlist"` = `'/browse/edit_playlist'`
## Defined in
[src/core/endpoints/browse/EditPlaylistEndpoint.ts:3](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/endpoints/browse/EditPlaylistEndpoint.ts#L3)

View File

@@ -0,0 +1,13 @@
[youtubei.js](../../../../README.md) / [Endpoints](../../README.md) / BrowseEndpoint
# BrowseEndpoint
## Index
### Variables
- [PATH](variables/PATH.md)
### Functions
- [build](functions/build.md)

View File

@@ -0,0 +1,23 @@
[youtubei.js](../../../../../README.md) / [Endpoints](../../../README.md) / [BrowseEndpoint](../README.md) / build
# Function: build()
> **build**(`opts`): [`IBrowseRequest`](../../../../Types/type-aliases/IBrowseRequest.md)
Builds a `/browse` request payload.
## Parameters
**opts**: [`BrowseEndpointOptions`](../../../../Types/type-aliases/BrowseEndpointOptions.md)
The options to use.
## Returns
[`IBrowseRequest`](../../../../Types/type-aliases/IBrowseRequest.md)
The payload.
## Defined in
[src/core/endpoints/BrowseEndpoint.ts:10](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/endpoints/BrowseEndpoint.ts#L10)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../../../README.md) / [Endpoints](../../../README.md) / [BrowseEndpoint](../README.md) / PATH
# Variable: PATH
> `const` **PATH**: `"/browse"` = `'/browse'`
## Defined in
[src/core/endpoints/BrowseEndpoint.ts:3](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/endpoints/BrowseEndpoint.ts#L3)

View File

@@ -0,0 +1,10 @@
[youtubei.js](../../../../README.md) / [Endpoints](../../README.md) / Channel
# Channel
## Index
### Namespaces
- [EditDescriptionEndpoint](namespaces/EditDescriptionEndpoint/README.md)
- [EditNameEndpoint](namespaces/EditNameEndpoint/README.md)

View File

@@ -0,0 +1,13 @@
[youtubei.js](../../../../../../README.md) / [Endpoints](../../../../README.md) / [Channel](../../README.md) / EditDescriptionEndpoint
# EditDescriptionEndpoint
## Index
### Variables
- [PATH](variables/PATH.md)
### Functions
- [build](functions/build.md)

View File

@@ -0,0 +1,23 @@
[youtubei.js](../../../../../../../README.md) / [Endpoints](../../../../../README.md) / [Channel](../../../README.md) / [EditDescriptionEndpoint](../README.md) / build
# Function: build()
> **build**(`options`): [`IChannelEditDescriptionRequest`](../../../../../../Types/interfaces/IChannelEditDescriptionRequest.md)
Builds a `/channel/edit_description` request payload.
## Parameters
**options**: [`ChannelEditDescriptionEndpointOptions`](../../../../../../Types/type-aliases/ChannelEditDescriptionEndpointOptions.md)
The options to use.
## Returns
[`IChannelEditDescriptionRequest`](../../../../../../Types/interfaces/IChannelEditDescriptionRequest.md)
The payload.
## Defined in
[src/core/endpoints/channel/EditDescriptionEndpoint.ts:10](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/endpoints/channel/EditDescriptionEndpoint.ts#L10)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../../../../../README.md) / [Endpoints](../../../../../README.md) / [Channel](../../../README.md) / [EditDescriptionEndpoint](../README.md) / PATH
# Variable: PATH
> `const` **PATH**: `"/channel/edit_description"` = `'/channel/edit_description'`
## Defined in
[src/core/endpoints/channel/EditDescriptionEndpoint.ts:3](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/endpoints/channel/EditDescriptionEndpoint.ts#L3)

View File

@@ -0,0 +1,13 @@
[youtubei.js](../../../../../../README.md) / [Endpoints](../../../../README.md) / [Channel](../../README.md) / EditNameEndpoint
# EditNameEndpoint
## Index
### Variables
- [PATH](variables/PATH.md)
### Functions
- [build](functions/build.md)

View File

@@ -0,0 +1,23 @@
[youtubei.js](../../../../../../../README.md) / [Endpoints](../../../../../README.md) / [Channel](../../../README.md) / [EditNameEndpoint](../README.md) / build
# Function: build()
> **build**(`options`): [`IChannelEditNameRequest`](../../../../../../Types/interfaces/IChannelEditNameRequest.md)
Builds a `/channel/edit_name` request payload.
## Parameters
**options**: [`ChannelEditNameEndpointOptions`](../../../../../../Types/type-aliases/ChannelEditNameEndpointOptions.md)
The options to use.
## Returns
[`IChannelEditNameRequest`](../../../../../../Types/interfaces/IChannelEditNameRequest.md)
The payload.
## Defined in
[src/core/endpoints/channel/EditNameEndpoint.ts:10](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/endpoints/channel/EditNameEndpoint.ts#L10)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../../../../../README.md) / [Endpoints](../../../../../README.md) / [Channel](../../../README.md) / [EditNameEndpoint](../README.md) / PATH
# Variable: PATH
> `const` **PATH**: `"/channel/edit_name"` = `'/channel/edit_name'`
## Defined in
[src/core/endpoints/channel/EditNameEndpoint.ts:3](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/core/endpoints/channel/EditNameEndpoint.ts#L3)

View File

@@ -0,0 +1,10 @@
[youtubei.js](../../../../README.md) / [Endpoints](../../README.md) / Comment
# Comment
## Index
### Namespaces
- [CreateCommentEndpoint](namespaces/CreateCommentEndpoint/README.md)
- [PerformCommentActionEndpoint](namespaces/PerformCommentActionEndpoint/README.md)

Some files were not shown because too many files have changed in this diff Show More