Compare commits

...

1228 Commits

Author SHA1 Message Date
github-actions[bot]
a10c6a1c23 chore(main): release 13.4.0 (#945)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-23 09:33:09 -03:00
dependabot[bot]
b4981ca1fd chore(deps-dev): bump vite in /examples/browser/web (#954)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.12 to 5.4.18.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.18/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.18/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-23 09:31:15 -03:00
Luan
7f1eeb6b5b fix(Player): Use global var to find signature algorithm (#953)
* chore: Update jintr to version 3.3.1

* fix(Player): Use global var to find signature algorithm

This change allows matching code such as:
```
// "Y" is the global var.

r = r[Y[14]](Y[19]);
q3[Y[8]](r, 30);
q3[Y[8]](r, 65);
q3[Y[8]](r, 2);
```

TODO:
Maybe consider removing the regex (it's too fragile) and instead use the AST walker, like we already do for `nsig` and the global lookup variable.
2025-04-23 09:28:42 -03:00
Paul
5e665e8f0b feat(Session): Add option to override Player ID (#951)
Co-authored-by: Paul <paul@piltd.io>
Co-authored-by: Luan <luan.lrt4@gmail.com>
2025-04-23 09:23:41 -03:00
Dave Nicolson
ff1aa67b8b feat(Parser): Add OpenOnePickAddVideoModalCommand node (#901) 2025-04-20 10:25:50 -03:00
Luan
dce51cdc4a feat(RichShelf): Add icon_type property
Useful for identifying Short content shelves.
2025-04-16 15:59:00 -03:00
Luan
4808d2e13a feat(Session): Add retrieve_innertube_config option (#949)
* feat(Session): Add `retrieve_innertube_config` option

This makes a call to `/config` to fetch hot/cold hash data, as well as config needed for certain requests and encryption (useful for "onesie" requests.)

Note: This is enabled by default. If you don't have any cache configured, the additional request will make session creation slightly slower!

* chore: Update config headers
2025-04-16 15:28:08 -03:00
Luan
98a2ba8c46 chore(parser): Fix types 2025-04-16 14:16:17 -03:00
Luan
a1fd51fbb5 chore: Copy over some types from youtubei-dts
Needed for hot config retrieval.
2025-04-16 14:09:32 -03:00
Luan
c7048368cc feat(Session): Add deviceExperimentId and rolloutToken to session data 2025-04-16 13:28:47 -03:00
Luan
458c4900d7 feat(parser): Parse targetId
Used by the UI to identify interactions/commands sent by nodes deep into the response (ChipCloudChip, Button, etc..)
2025-04-13 16:47:46 -03:00
Luan
f8690118c3 feat(MultiPageMenuNotificationSection): Add notification_section_title 2025-04-11 17:10:55 -03:00
absidue
14ea875c67 chore: Inline some trivial private methods (#946) 2025-04-06 13:37:57 -03:00
Brijesh Thummar
95d9211eae fix(HTTPClient): Use the correct constant for the iOS client OS name (#938) 2025-04-05 12:55:18 -03:00
Luan
393c243495 chore(ButtonView): Fix typo 2025-04-05 06:22:51 -03:00
Luan
df6b0cccc4 refactor: Update some nodes to use AccessibilityData.ts 2025-04-05 05:44:11 -03:00
Luan
a95f52a477 feat(Text): Parse accessibility data
+ Clean up.
2025-04-05 05:09:34 -03:00
absidue
4284fa6d06 chore(build): More efficient enum emit (#944) 2025-04-05 03:44:44 -03:00
Luan
d8f731b2fa feat(RichRenderers): Parse more UI elements
YouTube is currently A/B testing a new You/Library page that uses RichShelf nodes instead of Shelf. There are no major visual changes, other than the page being much more responsive due to how RichShelf is styled.
2025-04-05 03:40:11 -03:00
github-actions[bot]
9694a48270 chore(main): release 13.3.0 (#927)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-25 10:07:55 -03:00
Luan
edfd65f5e0 fix(Player): Parse global variable used by nsig/sig (#935)
To reduce reliance on regex, we'll use an AST walker here.

Tested with the following player scripts:
https://www.youtube.com/s/player/643afba4/player_ias.vflset/en_US/base.js
https://www.youtube.com/s/player/4fcd6e4a/player_ias.vflset/en_US/base.js
https://www.youtube.com/s/player/363db69b/player_ias.vflset/en_US/base.js
2025-03-25 10:01:48 -03:00
Luan
cbb2535b24 feat(MusicImmersiveHeader): Parse buttons and menu 2025-03-24 10:49:54 -03:00
github-actions[bot]
1d4024fae5 chore(main): release 13.2.0 (#910)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-20 07:55:16 -03:00
absidue
216cb3139a chore(parser): Pass playlist_item_data as a parameter instead of a private property (#914) 2025-03-20 07:47:35 -03:00
absidue
4a4c37001d refactor(internal): Reduce frequent accesses to the same private property (#915) 2025-03-20 07:46:36 -03:00
wukko
219d88b200 fix(Constants): Update the iOS client version (#924)
* utils/Constants: update the iOS client version

* utils/HTTPClient: use osName & osVersion for iOS client from Constants
2025-03-20 07:45:17 -03:00
Luan
923e9c28e3 feat: Add AccessibilityContext and CommandContext classes + improve type definitions and parsing logic across multiple nodes 2025-03-03 03:22:27 -03:00
dependabot[bot]
5ef7ea8034 chore(deps-dev): bump vite in /examples/browser/web (#906)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.11 to 5.4.12.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.12/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.12/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>
2025-02-27 04:52:52 -03:00
absidue
00c199ac69 fix(Format): Parse xtags from protobuf to support SABR-only responses (#909) 2025-02-27 03:30:43 -03:00
Nansess
06a0090ae6 chore(constants): Update version numbers to latest (#908) 2025-02-25 07:46:31 +01:00
github-actions[bot]
401b4c3858 chore(main): release 13.1.0 (#880)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-21 19:15:11 -03:00
Muhammad Mujtaba Naveed
5aecd0ace9 fix(innertube): Allowing getStreamingData to use client (#895) 2025-02-21 19:12:19 -03:00
absidue
432571769e revert: "fix(toDash): Fix default audio stream for dubbed movie trailers (#858)" (#896)
This reverts commit 00546909c0.
2025-02-21 19:10:04 -03:00
Dave Nicolson
2b4219959c fix(Playlist): is_editable (#894)
* Fix is_editable

* Add can_reorder
2025-02-21 19:07:56 -03:00
Dave Nicolson
b731db86c5 fix(DialogView): Type mismatch (#897) 2025-02-21 19:04:21 -03:00
Dave Nicolson
e2ee822b9d Fix getPlaylist playlist ID (#898) 2025-02-21 19:02:29 -03:00
Luan
3243339b37 chore(tests): Remove unneeded continuation test 2025-02-21 18:59:58 -03:00
Luan
c9328c59f9 chore: fix test 2025-02-21 18:56:22 -03:00
Luan
a3fafe2f79 fix(music#getPlaylist): Handle ContinuationItem nodes
Closes #904
2025-02-21 18:52:34 -03:00
Luan
ca7c3164e1 chore(AnimatedThumbnailOverlayView): Refactor thumbnail handling to use Thumbnail class 2025-02-21 18:15:29 -03:00
Luan
02dfcae612 fix(dependencies): Update jintr to version 3.2.1 2025-02-21 18:13:10 -03:00
Izak Filmalter
0cb92d9620 feat(parser): Add AnimatedThumbnailOverlayView (#903)
* Add AnimatedThumbnailOverlayView parser.

* Update nodes.ts
2025-02-17 11:41:17 -03:00
Nansess
5394edc9bd chore(constants): update WEB_CREATOR version (#893)
* update WEB_CREATOR version

* Update Constants.ts
2025-02-15 11:07:51 -03:00
absidue
7d5c972c98 fix(Innertube): Properly encoded params in getPost() (#882) 2025-02-13 17:31:12 -03:00
EdamAmex
b5c9581bec docs(installation): add install command for deno (#885)
* docs(installation): add install command for deno

* Update README.md
2025-02-13 17:30:11 -03:00
Loyalsoldier
774b3a7524 fix(FormatUtils): itag matching (#886) 2025-02-13 17:29:36 -03:00
ChunkyProgrammer
b3a4862151 feat(Channel): Add getCourses method (#883) 2025-02-11 06:10:50 -03:00
absidue
75d39e7afb chore(parser): Simplify d0d48bf525 (#888) 2025-02-08 06:00:03 -03:00
absidue
c776b9f349 chore(Utils): Replace private static shim property with a variable (#887) 2025-02-08 05:58:01 -03:00
absidue
0e869020db refactor: Remove internal uses of the .first() and .matchCondition() helpers (#889) 2025-02-08 05:55:39 -03:00
Luan
d0d48bf525 feat(CommentView): Parse prepareAccountCommand 2025-02-05 15:02:48 -03:00
Luan
3f960effa2 fix(Parser): Add UpdateEngagementPanelContentCommand
This command is sometimes used to open the Transcript panel.
2025-02-05 06:55:13 -03:00
Loyalsoldier
1c1577e85f feat(FormatUtils): choose more specific format by itag or codec (#884) 2025-01-28 15:43:09 -03:00
Luan
424c65356c fix(LockupView): Add overlay nodes used by VIDEO views 2025-01-25 11:59:17 -03:00
Luan
3ffdee9554 fix(LockupMetadataView): Parse menuButton 2025-01-25 11:41:01 -03:00
Luan
083aec1c80 fix(LockupView): Fix content_image parsing 2025-01-25 11:33:38 -03:00
Luan
6d57353a80 feat(CompactLink): Parse subtitle, iconType, and iconType 2025-01-24 11:22:29 -03:00
Luan
32125c7045 feat(CommentView): Parse some extra tooltips 2025-01-21 07:51:55 -03:00
github-actions[bot]
0802cb8abd chore(main): release 13.0.0 (#843)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-01-20 16:51:49 -03:00
Luan
ad8baac76f chore: update docs 2025-01-20 16:49:04 -03:00
Luan
e54e499ff5 refactor!: Remove web.bundle.min
Everybody uses minifiers these days anyway..
2025-01-20 16:05:07 -03:00
jonz94
a035b71696 fix(LiveChatTextMessage): Make some fields optional (#877)
- Mark `menu_endpoint` property as optional
- Mark `context_menu_accessibility_label` property as optional
2025-01-20 15:46:34 -03:00
Konstantin
49be72dd04 chore: Enable sourceMaps to show error traces related to typescript files (#873)
* chore: enable sourceMaps again to show error traces related to typescript files and allow local debugging for development

* chore: create source maps for all bundles

---------

Co-authored-by: Luan <luan.lrt4@gmail.com>
2025-01-20 15:46:03 -03:00
absidue
7a7139e32d refactor(Constants): Use as const instead of Object.freeze() (#879) 2025-01-20 15:09:56 -03:00
absidue
06887e99fb perf(constants): Move the client name IDs into their own CLIENT_NAME_IDS object (#875) 2025-01-17 07:19:53 -03:00
Luan
4d36655b2d feat(Session): Allow using a fixed user agent for InnerTube requests (#876)
Certain attestation challenges are bound to the user agent (e.g, WebPo), so we can't just use a random one for every request.
2025-01-17 06:06:36 -03:00
Luan
83de198351 chore(examples): Update deps & patch shaka 2025-01-16 18:08:04 -03:00
Luan
50e4b4ee0b chore(examples): Don't proxy BotGuard requests 2025-01-16 17:55:33 -03:00
Luan
57eba83cb6 chore(examples): Update browser example 2025-01-15 14:23:46 -03:00
absidue
1a3d663cc5 perf: Optimise DASH manifest generation (#870) 2025-01-13 07:43:25 -03:00
Luan
33c27ddcb5 feat(Innertube): Add getAttestationChallenge (#869)
* feat(Innertube): Add `getAttestationChallenge`

YouTube has recently started using this InnerTube endpoint to fetch challenges for WebPo generation.

* chore: lint
2025-01-11 19:42:18 -03:00
Luan
50539bca9c chore(ShortsLockupView): Use a shorter import 2025-01-11 17:47:24 -03:00
Konstantin
2913d5f43d feat(Music): Add continuation support for "Up next" tab in TrackInfo (#770)
* chore: tests for playlist panel

* chore: add possibility to continue music playlist panel

* chore: allow further playlist continuation

* revert: further revert Music.ts changes

* chore: rename test description

* chore: add check and remove TODO

* fix: fix issue with new code

* chore: remove documentation

* fix: fix test by using some video from homepage
2025-01-11 17:44:29 -03:00
ChunkyProgrammer
360b29ee60 feat(Innertube): Add ability to get individual community posts and community post comments (#861)
* feat(Innertube): Add method to get a community post

* feat(Innertube): add a method to get Community Post comments

* Follow naming conventions of the project instead of using C# conventions

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2025-01-11 17:30:19 -03:00
jonz94
732a30c09f fix(Text#fromAttributed): Fix StyleRun assuming that the startIndex and length always exist (#862)
In AttributedText, styleRuns may not always include the `startIndex` or `length` properties
- If `startIndex` is missing, we assume the style applies from the beginning of the text
- If `length` is missing, we assume the style applies to the entire text
2025-01-11 17:27:16 -03:00
jonz94
0a3104bafc feat(ContentMetadataView): Parse enableTruncation (#863) 2025-01-11 17:25:13 -03:00
jonz94
9025122484 feat(parser): Update LiveChatTextMessage (#864)
Update `LiveChatTextMessage` to extend `YTNode` rather than
`LiveChatMessageBase` to better align with the latest data
provided by Innertube.

- Add `timestamp_usec` property
- Add `timestamp_text` property
- Add `context_menu_accessibility_label` property
- Add `before_content_buttons` property
2025-01-11 17:23:22 -03:00
absidue
66cbee268d chore(parser): Simplify VideoInfo#getTrailerInfo (#867) 2025-01-11 17:22:40 -03:00
Luan
f3c777b316 fix(Text#toHTML): Return empty string if the text is undefined 2024-12-31 19:08:55 -03:00
Luan
f76a8e5d75 refactor(Parser): Update view models to use RendererContext.ts
May or may not be a breaking change for some.
2024-12-31 06:41:17 -03:00
jonz94
3c28c0d2c2 feat(parser): Update LiveChatPaidSticker (#849)
* Add `sticker_accessibility_label` property
* Add `sticker_display_width` property
* Add `sticker_display_height` property
* Add `context_menu_accessibility_label` property
* Add `timestamp_usec` property
* Add `is_v2_style` property
2024-12-31 06:24:12 -03:00
Konstantin
48460e4184 feat(Playlists): Implement addToLibrary and removeFromLibrary (#844)
* chore: add possibility to add playlists to user library

* chore: fix playlist dislike endpoint

* chore: adapt to new structure

* refactor: renamed method names
2024-12-31 06:23:28 -03:00
jonz94
6536801ec2 fix(ButtonCardView): Correct typo (#855) 2024-12-31 06:18:56 -03:00
jonz94
b4a947a9eb feat(parser): Update LiveChatViewerEngagementMessage (#856)
Update `LiveChatViewerEngagementMessage` to extend `YTNode` rather than
`LiveChatMessageBase` to better align with the latest data provided by
Innertube.
2024-12-31 06:14:49 -03:00
absidue
00546909c0 fix(toDash): Fix default audio stream for dubbed movie trailers (#858) 2024-12-31 06:12:21 -03:00
jonz94
5f899fcdb3 feat(parser): Update Button (#857)
* Add `style` property
* Add `size` property
* Add `target_id` property
* Parse `data.accessibilityData.accessibilityData.label` if `data.accessibility.label` is unavailable
2024-12-31 06:11:31 -03:00
Luan
c6310228fe feat(Parser): Add AvatarStackView 2024-12-31 06:05:49 -03:00
Luan
3a11b99429 feat(Parser): Implement utility class to parse rendererContext
This field is found in most of the newer view model nodes. It can contain accessibility labels, text, commands or nothing but logging info.
2024-12-31 06:04:53 -03:00
Luan
a602a317aa feat(PageHeaderView): Parse heroImage 2024-12-31 05:23:35 -03:00
Luan
c2dd803eea fix(DescriptionPreviewView): Parsing errors when certain fields are missing 2024-12-31 05:16:36 -03:00
Luan
88af6d89a5 feat(ToggleButtonView): Add is_toggled 2024-12-30 15:04:18 -03:00
jonz94
826a9541a4 fix(sendMessage): Handle RunAttestationCommand in response actions (#859)
* fix(sendMessage): Handle `RunAttestationCommand` in response actions

Handle the case when `RunAttestationCommand` is included in the
`sendMessage()` response actions.

* style: trim trailing whitespace
2024-12-27 02:41:30 -03:00
Luan
913dcc74ea fix(TextRun): Add img element only if an URL is available 2024-12-25 00:19:26 -03:00
Luan
b7c0421490 chore(Innertube#getSearchSuggestions): Use fetch_function instead of fetch
It is not an InnerTube request.
2024-12-23 22:29:08 -03:00
Luan
75b8964180 feat(SubscribeButton): Add unsubscribe_text 2024-12-23 21:33:42 -03:00
jonz94
5f83a7416d feat(parser): Update LiveChatTickerPaidStickerItem (#848)
The `LiveChatTickerPaidStickerItem` class has been updated to extend
`YTNode` instead of `LiveChatTickerPaidMessageItem` to better align with
the latest data provided by InnerTube
2024-12-22 16:09:34 -03:00
jonz94
ef37aa0a5a feat(LiveChatPaidMessage): Parse headerOverlayImage and lowerBumper (#851)
* feat(LiveChatPaidMessage): Parse `headerOverlayImage` and `lowerBumper`

When a viewer donates for the 1st, 3rd, 5th, 10th, or 20th time,
there will be a special type of `LiveChatPaidMessage` that includes an
animated image in the header, followed by a bumper text message.

* chore: npm run build:parser-map
2024-12-22 16:08:37 -03:00
Luan
06df214bc9 refactor: Include po tokens in all watch requests
+ Fix empty `serviceIntegrityDimensions` being sent when no potoken is provided.
2024-12-22 15:58:48 -03:00
absidue
5050f4866b chore(parser): Hoist API_PATH constants in endpoint nodes (#852) 2024-12-21 00:14:18 -03:00
Luan
78e79519e6 refactor(MultiPageMenuNotificationSection): Parse items as an array 2024-12-18 12:25:19 -03:00
Luan
c3d4b2d60a chore(parser): Fix continuation types 2024-12-18 12:18:40 -03:00
Luan
45b734288e feat(parser): Parse OpenPopupAction in onResponseReceivedEndpoints arrays 2024-12-18 12:06:36 -03:00
Luan
e571ee2426 feat(RichGrid): Parse targetId 2024-12-17 17:34:16 -03:00
Luan
5e8e42c9ed chore(getSearchSuggestions): Pass in SUGG_EXP_ID 2024-12-17 15:33:33 -03:00
Luan
c61db19f2e feat(getSearchSuggestions): Add optional pq param for better suggestions 2024-12-17 15:23:49 -03:00
jonz94
342fdd1db3 feat(parser): Add ReplaceLiveChatAction (#847) 2024-12-15 01:09:18 -03:00
jonz94
73362c68fb feat(parser): Update LiveChatPaidMessage (#846)
* Add `author_name_text_color` property
* Add `context_menu_accessibility_label` property
* Add `timestamp_usec` property
* Mark `timestamp_text` property as optional
* Add `timestamp_color` property
* Add `text_input_background_color` property
* Add `creator_heart_button` property
* Add `is_v2_style` property
* Add `reply_button` property
2024-12-15 01:09:02 -03:00
jonz94
29e8d3015a feat(parser): Update LiveChatTickerPaidMessageItem (#845)
* Change `duration_sec` property type from `string` to `number`
* Change `full_duration_sec` property type from `string` to `number`
* Handle the scenario where the author's name is represented as `authUsername`
* Mark `amount` property as optional
* Add `start_background_color` property
* Add `amount_text_color` property
* Add `end_background_color` property
* Add `animation_origin` property
* Add `open_engagement_panel_command` property
2024-12-15 01:04:05 -03:00
Luan
523700b728 fix(getSearchSuggestions): Allow empty queries
Can be used to retrieve search suggestion history when logged in.
2024-12-14 16:20:41 -03:00
Luan
0b73702bdd chore(HowThisWasMadeSectionView): Make some fields optional
Just in case.
2024-12-14 12:41:24 -03:00
Luan
e95402731e chore: lint 2024-12-14 12:35:55 -03:00
Luan
5da8a66551 feat(Parser): Add HowThisWasMadeSectionView node 2024-12-14 12:32:29 -03:00
ChunkyProgrammer
c0043d0194 feat(Parser): Parse YpcTrailer in VideoInfo (#842) 2024-12-13 19:50:31 -03:00
github-actions[bot]
3ec1609974 chore(main): release 12.2.0 (#833)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-12 10:32:02 -03:00
Luan
25fd979363 chore(deps): Update jintr 2024-12-12 10:30:45 -03:00
jonz94
0c319aacde feat(parser): Update LiveChatMembershipItem (#836) 2024-12-12 09:39:25 -03:00
jonz94
69d42b291c feat(parser): Update LiveChatBanner (#840)
* Mark `viewerIsCreator` property as optional
* Mark `background_type` property as optional
* Add `banner_type` property
* Add `banner_properties_is_ephemeral` property
* Add `banner_properties_auto_collapse_delay_seconds` property
2024-12-12 09:38:44 -03:00
jonz94
9a9bb76a92 feat: add VideoMetadataCarouselView (#839) 2024-12-12 09:34:07 -03:00
jonz94
0b2b0da957 feat(parser): Add ClientSideToggleMenuItem (#835)
* feat(parser): Add `ClientSideToggleMenuItem`

* feat: parse the command

* feat: handle different type of `ClientSideToggleMenuItem`
2024-12-12 09:31:59 -03:00
jonz94
eeaae6209f feat(parser): Add ButtonCardView (#834) 2024-12-12 09:31:14 -03:00
absidue
13e796123b fix(Player): Fix signature algorithm extraction again (#837) 2024-12-12 09:30:50 -03:00
Luan
5f233ae34e feat(parser): Add ActiveAccountHeader
Found on the 'You' (a.k.a, 'Library') page.
2024-12-10 18:32:31 -03:00
Luan
c1de097ce1 chore(Parser): Don't ignore BackgroundPromo
It turns out this is not an ad at all.
2024-12-10 16:30:23 -03:00
Luan
67f13fffac feat(Actions): Allow auth check to be skipped 2024-12-10 16:12:06 -03:00
Luan
c8173c88e0 feat(parser): Add PlaylistThumbnailOverlay 2024-12-10 13:50:20 -03:00
github-actions[bot]
8e97bbc058 chore(main): release 12.1.0 (#830)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-10 10:10:40 -03:00
Luan
283172f220 fix(Player): Bump cache version
This should fix bad (n)sig caches.
2024-12-10 10:08:05 -03:00
absidue
ce4996cea7 fix(Player): Fix signature algorithm extraction (#832) 2024-12-10 09:28:08 -03:00
Luan
ad2ae51b97 feat(parser): Add mobile guide nodes 2024-12-08 17:11:57 -03:00
Luan
4bf125b6a5 feat: Add MWEB client 2024-12-08 17:11:57 -03:00
github-actions[bot]
eaf6d1ab4e chore(main): release 12.0.0 (#790)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-05 20:49:54 -03:00
dependabot[bot]
8b2907169b chore(deps): bump path-to-regexp and express (#829)
Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) to 0.1.12 and updates ancestor dependency [express](https://github.com/expressjs/express). These dependencies need to be updated together.


Updates `path-to-regexp` from 0.1.10 to 0.1.12
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v0.1.10...v0.1.12)

Updates `express` from 4.21.1 to 4.21.2
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.2/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.1...4.21.2)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-05 20:48:18 -03:00
Luan
478205b9d4 chore: update deps 2024-12-05 20:43:04 -03:00
Luan
acfb0c58be fix(Player): Add more ways to find the nsig algo 2024-12-05 19:31:43 -03:00
Luan
6771325bb3 chore(oauth/examples): Remove unneeded scopes
For those getting errors even after removing this:
If you had previously signed in using the same OAuth credentials, you'll have to go to "account" > "security" > "See all connections" (third party apps) and then remove the previously granted access.
2024-12-04 14:37:30 -03:00
Luan
d10fe6834a feat(VideoViewCount): Add extra_short_view_count field 2024-12-04 14:32:15 -03:00
Luan
ec85b0f942 feat(parser): Add ShowEngagementPanelEndpoint 2024-11-28 18:14:25 -03:00
Patrick Kan
a7bb981731 refactor: Cookie-based session fixes and minor additions (#821)
* (fix) `on_behalf_of_user` arg not applied

* (feat) `AccountManager#getInfo()`: Add option to fetch full accounts list
2024-11-28 17:44:30 -03:00
Luan
386257c7b3 chore: catch up 2024-11-27 07:33:23 -03:00
Luan
af3a91645d feat(EngagementPanelTitleHeader): Add contextual_info and menu
Both con contain info about the comments section.
2024-11-27 07:30:10 -03:00
absidue
bbaefb12b3 chore(Utils): Bump WEB version constant to latest version (#818) 2024-11-26 01:49:13 -03:00
absidue
8e50ebd925 feat(parser): Add animated_image to PageHeaderView (#819) 2024-11-26 01:48:52 -03:00
Luan
92acd6ca4d chore: fix HideEngagementPanelEndpoint type
Oops.
2024-11-26 01:23:33 -03:00
Luan
2824900852 feat(parser): Add ChangeEngagementPanelVisibilityEndpoint
Similar to `ChangeEngagementPanelVisibilityAction`
2024-11-26 01:17:14 -03:00
Luan
c2b2d7ad52 feat(parser): Add ChangeEngagementPanelVisibilityAction 2024-11-25 05:33:49 -03:00
Luan
790f8172fc fix(VideoSecondaryInfo): Parse show_more_text and show_less_text correctly 2024-11-25 05:16:08 -03:00
Luan
ed8d43a799 chore: lint 2024-11-25 03:26:04 -03:00
Luan
fcd65b4dba chore(docs): Update API ref [skip ci] 2024-11-25 03:25:27 -03:00
Luan
4729016fb9 feat(parser): Add RunAttestationCommand
Can be used to get attestation responses from BotGuard, assuming you have a VM (retrieved using the `/att/get` endpoint, with engagement type set to `ENGAGEMENT_TYPE_UNBOUND`) loaded up.
2024-11-25 03:23:23 -03:00
Luan
951256c641 chore(docs): Update API ref (x2) [skip ci] 2024-11-22 06:24:56 -03:00
Luan
cf09f7bab1 chore: clean up some classes 2024-11-22 06:21:41 -03:00
Luan
d8dca8cc09 refactor(parser): Remove unused analytics nodes
These were once useful when it was still possible to use the Android client with OAuth.
2024-11-22 05:17:57 -03:00
Luan
91fa215235 chore(parser): lint 2024-11-22 05:11:17 -03:00
Luan
2f087d47a0 refactor(parser)!: Remove old comment node 2024-11-22 04:58:37 -03:00
Luan
2c7f0ca155 refactor(kids/Channel): Use new endpoint parsers for continuation requests 2024-11-22 04:45:39 -03:00
Luan
4e9d64404e chore(docs): Update API ref 2024-11-22 04:25:16 -03:00
absidue
fc5571629e feat(Log)!: Convert Log class to module (#814) 2024-11-21 21:04:38 -03:00
absidue
9cf0d3f3b3 chore(parser)!: Remove getters that have been deprecated for a long time (#815) 2024-11-21 20:13:37 -03:00
Luan
7397aa3f64 refactor(parser)!: Implement endpoint/command parsers (#812) 2024-11-21 18:24:16 -03:00
jonz94
7156a585c0 feat(parser): add LiveChatModeChangeMessage node (#811)
* feat(parser): add `LiveChatModeChangeMessage` node

* chore: npm run build:parser-map

* refactor: keep `timestamp_text` as Text

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>

* refactor: keep `timestamp_text` as Text

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2024-11-19 17:06:29 -03:00
YBD Project
cfb48fab89 feat: Add getCourses (#798)
* feat: add getCourses function to retrieve courses

* chore: Change getCourses function to return Feed instead of TabbedFeed
2024-11-19 04:56:57 -03:00
Dave Nicolson
71d9ebc5fd refactor(PlaylistManager): Optimize playlist video removal (#801)
* Handle undefined playlist attributes

* Optimize playlist video removal
2024-11-19 04:52:18 -03:00
absidue
0914299215 feat(parser): Add optional image property to LockupMetadataView (#806) 2024-11-19 04:50:28 -03:00
ChunkyProgrammer
038efff17f feat(Parser): add support for parsing subtitle for RichShelf (#805) 2024-11-19 04:43:03 -03:00
absidue
4b178e4bfb fix(parser): The AvatarView.image_processor property is optional (#807) 2024-11-18 15:54:03 -03:00
absidue
680da9f501 fix(parser): Update list of possible content_type in LockupView (#808) 2024-11-18 15:51:00 -03:00
jonz94
7fb00fa378 feat(parser): Add LiveChatBannerChatSummary node, update TextRun node (#809)
* feat(parser): add `LiveChatBannerChatSummary` node

* feat(TextRun): add `deemphasize` property

* chore: npm run build:parser-map
2024-11-18 15:49:50 -03:00
Luan
53d1c759b6 fix(PlaylistAddToOption): Use correct type for contains_selected_videos 2024-11-18 04:15:54 -03:00
Luan
bdebb9f741 feat(NavigationEndpoint): Add name property
Sometimes you can make assumptions based on the endpoint's object name.
2024-11-17 01:19:08 -03:00
Luan
2940f7b908 feat(parser): Add AddToPlaylist node 2024-11-17 00:14:37 -03:00
Luan
c68810d502 Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2024-11-15 03:49:43 -03:00
Luan
dc2ed046b8 feat(parser): Add PlayerOverlayVideoDetails node 2024-11-15 03:24:25 -03:00
Luan
ad448f8106 feat(parser): Add VideoViewCount node 2024-11-15 03:16:03 -03:00
Luan
80dbd6fe71 chore(Menu): Update flexible_items type 2024-11-15 03:07:27 -03:00
Luan
bc9a0ed6c1 feat(parser): Add MenuFlexibleItem 2024-11-15 03:06:47 -03:00
jonz94
ad302b8b17 feat(parser): Add LiveChatBannerRedirect node (#799) 2024-11-14 23:55:23 -03:00
Luan
126a66f317 fix(SubscribeButton): Parse endpoints using NavigationEndpoint 2024-11-13 00:09:33 -03:00
Luan
daa5a2982b fix(ReelPlayerOverlay): Update subscribe_button_renderer type to include SubscribeButton 2024-11-12 23:49:58 -03:00
Luan
8bf9eb7044 feat(SubscribeButton): Parse more endpoints 2024-11-12 23:43:32 -03:00
Luan
8ab760ea2e fix(SignalAction): Rename action to signal 2024-11-11 16:32:47 -03:00
Luan
feeb21b3eb feat(parser): Add SignalAction node 2024-11-11 16:20:51 -03:00
Luan
d36ddb804a feat(parser): Add NotificationAction node 2024-11-11 16:20:36 -03:00
Luan
b0965c7ac9 chore: lint 2024-11-10 04:23:51 -03:00
Luan
d3f6af0775 fix(UnifiedSharePanel): Check if thirdPartyNetworkSection exists
Oops.
2024-11-10 04:18:58 -03:00
Luan
556c3d68eb chore: lint 2024-11-10 04:10:33 -03:00
Luan
4a1397f1bc feat(parser): Add UnifiedSharePanel 2024-11-10 04:08:23 -03:00
Luan
fdb754043b feat(parser): Add UpdateSubscribeButtonAction 2024-11-09 20:18:14 -03:00
Luan
0a99342ccb fix(VideoAttributeView): Parse secondarySubtitle only if exists 2024-11-09 16:36:40 -03:00
Luan
e4ca991d30 Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2024-11-09 16:22:41 -03:00
Luan
360580ea6e fix(ExpandableVideoDescriptionBody): Parse attributed description 2024-11-09 16:20:55 -03:00
jonz94
20f7971299 feat(parser): Add LiveChatSponsorshipsGiftRedemptionAnnouncement node (#795) 2024-11-09 12:22:46 -03:00
Luan
b83a32f6a6 Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2024-11-08 15:32:41 -03:00
Luan
0bb28a95fc chore(examples): Fix custom OAuth creds example 2024-11-08 15:32:06 -03:00
jonz94
4e9c2a585b feat(parser): Add LiveChatSponsorshipsGiftPurchaseAnnouncement and LiveChatSponsorshipsHeader nodes (#793)
* feat(parser): Add `LiveChatSponsorshipsGiftPurchaseAnnouncement` and `LiveChatSponsorshipsHeader` nodes

* refactor: flatten nested field

* refactor: attempt to replace `author_*` fields with a single `Author` class

* fix: add back `author_*` fields in `LiveChatSponsorshipsHeader`

* fix: use `parseArray` to parse author_badges data

* refactor: revert `Author` logic

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2024-11-02 08:08:41 -03:00
ChunkyProgrammer
34ae38cbf4 feat(Parser): Add support for parsing subtitle for Shelf (#792) 2024-10-30 16:48:29 -03:00
ChunkyProgrammer
a4394dbb82 Fix(VideoCard): fix parsing author, view count and published date (#791) 2024-10-30 16:47:43 -03:00
Luan
2e782cff90 Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2024-10-29 12:05:33 -03:00
Luan
50be8a8f54 refactor(Studio): Use WEB for /upload/createvideo requests 2024-10-29 12:05:25 -03:00
asomethings
677e1f0807 feat(account): Add missing property channel_handle (#789) 2024-10-29 08:04:07 -03:00
github-actions[bot]
4ec4be64ee chore(main): release 11.0.1 (#788)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-28 16:09:20 -03:00
absidue
182bf42d3c fix(VideoInfo): Fix like count being undefined (#787) 2024-10-28 16:08:11 -03:00
Luan
dba0be7bc8 chore: update docs 2024-10-28 16:07:35 -03:00
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
github-actions[bot]
1e29019a07 chore(main): release 10.2.0 (#688)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-25 10:52:50 -03:00
Luan
6765f4e0d7 fix(Player): Bump cache version (#702)
We should always do this after updating the sig/nsig code, it's so that the old cache gets ignored : ).
2024-07-25 10:48:24 -03:00
absidue
3048f70f60 fix(Player): Fix extracting the n-token decipher algorithm again (#701) 2024-07-25 10:07:00 -03:00
Brahim Hadriche
090539b28f feat(parser): add classdata to unhandled parse errors (#691) 2024-07-24 15:55:20 -03:00
Brahim Hadriche
6d0bc89be1 fix(parser): ignore MiniGameCardView node (#692) 2024-07-24 15:54:37 -03:00
GurumNyang
a5f62093a1 feature(proto): Add comment_id to commentSectionParams (#693) 2024-07-24 15:54:14 -03:00
absidue
a352ddeb9d feat(Format): Add is_secondary for detecting secondary audio tracks (#697) 2024-07-24 15:53:27 -03:00
Brahim Hadriche
0f8f92a28a fix(parser): ThumbnailView background color (#686) 2024-07-11 14:31:27 -03:00
github-actions[bot]
7d03469e64 chore(main): release 10.1.0 (#669)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-10 03:44:43 -03:00
Luan
62ac2f6f32 fix(proto): Update Context message
Closes #681
2024-07-10 03:41:16 -03:00
absidue
142a7d0428 fix(Player): Fix extracting the n-token decipher algorithm (#682)
* fix(Player): Fix extracting the n-token decipher algorithm

* fix: bump Jinter to v2

---------

Co-authored-by: Luan <luan.lrt4@gmail.com>
2024-07-10 02:21:39 -03:00
Luan
efa7205723 Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2024-07-01 08:53:45 -03:00
Luan
84f90aaf29 fix(Session): Round UTC offset minutes 2024-07-01 08:53:08 -03:00
absidue
858cdd197c feat(toDash): Add the "dub" role to translated captions (#677) 2024-06-30 23:05:08 -03:00
Luan
5a8fd3ad37 feat(Session): Add configInfo to InnerTube context
Minor addition. It's needed for certain UMP requests.
2024-06-30 22:51:02 -03:00
슈리튬
a19511de24 fix(FormatUtils): Throw an error if download requests fails 2024-06-28 16:45:39 -03:00
absidue
bd9f6ac64c feat(toDash): Add option to include WebVTT or TTML captions (#673) 2024-06-25 01:22:11 -03:00
absidue
e5aab9a9b3 fix(toDash): Fix image representations not being spec compliant (#672) 2024-06-24 15:48:38 -03:00
Luan
d6fa134c3d chore(Playlist): Add MusicResponsiveHeader to header types
Oops! I forgot this one also existed : ).
2024-06-21 21:12:54 -03:00
Luan
fe953072a2 chore: fix tests 2024-06-21 20:57:38 -03:00
Luan
055fa33403 chore: lint 2024-06-21 19:32:50 -03:00
Luan
14c3a06d40 fix(YTMusic): Add support for new header layouts
This is due to a minor page redesign by YouTube Music. See https://9to5google.com/2024/06/20/youtube-music-web-album-playlist-redesign/.
2024-06-21 19:31:40 -03:00
Luan
67376afae6 chore(Format): Clean up and add some extra fields 2024-06-16 16:22:33 -03:00
Luan
4cbaa7983f fix(InfoPanelContent): Update InfoPanelContent node to also support paragraphs
This would fail when `attributedParagraphs` was missing, so we still need `paragraphs` there.
2024-06-16 15:39:47 -03:00
github-actions[bot]
9802483233 chore(main): release 10.0.0 (#658)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-09 20:43:14 -03:00
Aidar Nugmanoff
2980a608b6 feat(Platform): Add support for react-native platform (#593) 2024-06-09 18:15:57 -03:00
Luan
b6cecb10f5 chore(docs): update readme 2024-06-09 18:02:46 -03:00
Luan
040a091639 fix(FlexibleActionsView): Update actions array type to include ToggleButtonView 2024-06-08 16:33:34 -03:00
Luan
3939405cc6 chore(Player): Rephrase nsig failure message 2024-06-07 14:26:27 -03:00
Luan
978ab1ed29 chore(docs): fix typo [skip ci] 2024-06-07 14:18:23 -03:00
Luan
5cdb9e1e2f fix(InfoPanelContainer): Use new attributed text prop
+ And update other related nodes.
2024-06-07 14:15:44 -03:00
Luan
15f3b5fdba fix(ButtonView): Rename type property to button_type
It was overriding the static property "type".
2024-06-05 16:00:16 -03:00
Luan
384b80ee41 fix(Cache): Use TextEncoder to encode compressed data 2024-06-05 12:30:12 -03:00
Luan
b588554ce1 chore: update docs [skip ci] 2024-06-03 19:16:41 -03:00
Luan
583fd9f8d7 fix(MusicResponsiveHeader): Add Text import
Looks like I forgot to add it.
2024-06-03 19:08:33 -03:00
Luan
7953296580 feat(Session): Add enable_session_cache option (#664)
See https://github.com/LuanRT/YouTube.js/pull/663#issuecomment-2146161637
2024-06-03 19:04:30 -03:00
Luan
cf29664d37 perf(general): Add session cache and LZW compression (#663)
* feat(utils): Implement LZW compression module

* feat(Session): Implement cache for sessions
This should improve performance quite a bit for those who are not using the `generate_session_locally` option (like me :P).

* refactor(Player): Add LZW compression
This considerably reduces the size of the cache.
2024-06-03 18:21:48 -03:00
Luan
4015a5e560 chore(JsRuntime): Change log levels in evaluate function 2024-06-03 17:42:18 -03:00
Luan
184df79b3a refactor(HTTPClient): Use getCookie fn to get SAPISID token 2024-06-03 17:41:09 -03:00
Luan
000f3f0915 refactor(Artist.ts): Change sections type to ObservedArray<MusicCarouselShelf | MusicShelf> 2024-06-03 17:39:42 -03:00
Luan
8372b3d22f Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2024-06-03 17:33:04 -03:00
Luan
b9d50daa57 chore: clean up
Updated deps, fixed some ts issues, renamed "scripts" to "dev-scripts", and added a script to delete build output.
2024-06-03 17:29:11 -03:00
absidue
031ffb696e feat(toDash): Add support for stable volume/DRC (#662) 2024-05-28 02:43:10 -03:00
Luan
8e942ada3b chore(docs): fix some markdown issues 2024-05-24 04:33:03 -03:00
LuanRT
aa3f34c428 chore: Fix browser example 2024-05-23 21:00:47 -03:00
LuanRT
c82bb70180 chore(HTTPClient): Remove env check when setting Android headers
These requests are supposed to be proxied, so there's no need to worry about browsers not liking it.
2024-05-23 20:58:37 -03:00
LuanRT
766045049d refactor(Innertube#getPlaylists)!: Return a Feed instance instead of items 2024-05-21 20:50:41 -03:00
Luan
b6ce5f903f refactor(OAuth2)!: Rewrite auth module (#661)
This is a rewrite of the OAuth2 module to address some bugs and inconsistencies. And since it changes the structure of the credentials, I'm marking this as a breaking change.

Note that you will have to update your existing credentials, that is if you wish to continue using them. Otherwise, simply delete them and sign in again.
2024-05-21 18:47:31 -03:00
absidue
6bb2086875 feat(Format): Add is_drc (#656) 2024-05-06 11:55:58 -03:00
Brahim Hadriche
810665407e Item section target_id fix (#655) 2024-04-29 14:22:28 -03:00
github-actions[bot]
1b00e2c6ce chore(main): release 9.4.0 (#644)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-29 09:14:43 -03:00
LuanRT
ea82beaa10 feat(Parser): Add MusicResponsiveHeader node 2024-04-29 08:24:13 -03:00
absidue
0ba8c54257 feat(Format): Add spatial_audio_type (#647) 2024-04-29 08:10:08 -03:00
Brahim Hadriche
7315fca1b4 Add getPlaylists function (#650) 2024-04-29 08:09:35 -03:00
Brahim Hadriche
0602dd2c3d Lint fix (#651) 2024-04-29 08:07:24 -03:00
LuanRT
13321888e8 chore(PlayerEndpoint): Remove outdated code 2024-04-29 08:05:59 -03:00
absidue
d48b9d0946 chore(HTTPClient): Add X-Youtube-Client-Name and remove X-Origin headers (#645) 2024-04-25 18:04:10 -03:00
LuanRT
592ddac30f chore: Fix tests
Oops :)
2024-04-19 16:37:38 -03:00
LuanRT
1ec2ea85e2 refactor(Music#getRelated): Return page contents directy 2024-04-19 16:22:21 -03:00
absidue
064436cef3 feat(Format): Add projection_type and stereo_layout (#643)
5930ebda46
2024-04-19 16:08:12 -03:00
ChunkyProgrammer
4022d7aa89 Remove test code (#636) 2024-04-11 23:29:46 -03:00
github-actions[bot]
cd69ce73c1 chore(main): release 9.3.0 (#635)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-11 18:19:12 -03:00
LuanRT
1c08bfe113 feat(CommentView): Implement comment interaction methods 2024-04-11 18:04:45 -03:00
LuanRT
a624963384 docs(Comments): Update API ref 2024-04-11 18:03:04 -03:00
LuanRT
66e34f9388 fix(CommentThread): Replies not being parsed correctly 2024-04-11 16:05:59 -03:00
github-actions[bot]
0c2cdc1599 chore(main): release 9.2.1 (#632)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-09 17:42:18 -03:00
absidue
010704929f fix(toDash): Add missing transfer characteristics for h264 streams (#631) 2024-04-09 17:41:08 -03:00
dependabot[bot]
d4a938771b chore(deps): bump undici from 5.28.3 to 5.28.4 (#627)
Bumps [undici](https://github.com/nodejs/undici) from 5.28.3 to 5.28.4.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.3...v5.28.4)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-04 15:02:28 -03:00
github-actions[bot]
5ecfb08772 chore(main): release 9.2.0 (#611)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-31 11:39:15 -03:00
Ayoub
2029aec90d feat: add support of cloudflare workers (#596) 2024-03-31 11:37:06 -03:00
Luan
d589365ea2 fix(PlayerEndpoint): Workaround for "The following content is not available on this app" (Android) (#624)
* chore: Update Android client version and UA

* refactor: Update shorts parameter protobuf

* chore: Update auto generated files

* chore: Add test

* chore: Update comments test id (unrelated)

* chore: Update comments test again (unrelated)
2024-03-31 11:35:12 -03:00
LuanRT
45f33d8c04 refactor(MusicResponsiveListItem): Improve podcast and video/song parsing 2024-03-25 11:55:06 -03:00
LuanRT
92117eaaa0 chore(tests): use test instead of describe 2024-03-25 08:26:29 -03:00
LuanRT
39725374e3 chore(tests): remove beforeAll for the home feed test 2024-03-25 08:23:59 -03:00
LuanRT
213d78b1ab chore: remove home feed continuation test
Home feed now requires a visitor id with reputation or an account.

Removing this for now until I find a way around it for the tests at least.
2024-03-25 08:19:14 -03:00
LuanRT
28f53a698d chore: remove API key parameter
No longer needed.
2024-03-25 08:07:49 -03:00
Adam Learns
776a156f65 Fix broken README links (#618)
There were apostrophes in the links.
2024-03-25 07:25:17 -03:00
absidue
4a9bd32fd7 chore(LockupView): Remove debug logging (#617) 2024-03-25 07:24:24 -03:00
WhiteMind
3170659880 fix(Cache): handle the value read from the db correctly according to its type (#620) 2024-03-25 07:23:56 -03:00
absidue
e6f1f078a8 feat(Text): Support formatting and emojis in fromAttributed (#615) 2024-03-25 07:22:24 -03:00
absidue
900f557202 feat(parser): Support CommentView nodes (#614) 2024-03-25 07:20:29 -03:00
absidue
7ca2a0c3e4 feat(parser): Support LockupView and it's child nodes (#609) 2024-02-29 13:29:53 -03:00
LuanRT
f95283b236 chore: add any-of-issue-labels option to stale workflow 2024-02-22 23:04:46 -03:00
LuanRT
f6a7bcc44a Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2024-02-22 22:47:36 -03:00
LuanRT
c444843799 chore: update workflows 2024-02-22 22:47:17 -03:00
github-actions[bot]
5fe91d6642 chore(main): release 9.1.0 (#600)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-22 22:29:37 -03:00
absidue
bff65f8889 feat(Format): Support caption tracks in adaptive formats (#598) 2024-02-22 22:28:16 -03:00
dependabot[bot]
dac5eb712d chore(deps): bump undici from 5.27.0 to 5.28.3 (#599)
Bumps [undici](https://github.com/nodejs/undici) from 5.27.0 to 5.28.3.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.27.0...v5.28.3)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 22:27:47 -03:00
LuanRT
2068dfb73e fix(Session): Don't try to extract api version from service worker
It doesn't make sense to do this anyway because if it ever changed, we'd probably have to refactor the entire library.

Closes #602, #603, #604
2024-02-22 22:25:30 -03:00
LuanRT
3e84775fd3 Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2024-02-18 23:37:13 -03:00
LuanRT
89fa3b27a8 fix(Playlist): items getter failing if a playlist contains Shorts 2024-02-18 23:36:01 -03:00
github-actions[bot]
ab7201f0cc chore(main): release 9.0.2 (#591)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-31 19:50:59 -03:00
absidue
b21eb9f33d fix(VideoInfo): Fix error because of typo in getWatchNextContinuation (#590) 2024-01-31 19:34:46 -03:00
LuanRT
0751793380 Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2024-01-29 22:19:35 -03:00
LuanRT
5c91c2af4a chore: merge main 2024-01-29 22:14:22 -03:00
LuanRT
47cad4c6e1 chore: lint build scripts [skip ci] 2024-01-29 22:11:20 -03:00
github-actions[bot]
4fb9dff0f2 chore(main): release 9.0.1 (#588)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-25 21:32:45 -03:00
LuanRT
81dd5d3288 fix(build): Circular imports causing issues with webpack 2024-01-25 21:30:14 -03:00
LuanRT
c7f42220db chore: revert unneeded import type changes & lint
Yes. Again.
2024-01-25 21:17:59 -03:00
LuanRT
5204b29e81 chore: Lint 2024-01-25 20:47:19 -03:00
LuanRT
cbaa838cee chore: Revert some unneeded import changes 2024-01-25 20:43:19 -03:00
github-actions[bot]
379e63d2f6 chore(main): release 9.0.0 (#572)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-25 19:04:29 -03:00
Luan
e86a0daf45 refactor(general): Clean up and add a logger (#587)
* feat(utils): Add logger

* chore: Clean up some classes and add more logging

* chore: Fix conflicts
2024-01-25 19:01:28 -03:00
absidue
7fbc37f9d1 fix(PlayerCaptionTracklist): Fix captions_tracks[].kind type (#586) 2024-01-20 01:44:54 -03:00
absidue
2e710dc9f7 feat(Channel): Support getting about with PageHeader (#581) 2024-01-18 14:58:58 -03:00
absidue
fed3512461 fix(DecoratedAvatarView): Fix parsing and optional properties (#584) 2024-01-18 14:55:10 -03:00
absidue
6dd03e1658 feat(toDash)!: Add support for generating manifests for Post Live DVR videos (#580)
BREAKING CHANGES: The `duration` property in `StreamingInfo` has been
replaced by the asynchronous `getDuration()` function, as getting the duration
of Post Live DVR videos requires making a fetch request.
2024-01-18 14:51:42 -03:00
absidue
2073aa910a feat(parser): Add ImageBannerView (#583) 2024-01-18 14:41:08 -03:00
absidue
f7b7bbd47a chore(Constants): Update web client version (#582) 2024-01-18 14:40:15 -03:00
Luan
04d55d04c7 refactor(Playlist): Ignore ContinuationItem nodes from SectionList#contents (#579)
* feat(PlaylistVideo): Add `style`

* refactor(Playlist): Ignore `ContinuationItem` nodes in `SectionList#contents`

This should fix some issues regarding the library fetching the wrong continuation or empty continuations (NOTE: This means the solution in 987f506 no longer applies as empty continuations were all in `SectionList#contents`).
2024-01-18 14:39:25 -03:00
absidue
6082b4a52e feat(Channel): Support PageHeader being used on user channels (#577) 2024-01-12 21:52:02 -03:00
absidue
3980f97b8f fix(proto): Fix visitor data base64url decoding (#576) 2024-01-12 14:42:50 -03:00
absidue
59f4cfb4db fix(toDash): Add missing transfer characteristics for h264 streams (#573) 2024-01-10 20:17:21 -03:00
absidue
254f77944f feat(VideoDetails): Add is_live_dvr_enabled, is_low_latency_live_stream and live_chunk_readahead (#569) 2024-01-10 11:49:14 -03:00
absidue
586bb5f139 feat(Format): Add max_dvr_duration_sec and target_duration_dec (#570) 2024-01-10 11:40:08 -03:00
absidue
562e6a20f0 feat(VideoInfo): Add live stream end_timestamp (#571) 2024-01-10 11:39:47 -03:00
github-actions[bot]
b7cacc34f3 chore(main): release 8.2.0 (#567)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-08 20:46:30 -03:00
Brahim Hadriche
8f07e49512 fix(Parser): Add SortFilterHeader (#563)
* Fix for SortFilterHeader

* fix(Settings): Use `YTNode#is` to identify headers with a title

---------

Co-authored-by: LuanRT <luan.lrt4@gmail.com>
2024-01-08 20:37:06 -03:00
Luan
abd8a82cd0 chore(docs): Update auth documentation and examples (#568)
* chore(docs): Update auth documentation and examples

* chore(docs): Minor rewording

* chore(docs): Fix library version in the OAuth2 example
2024-01-08 20:16:16 -03:00
Luan
7ffd0fc25e feat(OAuth): Allow passing custom client identity (#566) 2024-01-08 20:03:01 -03:00
github-actions[bot]
b50408fc1c chore(main): release 8.1.0 (#548)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-26 23:24:27 -03:00
Brahim Hadriche
9618f38fe1 fear(parser): Add DecoratedAvatarView (#544)
* Add DecoratedAvatarView

* Export the class

* Update PageHeaderView

* Adjust thumbnails

* Add avatar view

* Apply suggestions from code review

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2023-12-26 23:21:37 -03:00
LuanRT
e7efec2cf4 Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2023-12-26 23:17:19 -03:00
LuanRT
82d5d1e3e1 chore: Fix import formatting in multiple files 2023-12-26 23:16:45 -03:00
LuanRT
9c503f4fa8 fix(VideoInfo): Restore like, dislike & removeRating methods 2023-12-26 23:15:31 -03:00
RenautMestdagh
4dd977e375 Update interaction-manager.md (#562) 2023-12-26 21:36:55 -03:00
Daniel Wykerd
e4f2a00c84 feat(generator): add support for arrays (#556)
* feat(generator): add support for arrays

* fix(parser): add overload for non array validTypes

Add Parser#parse overload to support non array validTypes.

Fixes issue in generator generating invalid Parser#parse calls
introduced in #551.
2023-12-21 19:02:44 -03:00
absidue
fcd3044982 feat(parser): Support new like and dislike nodes (#557) 2023-12-21 19:02:19 -03:00
Brahim Hadriche
14578ac96a feat(YouTube): Add FEchannels feed (#560) 2023-12-21 19:00:31 -03:00
absidue
5c83e999df fix(Format): Extract correct audio language from captions (#553) 2023-12-07 08:46:05 -03:00
LuanRT
4e67240ff9 chore(FeedNudge): Add Text import 2023-12-04 15:51:09 -03:00
absidue
f938c34ee8 feat(generator): Add support for generating view models (#550) 2023-12-04 15:46:09 -03:00
absidue
bd487f8bef fix(generator): Output Parser.parseItem() calls with one valid type, without the array (#551) 2023-12-04 15:45:38 -03:00
absidue
48a5d4e7c3 feat(Thumbnail): Support sources in Thumbnail.fromResponse (#552) 2023-12-04 13:50:08 -03:00
absidue
37ae55a7c3 chore(protobuf): Commit generated files missing from #512 (#549)
Co-authored-by: Konstantin <duell10111@t-online.de>
2023-12-02 11:35:05 -03:00
LuanRT
923232de07 chore(PlayerConfig): Add default value to some fields 2023-12-01 17:56:25 -03:00
LuanRT
a1c3ef8fbb Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2023-12-01 17:15:07 -03:00
LuanRT
5c9c231cc2 feat(MediaInfo): Parse player config 2023-12-01 17:14:36 -03:00
github-actions[bot]
572e16c541 chore(main): release 8.0.0 (#530)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-01 00:54:29 -03:00
LuanRT
ed2cbf8a13 chore: lint 2023-12-01 00:50:26 -03:00
LuanRT
4261915fd4 fix(Library)!: Add support for the new layout and remove profile & stats info 2023-12-01 00:49:22 -03:00
LuanRT
f74ed5a1cf fix(StructuredDescriptionContent): Add ReelShelf to list of possible nodes 2023-11-30 23:36:32 -03:00
LuanRT
5ae15be63d fix(VideoAttributeView): Fix image and overflow_menu_on_tap props 2023-11-30 23:34:31 -03:00
Konstantin
a32aa8c633 feat: Add Shorts endpoint (#512)
* chore: first try for shorts endpoints

* chore: add shorts to index

* fix: fix code style

* chore: fix suggestions

* fix: fix code style with spaces on curly brackets

* chore: add curly rule to eslint

* chore: run request in parallel

* chore: remove console.logs and add other expect tests

* chore: apply eslint suggestions

* Update ReelPlayerOverlay.ts

* Update VideoInfo.ts

* chore: remove console.log from tests

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
Co-authored-by: LuanRT <luan.lrt4@gmail.com>
2023-11-30 22:58:11 -03:00
absidue
4806fc6c11 feat(toDash): Add contentType to audio and video adaption sets (#539) 2023-11-30 22:33:13 -03:00
absidue
95ed60207a perf: Use named Parser import, to allow bundlers to create direct function references (#535)
Co-authored-by: Luan <luan.lrt4@gmail.com>
2023-11-30 22:31:59 -03:00
absidue
b50e2001aa chore: Clean up so unneeded private properties (#540) 2023-11-30 22:21:14 -03:00
absidue
b60930a0c1 feat(parser): Add ChannelOwnerEmptyState (#541) 2023-11-30 22:12:11 -03:00
absidue
c66eb1fecf feat(Channel): Support new about popup (#537)
* feat(Channel): Support new about popup

* chore: Minor cleanup

* fix(concatMemos): Merge duplicate nodes instead of overwriting

* fix(Feed): `has_continuation` and `getContinuation()` avoid header continuations

* chore(Channel): Remove unused import

---------

Co-authored-by: LuanRT <luan.lrt4@gmail.com>
2023-11-30 22:06:25 -03:00
absidue
6a5a579e39 fix(Channel)!: Remove getChannels() and has_channels, as YouTube removed the tab (#542)
BREAKING CHANGE: YouTube removed the "Channels" tab on channels, so this
pull request removes the `getChannels()` method and `has_channels`
getter from the `YT.Channel` class, as they are no longer useful. The
featured channels are now shown on the channel home tab. To get them
you can use the `channels` getter on the home tab of the channel.
Please note that some channel owners might not have added that section
to their home page yet, so you won't be able to get the featured
channels for those channels. The home tab is the default tab that is
returned when you call `InnerTube#getChannel()`, you can also access
that tab by calling `getHome()` on a `YT.Channel` object.
2023-11-30 22:03:36 -03:00
JellyBrick
ff4ab1680e feat: add VideoAttributeView (#531)
* feat: add `VideoAttributeView`

* fix: remove `logging_directives`

See https://github.com/LuanRT/YouTube.js/pull/531#discussion_r1375315550

* fix: Update src/parser/classes/VideoAttributeView.ts

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
Co-authored-by: Luan <luan.lrt4@gmail.com>
2023-11-30 21:38:51 -03:00
JellyBrick
9007b65237 feat(Parser): Add ClipSection (#532)
* feat: add `ClipSection`

* fix: Update src/parser/classes/ClipCreation.ts

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2023-11-30 21:29:18 -03:00
JellyBrick
e02139532b feat: add FeedNudge (#533)
* feat: add `FeedNudge`

see https://github.com/LuanRT/YouTube.js/actions/runs/6679090140/job/18150827068?pr=532

* fix: lint

* fix: update parser-map
2023-10-29 09:51:25 -03:00
JellyBrick
db7f6209b2 feat: Use overrides instead of --legacy-peer-deps (#529) 2023-10-28 16:32:39 -03:00
github-actions[bot]
312c636ec4 chore(main): release 7.0.0 (#528)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-28 15:21:53 -03:00
Azarattum
4c0de199e8 fix(build): Inline package.json import to avoid runtime erros (#509)
* chore(main): Inline package.json import

* chore: add `--legacy-peer-deps` flag to ci

* chore: update lock file

---------

Co-authored-by: LuanRT <luan.lrt4@gmail.com>
2023-10-28 15:19:37 -03:00
Ryan Sandbach
9ab528ec82 feat(Kids): Add blockChannel command to easily block channels (#503)
* Add blockChannel command to support easily blocking content for supervised accounts.

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

* Fix whitepsace issues.

* Resolve remaining linting errors.

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

* chore: clean up

---------

Co-authored-by: LuanRT <luan.lrt4@gmail.com>
2023-10-28 14:28:17 -03:00
LuanRT
24ffb01aef Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2023-10-28 13:31:10 -03:00
LuanRT
eaac38c919 chore: lint 2023-10-28 13:30:58 -03:00
absidue
e627887fe0 chore(MediaInfo): Throw helpful errors when calling toDash or download for live and Post-Live DVR videos (#526)
* Address pull request feedback

---------

Co-authored-by: LuanRT <luan.lrt4@gmail.com>
2023-10-28 13:29:37 -03:00
LuanRT
beaa28f4c6 feat(music#getSearchSuggestions)!: Return array of SearchSuggestionsSection instead of a single node 2023-10-28 13:27:58 -03:00
LuanRT
a45273fec4 feat(parser): Add PlayerOverflow and PlayerControlsOverlay 2023-10-28 13:17:26 -03:00
absidue
bc97e07ac6 feat(UpdateViewerShipAction): Add original_view_count and unlabeled_view_count_value (#527) 2023-10-21 12:39:03 -03:00
LuanRT
f35b4c2c8c Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2023-10-18 23:32:01 -03:00
LuanRT
c934325648 chore: update readme [skip ci] 2023-10-18 23:31:03 -03:00
dependabot[bot]
cd27acd25b chore(deps-dev): bump @babel/traverse from 7.22.10 to 7.23.2 (#524)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.10 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 22:55:44 -03:00
dependabot[bot]
83b42d2585 chore(deps): bump undici from 5.23.0 to 5.26.2 (#523)
Bumps [undici](https://github.com/nodejs/undici) from 5.23.0 to 5.26.2.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.23.0...v5.26.2)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 17:36:00 -03:00
github-actions[bot]
e54c0c4bf1 chore(main): release 6.4.1 (#507)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-02 00:04:10 -03:00
LuanRT
8e372d5c67 fix(Feed): Do not throw when multiple continuations are present 2023-10-01 23:39:54 -03:00
LuanRT
987f50604a fix(Playlist): Throw a more helpful error when parsing empty responses 2023-10-01 23:31:05 -03:00
Luan
69702085c6 refactor: Move transcript logic to MediaInfo (#511)
* refactor: Move transcript logic to `MediaInfo`

+ Add support for retrieving different languages.

* docs: Update and add examples
2023-09-17 22:17:14 -03:00
absidue
d2959b3a55 perf: Cache deciphered n-params by info response (#505) 2023-09-17 18:52:32 -03:00
absidue
68df321858 perf(generator): Remove duplicate checks in isMiscType (#506) 2023-09-15 15:25:08 -03:00
Ryan Sandbach
f4bc8508d0 chore(docs): Minor update (#502)
* Updated documentation example to matche syntax of existing parsers.

* Changed from require since package is setup as module.
2023-09-12 03:49:36 -03:00
LuanRT
e216124bb0 chore: update docs 2023-09-10 02:14:14 -03:00
github-actions[bot]
6d98abbd53 chore(main): release 6.4.0 (#499)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-10 02:08:24 -03:00
LuanRT
fba3fc9714 fix(BackstagePost): vote_button type mismatch 2023-09-10 02:06:01 -03:00
Luan
f94ea6cf91 feat: Add support for retrieving transcripts (#500)
* feat: Add support for retrieving transcripts

* chore: lint

* chore: update docs

* chore: Do not include nodes in errors thrown

* chore: Improve error messages

* fix(ExpandableMetadata): `expanded_content` type mismatch

* chore: lint
2023-09-10 01:50:30 -03:00
Jeremy Banks
86fb33ed03 feat(PlaylistManager): add .setName() and .setDescription() functions for editing playlists (#498) 2023-09-01 17:40:25 -03:00
github-actions[bot]
bff4210349 chore(main): release 6.3.0 (#495)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-31 20:41:06 -03:00
absidue
91de6e5c0e feat(ChannelMetadata): Add music_artist_name (#497) 2023-08-31 20:29:58 -03:00
absidue
c26972c42a fix(CompactMovie): Add missing import and remove unnecessary console.log (#496) 2023-08-31 20:28:25 -03:00
Jeremy Banks
8bc2aaa358 feat(Session): Add on_behalf_of_user session option. (#494)
This specifies which channel to use if multiple are associated with the logged-in account.
2023-08-31 08:20:37 -03:00
github-actions[bot]
2e5f076fd7 chore(main): release 6.2.0 (#491)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-29 14:25:32 -03:00
absidue
0412fa05ff fix(Format): Fix is_original always being true (#492) 2023-08-29 14:23:08 -03:00
Luan
10c15bfb9f feat(Session): Add fallback for session data retrieval (#490)
* feat(Session): Add fallback for session data retrieval

Should have added this when we first implemented session data retrieval to be honest. It makes a request to YouTube's service worker and the data there can change or the request can just fail.

* chore: lint
2023-08-28 07:18:27 -03:00
github-actions[bot]
4862c35cee chore(main): release 6.1.0 (#489)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-27 16:43:10 -03:00
absidue
2eed1726d5 feat(parser): Add CompactMovie (#487) 2023-08-27 16:29:50 -03:00
absidue
8b69587787 feat(parser): Add AlertWithButton (#486) 2023-08-27 16:29:23 -03:00
absidue
ed7be2a675 feat(parser): Add ChannelHeaderLinksView (#484) 2023-08-27 16:28:49 -03:00
github-actions[bot]
361fb4a9f1 chore(main): release 6.0.2 (#481)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-24 17:06:07 -03:00
Daniel Wykerd
1c3ea2acd3 fix: invalid set ids in dash manifest (#480) 2023-08-24 15:59:10 -03:00
github-actions[bot]
859c4585d9 chore(main): release 6.0.1 (#476)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-22 09:07:49 -03:00
LuanRT
751f2b90fd Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2023-08-22 09:06:23 -03:00
LuanRT
90be877d28 fix(SearchSubMenu): Groups not being parsed due to a typo 2023-08-22 09:06:06 -03:00
github-actions[bot]
052632314b chore(main): release 6.0.0 (#461)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-18 08:39:05 -03:00
LuanRT
22a38c0762 feat(Session): Add IOS to ClientType enum 2023-08-18 08:36:17 -03:00
LuanRT
f7614634b6 chore: lint 2023-08-18 08:26:39 -03:00
LuanRT
bf1510b235 fix(parser): Logger logging classdata as [Object object] 2023-08-18 08:17:23 -03:00
LuanRT
815e54b854 feat(MusicResponsiveListItem): Detect non music tracks properly
This should make it easier to identify podcast episodes.
2023-08-18 08:15:04 -03:00
LuanRT
f7666051f6 chore(parser): update MusicCarouselShelf 2023-08-18 08:11:04 -03:00
LuanRT
494ee8776a feat(parser): add MusicMultiRowListItem
Used to display podcasts.
2023-08-18 08:09:04 -03:00
Daniel Wykerd
87ed3960ff refactor!: replace unnecessary classes with pure functions (#468)
* deps: update linkedom

* refactor!: remove YTNodeGenerator in favour of namespaced pure functions

BREAKING CHANGES:
- Removes `YTNodeGenerator` from `import('youtubei.js').Generator` and exposes its functions directly in `import('youtubei.js').Generator`

* refactor!: replace Parser class with pure functions

- Remove Parser class in favour of pure functions
- Merge duplicate classes `AppendContinuationItemsAction` into a single class
- Move continuation parsers into a seperate file
- Add better custom logging support to parser methods as per issue #460

* refactor!: replace Proto class with pure functions

* chore: update package-lock.json

* refactor!: replace FormatUtils with pure functions and JSX components

- Replace linkedom DASH manifest generation with a dependency free JSX implementation
- Remove FormatUtils class in favour of pure functions
- Remove DOMParser requirement
- Remove duplicate types

* refactor: implement changes from #462

* chore: lint

* fix: deno support

* fix: render valid xml document

* fix: wrong function call in DashUtils

* fix: typo in parser

Co-authored-by: LuanRT <luan.lrt4@gmail.com>

* refactor!: move streaming info logic into seperate function

This allows users to access the same data available in the dash manifest while also simplifying the manifest generation

* chore: lint

* refactor: readability improvements & fixes

Remove redundant getAudioTrackGroups
General readability improvements in StreamingInfo.ts
Share response object between `getBitrate` and `getMimeType` as to not make duplicate requests

* build: remove unnecessary step in deno build

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>

* refactor: move types to `types` directory

* docs: add back comments lost during refactor

* chore: lint

---------

Co-authored-by: LuanRT <luan.lrt4@gmail.com>
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2023-08-18 06:49:58 -03:00
LuanRT
eb3cca1e2e chore(example/browser): fix ALR requests failing 2023-08-18 06:33:01 -03:00
LuanRT
9971ffe021 chore: update package.json [skip ci] 2023-08-12 23:52:16 -03:00
LuanRT
7949b3df66 chore(COLLABORATORS.md): add Absidue 2023-08-12 23:50:27 -03:00
LuanRT
aa385142e4 chore: update contact email [skip ci] 2023-08-12 23:45:28 -03:00
LuanRT
6c8a916f0f chore: migrate browser example to Shaka player [skip ci] (#471)
* chore: use Shaka for the browser example

* chore: lint

* fix(HashtagFeed): resolve type casting issue so tests pass
2023-08-12 23:21:20 -03:00
absidue
31d27b1bca fix(Format): Extracting audio language from captions (#470) 2023-08-12 16:01:32 -03:00
LuanRT
cb37c6a17b chore: use ESM for dev scripts [skip ci]
Just to keep things consistent.
2023-08-11 19:29:51 -03:00
absidue
1ff3e1a440 fix(toDash): Format grouping into AdaptationSets (#462) 2023-08-09 16:07:03 -03:00
Ronnie Vega
46fe18b763 feat(VideoInfo): support iOS client (#467) 2023-08-09 04:29:25 -03:00
absidue
0dda97e0b0 perf: Cleanup some unnecessary uses of YTNode#key and Maybe (#463) 2023-08-06 19:15:47 -03:00
absidue
e370116092 fix(Playlist): Only try extracting the subtitle for the first page (#465) 2023-08-06 19:14:21 -03:00
LuanRT
3bc53a8c12 fix(parser): Allow any property in the RawResponse interface 2023-08-01 20:38:15 -03:00
github-actions[bot]
74e1a5e068 chore(main): release 5.8.0 (#459)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-30 16:02:19 -03:00
absidue
0fa5a859ae feat(YouTube Playlist): Add subtitle and fix author optionality (#458) 2023-07-30 15:59:39 -03:00
LuanRT
02a111250a chore: update image links 2023-07-28 07:12:45 -03:00
github-actions[bot]
c1886f9a83 chore(main): release 5.7.1 (#455)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-25 02:46:12 -03:00
LuanRT
5f4cbdb904 Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2023-07-25 02:45:00 -03:00
LuanRT
d91695a9ec fix(SearchHeader): remove console.log
Oopsie!
2023-07-25 02:44:43 -03:00
github-actions[bot]
137464ca66 chore(main): release 5.7.0 (#451)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-24 20:48:09 -03:00
LuanRT
6997982cf2 feat(parser): Add SearchHeader
We may want to remove the old SearchSubMenu node in the future but YouTube still uses it sometimes, so we will keep it for now.

Closes #452
2023-07-24 20:26:05 -03:00
absidue
18cbc8c038 feat(parser): Add PageHeader (#450) 2023-07-19 19:00:26 -03:00
github-actions[bot]
30ff087587 chore(main): release 5.6.0 (#448)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-18 15:34:48 -03:00
absidue
1a034733f6 feat(toDash): Add option to include thumbnails in the manifest (#446)
* feat(toDash): Add option to include thumbnails in the manifest

* refactor: Move toDash function back to MediaInfo class
2023-07-18 02:08:02 -03:00
ChunkyProgrammer
c477b824c0 feat(parser): Add IncludingResultsFor (#447) 2023-07-18 01:53:44 -03:00
github-actions[bot]
7e5c3648c1 chore(main): release 5.5.0 (#441)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-16 17:57:11 -03:00
absidue
bdd98a3b9b feat(Format): Populate audio language from captions when available (#445) 2023-07-16 17:54:26 -03:00
LuanRT
06750aaa74 chore: lint 2023-07-16 17:40:05 -03:00
LuanRT
708c5f7394 feat(parser): add MacroMarkersList (#444)
This should fix a few parsing issues that were happening after recent updates.
2023-07-16 17:38:16 -03:00
LuanRT
a9cdbf7010 feat(parser): Add ShowMiniplayerCommand (#443) 2023-07-16 17:34:42 -03:00
LuanRT
b50d1ef67d fix(StructuredDescriptionContent): items can also be a HorizontalCardList 2023-07-16 17:00:36 -03:00
LuanRT
555d257459 feat(parser): Add CommentsSimplebox parser (#442) 2023-07-16 16:46:46 -03:00
titong0
2aef67876e fix(package): Bump Jinter to fix bad export order (#439)
Version 1.0.0 has an export order which crashes some webpack environments (at least I came across it when using next.js 13). Updating to 1.1.0 fixes it. A bit more context here https://github.com/LuanRT/YouTube.js/issues/432

* chore(package): update lock file

* chore: lint

---------

Co-authored-by: LuanRT <luan.lrt4@gmail.com>
2023-07-16 16:23:14 -03:00
ChunkyProgrammer
ae2557d15c feat(parser): Add HashtagTile (#440) 2023-07-16 15:35:55 -03:00
github-actions[bot]
8c688efb4a chore(main): release 5.4.0 (#438)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-14 00:00:43 -03:00
ChunkyProgrammer
cffa868c6e feat(parser): Add Quiz (#437) 2023-07-13 23:57:39 -03:00
ChunkyProgrammer
f267fcd8be Add getReleases and getPodcasts to Channel (#436)
* feat(Channel): Add `getReleases` method

* feat(Channel): Add `getPodcasts` method

* Fix(Playlist): Parse `PlaylistCustomThumbnail`
2023-07-13 15:25:20 -03:00
github-actions[bot]
23c22a93c4 chore(main): release 5.3.0 (#433)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-11 15:48:51 -03:00
absidue
1ca20836bf perf(Format): Cleanup the xtags parsing (#434) 2023-07-11 15:45:42 -03:00
absidue
5f058e69ae perf(toDash): Hoist duplicates from Representation to AdaptationSet (#431) 2023-07-11 15:22:02 -03:00
absidue
3500e92632 feat(toDash): Add color information (#430) 2023-07-10 21:25:48 -03:00
LuanRT
3f57c2fa5c refactor(PlayerEndpoint.ts): send specific params only if using Android based clients 2023-07-10 21:23:10 -03:00
LuanRT
7528ebdb60 chore: fix YouTube Music tests failing 2023-07-10 21:17:06 -03:00
github-actions[bot]
5e3846259f chore(main): release 5.2.1 (#429)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-03 22:30:29 -03:00
LuanRT
222dfce6bb fix: incorrect node parser implementations (#428)
These were causing some issues in v5.2.0.
2023-07-03 21:58:00 -03:00
github-actions[bot]
83cbfd631b chore(main): release 5.2.0 (#406)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-28 17:13:36 -03:00
RikThePixel
4f9427d752 fix(Playlist): Add thumbnail_renderer on Playlist when response includes it (#424) 2023-06-28 17:12:06 -03:00
Patrick Kan
07c1b3e0e5 fix(OAuth): client identity matching (#421) 2023-06-28 16:26:33 -03:00
absidue
89548ad48a chore(constants): Update web client version (#420) 2023-06-28 06:56:57 -03:00
absidue
519be72445 fix(PlayerEndpoint): Use different player params (#419)
* fix(PlayerEndpoint): Use different player params

* fix(PlayerEndpoint): Use new throttling bypass player params
2023-06-28 06:56:21 -03:00
Emma
e434bb2632 fix(VideoInfo.ts): reimplement get music_tracks (#409)
* fix(VideoInfo.ts): reimplement `get music_tracks`

- Add parser classes to parse needed data
  - Add `CarouselLockup`
  - Add `EngagementPanelSectionList`
  - Add `InfoRow`
  - Add `StructuredDescriptionContent`
  - Add `VideoDescriptionMusicSection`
  - Add `VideoDescriptionHeader`
  - Add `Factoid`
  - Add `ExpandableVideoDescriptionBody`
  - Add `AdsEngagementPanelContent`
- Add `engagement_panels` to raw and parsed next responses
- Add `engagement_panels` parsing code to `parser.ts`

* Check for song inside of video_lockup first before checking info_rows

* Add support for pulling artist ids out of music_tracks

- Add support for WRITERS InfoRow
- Check for video id inside of naviagation endpoint on info_row metadata

* Add `AdsEngagementPanelContent` to ignore list

* Switch `map => parseItem` to `parseArray`

* Use `Text` && `NavigationEndpoint`

* Replace `String` with `Text` in `ExpandableVideoDescriptionBody`
2023-06-28 06:54:55 -03:00
absidue
a11e5962c6 feat(VideoDetails): Add is_post_live_dvr property (#411) 2023-05-31 19:12:19 -03:00
Jake Reid Browning
77b39c79ee feat(ytmusic): Add support for YouTube Music mood filters (#404)
* add filters property to ytmusic HomeFeed

* remove implied type

* add applyFilter to HomeFeed

* add test

* remove section_list var
2023-05-23 15:00:05 -03:00
absidue
7c530d30ee chore(parser): Remove extra Array.from call (#407) 2023-05-20 18:00:15 -03:00
absidue
1e07a184ff perf(Search): Speed up results parsing (#408) 2023-05-20 17:57:48 -03:00
absidue
5de7b24dc5 perf(toDash): Speed up format filtering (#405) 2023-05-18 14:41:21 -03:00
github-actions[bot]
01fd1ee72a chore(main): release 5.1.0 (#403)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-14 01:12:16 -03:00
absidue
84b4f1efd1 feat(toDash): Add audio track labels to the manifest when available (#402) 2023-05-14 01:11:02 -03:00
absidue
046103a4d8 feat(ReelItem): Add accessibility label (#401) 2023-05-14 01:09:51 -03:00
github-actions[bot]
beb4733e84 chore(main): release 5.0.4 (#399)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-10 15:35:11 -03:00
absidue
66b026bf49 fix(Utils): Circular dependency introduced in 38a83c3c2a (#400) 2023-05-10 15:32:00 -03:00
absidue
26734194ab fix(bundles): Use ESM tslib build for the browser bundles (#397) 2023-05-06 15:54:18 -03:00
absidue
38a83c3c2a fix(Utils): Use instanceof in deepCompare instead of the constructor name (#398) 2023-05-06 15:47:51 -03:00
absidue
b1f19f16ac refactor(constants): Use namespace import internally (#396) 2023-05-06 15:46:20 -03:00
github-actions[bot]
891d889408 chore(main): release 5.0.3 (#395)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-03 19:47:01 -03:00
LuanRT
d4adb9eb6b chore(PlayerEndpoint.ts): add back attestationRequest field
This was accidentally removed in a recent PR. It tells InnerTube to omit the botguard program data.
2023-05-03 19:31:59 -03:00
LuanRT
3b0498b68b fix(Video): typo causing node parsing to fail 2023-05-02 03:21:02 -03:00
github-actions[bot]
154a5d2868 chore(main): release 5.0.2 (#394)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-30 17:24:14 -03:00
absidue
7c0abfccd7 fix(VideoInfo): Use microformat view_count when videoDetails view_count is NaN (#393) 2023-04-30 17:21:57 -03:00
github-actions[bot]
8f50c668aa chore(main): release 5.0.1 (#392)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-30 00:51:44 -03:00
LuanRT
4f7ec07c3f fix(web): slow downloads due to visitor data (#391)
* fix(web): slow downloads due to visitor data

It seems that YouTube will throttle clients if a shared visitor id is used.

* dev: include `params` for `/player` reqs
2023-04-30 00:50:08 -03:00
github-actions[bot]
ab3d5ab16c chore(main): release 5.0.0 (#389)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-29 02:14:26 -03:00
LuanRT
dd21f8c75a feat(NavigationEndpoint): parse content prop
This usually has dialog nodes.
2023-04-29 01:54:34 -03:00
LuanRT
3a7e58d2b9 chore(eslint): enforce the use of import type 2023-04-28 22:35:09 -03:00
LuanRT
75ea09dde8 fix(android): workaround streaming URLs returning 403 (#390) 2023-04-28 22:02:45 -03:00
LuanRT
95e0294eab refactor!: overhaul core classes and remove redundant code (#388)
* feat(Player.ts): append `cver` to deciphered URLs

* refactor(Actions.ts): remove redundant `getVideoInfo` function

This is leftover code from previous versions. It had many problems and it is no longer required.

* fix(Kids.ts): remove unneeded `await` keywords

* dev: add more endpoints

* chore: update deps

* refactor: separate endpoints into files

* dev: improve types

* dev: add more endpoints

* refactor: put clients in a separate directory inside `core`

* chore: lint

* refactor: move mixins and managers to separate folders

* chore: fix tests

* dev: add `CreateVideoEndpoint`

* chore: clean up

* chore: lint

* chore: add some comments

* chore: remove unnecessary test

* dev: add `playlist/CreateEndpoint`

* dev: add `playlist/DeleteEndpoint`

* dev: add `browse/EditPlaylistEndpoint`

* fix(parser): add a few checks to avoid parsing errors
2023-04-28 19:01:04 -03:00
LuanRT
22ae6c93ee chore(contributing.md): reword 2023-04-23 06:41:02 -03:00
LuanRT
257bd475a0 refactor: clean up parser and tests (#387)
* tests: improve coverage

* refactor: clean up nodes

* chore: lint

* feat(parser): ignore `BrandVideoShelf`

Seems to be used for ads.

* feat(parser): ignore `BrandVideoSingleton` too
2023-04-23 06:37:33 -03:00
github-actions[bot]
f66f0bd656 chore(main): release 4.3.0 (#384)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-13 07:52:42 -03:00
LuanRT
05de3ec97a feat(GridVideo): add upcoming, upcoming_text, is_reminder_set and buttons
Closes: #380
2023-04-13 07:50:18 -03:00
LuanRT
a0566969ba feat(ToggleMenuServiceItem): parse default nav endpoint 2023-04-13 06:10:17 -03:00
LuanRT
a9cad49333 feat(ytmusic): add taste builder nodes (#383)
Adds MusicTastebuilderShelf and MusicTastebuilderShelfThumbnail. These usually appear on new accounts.
2023-04-13 05:37:49 -03:00
LuanRT
096bf362c9 feat(MusicResponsiveListItem): make flex/fixed cols public (#382)
Plus refactor a few things.
2023-04-13 05:35:46 -03:00
LuanRT
ec9c0979f5 refactor: fix inconsistencies in the guide nodes (#379) 2023-04-11 05:52:47 -03:00
LuanRT
342d1d95e9 chore: fix readme formatting [skip ci] 2023-04-11 05:06:03 -03:00
github-actions[bot]
dbfc569602 chore(main): release 4.2.0 (#377)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-09 03:40:01 -03:00
LuanRT
c16a967987 chore(docs): minor improvements 2023-04-09 03:38:09 -03:00
LuanRT
a07375eb20 chore(docs): rewording [skip ci] 2023-04-09 03:02:23 -03:00
LuanRT
ce9d9c56b4 feat(parser): ignore PrimetimePromo node
This node is used to display advertisements.
2023-04-09 02:51:29 -03:00
LuanRT
f50ce1a06b chore: simplify Pull Request template 2023-04-09 02:43:19 -03:00
LuanRT
3b6ccfa3d8 chore: fix cjs build 2023-04-09 02:18:53 -03:00
LuanRT
878488d1b3 chore: clean up README.md 2023-04-09 01:20:27 -03:00
LuanRT
3c94c9da4b deps: bump Jinter to v1.0.0 2023-04-08 23:53:59 -03:00
absidue
0b301de6a1 feat: Enable importHelpers in tsconfig to reduce output size (#378) 2023-04-08 20:19:20 -03:00
absidue
c9135e66d3 feat(PlaylistVideo): Extract video_info and accessibility_label texts (#376) 2023-04-07 20:43:20 -03:00
github-actions[bot]
e82c843928 chore(main): release 4.1.1 (#374)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-28 22:29:08 -03:00
LuanRT
be71d7c937 chore: fix some inconsistencies 2023-03-28 21:22:12 -03:00
LuanRT
470d8d9406 fix(PlayerCaptionsTracklist): parse props only if they exist in the node
Fixes #372
2023-03-28 20:50:50 -03:00
absidue
2c5907f80f fix(Search): Return search results even if there are ads (#373) 2023-03-27 15:00:57 -03:00
github-actions[bot]
ade5feb31c chore(main): release 4.1.0 (#362)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-24 01:34:29 -03:00
LuanRT
13ebf0a039 feat(Session): allow setting a custom visitor data token (#371)
* feat(Session): allow setting a custom visitor data token

* docs: update init options

* chore: lint
2023-03-24 01:30:24 -03:00
Araxeus
cb8fafe94b fix(http): android tv http client missing clientName (#370) 2023-03-22 19:45:37 -03:00
absidue
bd35faa597 fix(parser): Make Video.is_live work on channel pages (#368) 2023-03-22 18:02:21 -03:00
absidue
a8b507ee65 fix(toDash): Generate unique Representation ids (#366) 2023-03-22 17:48:09 -03:00
Araxeus
e7eacd9742 fix(node) Electron apps crashing (#367)
Inside a `app.asar` file, the package.json might get trimmed and the `bugs_url` might be missing

`repo_url` conditional check was added for good measure

* fix(node) resolve `bugs_url` from repo_url
2023-03-22 17:13:40 -03:00
absidue
1c72a41675 fix(Utils): Properly parse timestamps with thousands separators (#363) 2023-03-22 03:48:01 -03:00
LuanRT
62a68b207c chore(docs): fix typo 2023-03-17 18:19:10 -03:00
LuanRT
1d9587e8c1 feat(ShowingResultsFor): parse all props 2023-03-17 07:27:00 -03:00
github-actions[bot]
a90e5e0d07 chore(main): release 4.0.1 (#360)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-16 04:55:10 -03:00
LuanRT
955c8010a6 chore: lint 2023-03-16 04:53:48 -03:00
LuanRT
b2269deb79 chore: add Button type
Oops :D
2023-03-16 04:52:07 -03:00
LuanRT
573c8643aa fix(Channel): type mismatch in subscribe_button prop
The `subscribe_button` property can also be of type `Button`.
2023-03-16 04:48:59 -03:00
github-actions[bot]
e21542c227 chore(main): release 4.0.0 (#353)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-15 21:08:37 -03:00
LuanRT
9d912e5938 refactor: use getters instead of props in the Innertube class 2023-03-15 20:34:58 -03:00
LuanRT
7ca0607004 refactor(ytmusic): rename SearchFilters interface to MusicSearchFilters
This allows us to expose the types from the InnerTube class as there is another interface there named `SearchFilters`
2023-03-15 19:24:17 -03:00
LuanRT
20d84265b5 chore(docs): minor improvements 2023-03-15 18:50:34 -03:00
Daniel Wykerd
b13bf6e992 refactor(Parser)!: general refactoring of parsers (#344)
* refactor: move common info into MediaInfo

* refactor: better inference on Memo

* refactor: improved typesafety in parser methods

* refactor: remove PlaylistAuthor in favor of Author

* refactor: cleanup live chat parsers

- Replace non standard author type with Author class
- Remove redundant code

* fix: new errors due to changes

* fix: pass actions to FormatUtils#toDash

* refactor!: merge NavigatableText and Text into single class
2023-03-15 18:25:12 -03:00
LuanRT
3d3436472f refactor(parser): fix many minor inconsistencies 2023-03-15 06:43:04 -03:00
LuanRT
1a2fc3abd7 chore(docs): add documentation for search filters 2023-03-15 05:35:00 -03:00
LuanRT
8ef4b42d44 feat(parser): add GridShow and ShowCustomThumbnail
Closes #459
2023-03-15 05:15:16 -03:00
LuanRT
b71f03caf2 chore(docs): oops, fix a typo 2023-03-15 04:15:35 -03:00
LuanRT
dae7d6e40c chore: update parser docs to reflect latest changes 2023-03-15 04:12:21 -03:00
Daniel Wykerd
2cee59024c feat(Parser): just-in-time YTNode generation (#310)
* refactor: merge NavigatableText into Text

* fix(Text): data might not be object

* refactor: remove GetParserByName from map

* feat(Parser): just-in-time YTNode generation

* refactor: cleanup YTNodeGenerator

* fix: YTNode map imports

* feat(YTNodeGenerator): primative types

Add support for inferring primatives types

* fix(YTNodeGenerator): NavigationEndpoint detection

* fix(YTNodeGenerator): fix generated typescript

Correct types and linting for generated typescript class

* chore: update parsers after merge

* feat: add support for object type inference

* fix: object type def

* docs: basic YTNodeGenerator explanation

* docs: tsdoc for YTNodeGenerator

* docs: update parser updating guide

* fix: apply suggested changes

* docs: accessing generated nodes
2023-03-15 03:39:36 -03:00
absidue
ffd7d79308 refactor(shim): Move node CustomEvent polyfill to Platform.shim (#357) 2023-03-15 00:49:33 -03:00
LuanRT
9b005d62d6 feat(parser): add MusicCardShelf (#358) 2023-03-14 20:16:31 -03:00
Patrick Kan
a8e7e644ec feat(parser): add GridMix (#356) 2023-03-14 06:19:22 -03:00
LuanRT
ad1d3dbf91 chore(docs): overhaul parser documentation
[skip ci]
2023-03-14 05:57:37 -03:00
LuanRT
3df3261488 chore(docs): improve contributing guidelines 2023-03-14 05:56:01 -03:00
LuanRT
1b1ce41c00 chore: overhaul documentation
Fix typos, add missing docs, rephrase some things and add a `COLLABORATORS.md`

[skip ci]
2023-03-13 07:08:26 -03:00
LuanRT
b82b720e4b docs: update browser example [skip ci] 2023-03-13 01:40:25 -03:00
LuanRT
4784dfa563 feat(parser): add InfoPanelContent and InfoPanelContainer nodes
These are usually used to add more context to videos that discuss misinformation.

Fixes: #326
2023-03-13 01:04:03 -03:00
absidue
3e4d41bf06 feat!: Add support for OTF format streams (#351) 2023-03-12 23:48:58 -03:00
Patrick Kan
9f1c31d7a0 feat(yt): add support for movie items and trailers (#349) 2023-03-12 18:15:21 -03:00
Patrick Kan
9cb4530299 feat(parser): add view_playlist to Playlist (#348) 2023-03-12 18:10:48 -03:00
Patrick Kan
cb9a0c5410 Add status to SearchFilter and fix endpoint (#347)
* feat(parser): add `status` to `SearchFilter`

* fix(parser): `SearchFilter` endpoint parsing
2023-03-12 18:07:59 -03:00
Patrick Kan
427db5bbc2 feat(parser): Add play_all_button to Shelf (#345) 2023-03-12 18:04:35 -03:00
github-actions[bot]
2b29244b41 chore(main): release 3.3.0 (#343)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-09 01:24:26 -03:00
LuanRT
f9754f5ac6 fix(ytmusic): use static visitor id to avoid empty API responses
Fixes #279
2023-03-09 01:21:13 -03:00
LuanRT
b2253df802 feat(parser): add ConversationBar node 2023-03-08 18:09:21 -03:00
LuanRT
f3517708ff fix(MultiMarkersPlayerBar): avoid observing undefined objects 2023-03-08 17:43:20 -03:00
Patrick Kan
0d35fe0ca5 feat(VideoInfo): support get by endpoint + more info (#342)
* feat(VideoInfo): get by endpoint + more info

* chore: fix param description for `getInfo()`
2023-03-08 16:42:41 -03:00
LuanRT
3e3dc351bb fix(SharedPost): import Menu node directly (oops) 2023-03-08 11:29:39 -03:00
github-actions[bot]
197bb759cd chore(main): release 3.2.0 (#334)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-08 07:20:21 -03:00
LuanRT
c76b24b3f4 chore(parser): import YTNodes directly to reduce web bundle size 2023-03-08 07:18:01 -03:00
absidue
574b67a1f7 feat: Add support for descriptive audio tracks (#338) 2023-03-08 05:36:01 -03:00
LuanRT
9b2738f128 fix(SegmentedLikeDislikeButton): like/dislike buttons can also be a simple Button 2023-03-07 05:43:32 -03:00
LuanRT
95f1d4077f fix(YouTube): fix warnings when retrieving members-only content (#341) 2023-03-07 05:15:46 -03:00
LuanRT
a511608f18 feat(YouTube/Search): add SearchSubMenu node (#340) 2023-03-07 04:17:58 -03:00
LuanRT
cf8a33c79f fix(ytmusic): export search filters type 2023-03-07 03:02:44 -03:00
Chinmay Kumar
cfc1a183e0 refactor(parser): type YTNodes' data arg as RawNode (wip) (#339)
* replaced YTNode's data arg as RawNode

* updated documentation

* removed unused import

---- Note that there are still many nodes that need to be updated, hence the WIP status.
2023-03-07 02:02:07 -03:00
Patrick Kan
95033e723e feat(parser): add banner to PlaylistHeader (#337) 2023-03-05 22:44:09 -03:00
Patrick Kan
2cc7b8bcd6 feat(yt): add getGuide() (#335)
* feat(yt): add `getGuide()`

* chore: lint

* fix(Guide): wrong prop

* fix(Guide): include subscription section

* fix(Guide): wrong import

* feat(Guide): add `page`
2023-03-04 06:23:17 -03:00
LuanRT
2d774e26aa feat: export FormatUtils' types 2023-03-04 04:06:19 -03:00
Nico K
214aa147ce feat(VideoInfo): add game_info and category (#333) 2023-03-03 03:47:20 -03:00
Daniel Wykerd
ce53ac1843 feat(parser): SharedPost (#332)
Add support for SharedPost in community tab.
Related to issue #331
2023-03-03 03:41:04 -03:00
github-actions[bot]
0ad26f28d9 chore(main): release 3.1.1 (#330)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-01 16:30:10 -03:00
ChunkyProgrammer
4c7b8a3403 fix(Channel): getting community continuations (#329) 2023-03-01 16:28:26 -03:00
github-actions[bot]
33a6e740d7 chore(main): release 3.1.0 (#318)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-26 20:35:20 -03:00
LuanRT
0b1840a62c chore(docs): update examples to reflect recent changes [skip ci] 2023-02-26 20:28:16 -03:00
LuanRT
f4e0f30e6e fix: send correct UA for Android requests
Related: #322
2023-02-26 19:21:41 -03:00
LuanRT
200632f374 fix(parser): export YTNodes individually so they can be used as types
Related: #321
2023-02-26 18:56:04 -03:00
LuanRT
f933cb45bc feat(VideoSecondaryInfo): add support for attributed descriptions (#325) 2023-02-26 16:47:47 -03:00
absidue
a0e6cef00f fix(PlayerMicroformat): Make the embed field optional (#320) 2023-02-25 12:11:03 -03:00
absidue
a0bfe16427 feat: Add upcoming and live info to playlist videos (#317) 2023-02-20 18:25:53 -03:00
Daniel Wykerd
9d352b58eb docs: update imports for platforms (#315)
* docs: fix browser import

* docs: add deno.land instructions

As mentioned in issue #314
2023-02-17 14:53:06 -03:00
github-actions[bot]
6b6c80ddf1 chore(main): release 3.0.0 (#309)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-17 01:22:53 -03:00
LuanRT
58a6c84121 style: lint and format 2023-02-16 23:10:23 -03:00
LuanRT
63b1261b7c deps: bump Jinter to 0.4.1 2023-02-16 23:09:40 -03:00
dependabot[bot]
d2eff3bfb8 build(deps): bump undici from 5.14.0 to 5.19.1 (#313)
Bumps [undici](https://github.com/nodejs/undici) from 5.14.0 to 5.19.1.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.14.0...v5.19.1)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-16 21:49:49 -03:00
LuanRT
b668ba8cfb style(docs): rephrase some things 2023-02-16 19:38:48 -03:00
LuanRT
0b88575614 docs(browser): add ytjsexample.pages.dev live example 2023-02-16 19:32:24 -03:00
LuanRT
bed0ff4154 docs(readme): fix formatting 2023-02-16 19:05:42 -03:00
LuanRT
27a50a2a7e docs: add documentation for Feed, FilterableFeed and TabbedFeed 2023-02-16 18:38:10 -03:00
LuanRT
d4f2d704bb build: update package description 2023-02-16 17:03:17 -03:00
LuanRT
97f181b212 docs: update browser example 2023-02-16 07:50:02 -03:00
LuanRT
251ed74bba chore(ChannelAgeGate): fix node type
channelAgeGate ---> ChannelAgeGate
2023-02-16 07:15:52 -03:00
LuanRT
1cdf701c84 feat(parser): add ChannelAgeGate node 2023-02-16 07:07:34 -03:00
LuanRT
bf12740333 feat: add support for hashtag feeds (#312)
* feat: add hashtag params proto

* feat: add support for hashtags

* chore: add test

* docs: update API ref

* fix(tests): remove unneeded `#` from param

* fix: do not throw when missing the header
2023-02-16 06:46:20 -03:00
LuanRT
0d77b59945 chore: make browser example more complete
See: https://ytjsexample.pages.dev/
2023-02-14 06:53:28 -03:00
LuanRT
6e30309f56 style: clean up and fix minor inconsistencies 2023-02-13 19:42:49 -03:00
ChunkyProgrammer
e37cf62732 fix: assign MetadataBadge's label (#311) 2023-02-13 03:15:06 -03:00
LuanRT
567fdbaf52 docs(parser): fix parser.ts link 2023-02-12 08:55:26 -03:00
LuanRT
0a22319d9e chore(docs): update test status badge 2023-02-12 08:47:36 -03:00
LuanRT
eb72c2f6ef refactor(parser): improve typings and do some refactoring (#305)
* dev: add response types

* dev: refactor `Parser#parseResponse()`

* dev: update YouTube parsers

* dev: update YouTube Music classes

* dev: update YouTube Kids classes

* dev: update core classes

* dev(Parser): fix some inconsistencies

* chore: update docs

* chore: update docs x2

* fix: export response types 

* chore(docs): update parser example
2023-02-12 07:04:17 -03:00
Daniel Wykerd
2ccbe2ce62 refactor!: cleanup platform support (#306)
* refactor!: cleanup platform support

* chore: lint

* fix: web platform

* feat: provide UniversalCache

Provide UniversalCache as a wrapper around Platform.shim.Cache.

* fix: invalid import

* refactor: remove isolated-vm support

* fix: type info

* refactor: cleanup exports

* fix: mark jintr as external dependency

In the bundled CJS node build, mark jintr as external.

* chore: add additional exports

web exports provide a way to select web implementation manually without
relying on the bundler to select it correctly from the "exports" field

web points to src/platform/web.js
web.bundle points to bundle/browser.js
web.bundle.browser points to bundle/browser.min.js

agnostic exports provide users of the library to provide their own
platform implementation without first importing the default one.

agnostic points to src/platform/lib.ts

* fix: toDash on web

* revert: eval is synchronous

* fix: use serializeDOM in FormatUtils

* ci: automate releases with `release-please`

* chore: clean up workflow files

* ci: fix NPM publish action

---------

Co-authored-by: LuanRT <luan.lrt4@gmail.com>
2023-02-12 04:21:44 -03:00
absidue
a69e43bf3a feat(FormatUtils): support multiple audio tracks in the DASH manifest (#308) 2023-02-11 20:34:39 -03:00
absidue
b2900f48a7 feat(Channel): Add getters for all optional tabs (#303)
* feat(Channel): Add getters for all optional tabs

* Fix typo in test description

Co-authored-by: LuanRT <luan.lrt4@gmail.com>

---------

Co-authored-by: LuanRT <luan.lrt4@gmail.com>
2023-02-02 00:29:54 -03:00
absidue
d612590530 fix(TopicChannelDetails): avatar and subtitle parsing (#302) 2023-02-01 17:17:31 -03:00
Daniel Wykerd
e82e23dfbb feat(parser): Text#toHTML (#300)
Added support to render Text nodes as HTML for use in web applications.
2023-02-01 16:27:59 -03:00
absidue
f62c66db39 fix(ChannelAboutFullMetadata): fix error when there are no primary links (#299) 2023-01-29 21:28:19 -03:00
ChunkyProgrammer
de61782f1a feat: add parser support for MultiImage community posts (#298) 2023-01-29 14:39:46 -03:00
absidue
ceefbed98c feat: allow checking whether a channel has optional tabs (#296) 2023-01-29 14:37:09 -03:00
LuanRT
315d89f84a refactor(Player): remove unneeded parameters 2023-01-29 02:26:18 -03:00
LuanRT
2ea3602b61 Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2023-01-29 01:55:17 -03:00
LuanRT
b7df3d6df4 refactor: clean up backstage post nodes 2023-01-29 01:54:24 -03:00
ChunkyProgrammer
2acb7da019 feat: parse isLive in CompactVideo (#294)
* Feat: parse isLive in CompactVideo

* Use 3 equal signs

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>

* use parse array for badges

add is_premiere, is_new, is_fundraiser

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2023-01-27 14:44:32 -03:00
LuanRT
0b991800a5 feat: extract channel error alert 2023-01-27 07:15:17 -03:00
LuanRT
50ef71284d feat(Channel): add support for sorting the playlist tab (#295) 2023-01-27 06:37:35 -03:00
LuanRT
d6c5a9b971 feat: improve support for dubbed content (#293)
* feat(Format): add `language`, `is_dubbed` and `is_original`

* feat: add a format filtering option to the DASH function
> And a simple language option to VideoInfo's download method.

* chore: update docs

* feat: improve audio track info parsing

* feat(Format): parse `audioTrack` prop
2023-01-27 00:42:20 -03:00
LuanRT
0fc29f0bbf feat(ytkids): add getChannel() (#292) 2023-01-23 05:38:53 -03:00
LuanRT
2bbefefbb7 feat: add support for YouTube Kids (#291)
* dev: add `WEB_KIDS` innertube client

* refactor: move DASH manifest stuff out of `VideoInfo`
This makes it easier to use these functions elsewhere.

* feat(ytkids): add `Kids#getInfo()` & `Kids#search()`

* feat: add `Innertube#kids.getHomeFeed()`

* docs: add YouTube Kids API ref

* docs: fix typo

* docs: fix yet another typo

* docs: update YouTube Music API ref
Unrelated but required to reflect changes made to the DASH manifest generation functions

* chore: lint

* chore: add tests

* feat: include `captions` in `VideoInfo`

* chore: fix tests
2023-01-23 03:39:51 -03:00
absidue
13ad3774c9 fix(VideoInfo): Gracefully handle missing watch next continuation (#288) 2023-01-23 03:36:38 -03:00
LuanRT
8051a7dee6 refactor: improve live chat polling and error handling (#287) 2023-01-21 02:56:10 -03:00
LuanRT
2842b1d917 chore(release): v2.9.0 2023-01-11 05:41:02 -03:00
LuanRT
870b2811d9 chore(Comments): reword a few things in the docs 2023-01-10 23:25:31 -03:00
LuanRT
1aedbd3ea6 refactor(ytmusic): minor improvements to Library 2023-01-10 23:24:12 -03:00
LuanRT
e8af2a603d fix(Playlist): trying to parse an already parsed response (#286)
This resulted in a 'InnertubeError: Type not found!' which was then followed by 'InnertubeError: This playlist does not exist' when retrieving the last page of a long playlist.
2023-01-10 17:18:16 -03:00
LuanRT
8e37efa575 refactor: improve livechat parser & add remaining action nodes (#285)
* refactor: improve live chat parsers & add missing nodes

* chore: update example and docs

* docs: rephrasing/formatting

* chore: remove unneeded test (unrelated)
2023-01-10 01:44:51 -03:00
absidue
5a362a0bd5 feat(EmojiRun): Add is_custom to identify custom emojis (#283) 2023-01-10 01:43:18 -03:00
absidue
89ee68b084 refactor(LiveChat): Only store required video info values (#281) 2023-01-09 16:45:02 -03:00
LuanRT
dca61c3a22 feat: finalize comment section nodes (#280)
* fix: comment translation proto missing channel id

* feat: finalize nodes

* docs: update API ref

* chore: update tests
2023-01-09 08:14:31 -03:00
LuanRT
56e6e23453 chore(release): v2.8.0 2023-01-06 03:18:17 -03:00
LuanRT
00fa514b03 feat: add support for generating sessions locally (#277)
* feat: add visitor data proto

* feat: add support for generating session data locally

* chore: add test
2023-01-06 03:06:49 -03:00
LuanRT
d36389c865 refactor(VideoInfo): simplify watch next feed extraction 2023-01-05 21:44:56 -03:00
LuanRT
55ca986888 chore: use optional chaining to avoid problems 2023-01-05 21:34:04 -03:00
LuanRT
b04df7e119 chore: lint 2023-01-05 21:22:50 -03:00
LuanRT
d8d92866d1 fix(Format): some types were incorrect 2023-01-05 20:56:55 -03:00
LuanRT
b4b0731589 refactor: remove unneeded check when generating search filter params
YouTube doesn't do this so I don't see why we should.
2023-01-05 20:32:14 -03:00
LuanRT
d69d701869 fix(VideoInfo): watch next feed not being parsed when logged out (#276) 2023-01-05 19:09:16 -03:00
absidue
cd4d28c951 feat: add live stream start_timestamp (#275) 2023-01-05 17:35:39 -03:00
absidue
22b9c174bb feat: add is_live and is_upcoming to VideoDetails (#271)
* feat: add is_live and is_upcoming to VideoDetails

* chore: add tests
2023-01-03 20:52:05 -03:00
LuanRT
b704c8e78c chore(release): v2.7.0 2023-01-02 00:00:13 -03:00
LuanRT
bbfeb99f55 chore: update docs 2023-01-01 23:10:38 -03:00
LuanRT
f2adeeeab4 docs: rephrasing 2023-01-01 23:04:04 -03:00
LuanRT
3756e63996 feat(Search): add support for features filter (#270) 2023-01-01 22:40:35 -03:00
LuanRT
a27807b6c1 feat: allow enabling safety mode (#269)
Unrelated: this also simplifies the creation of sessions without a player instance.
2023-01-01 19:55:08 -03:00
LuanRT
5cfb969e33 feat: implement Innertube#resolveURL(url) (#268) 2022-12-31 18:35:55 -03:00
LuanRT
1163125f5c feat: add LiveChatRestrictedParticipation node (#267) 2022-12-31 17:42:59 -03:00
LuanRT
9ac5043309 chore: clean up & remove unneeded code (#265) 2022-12-31 05:49:41 -03:00
LuanRT
6a4b4f3359 feat: add support for chapters & video heatmap (#263)
* feat: add support for chapters & video heatmap

* chore: add tests
2022-12-27 04:17:05 -03:00
LuanRT
2b3642ba63 feat: add support for searching within a channel (#262)
* feat(Channel): add support for searching

* dev: add channel search test

* chore: update docs
2022-12-26 18:56:37 -03:00
LuanRT
fb2e237284 fix: add YouTube Studio to the list of clients (#261)
As of December 16, YouTube Studio (Android) endpoints fail with a "Precondition check failed." message. If a newer version of the YouTube app is used then it throws a 404, indicating that it is now a requirement to use the correct client for YT Studio requests. I would say that's a bit of a bummer as we'll have to keep track of yet another client's version to make sure it doesn't get too outdated.
2022-12-20 18:34:50 -03:00
LuanRT
6f3deaf16a fix: use WEB client in setNotificationPreferences 2022-12-19 18:51:20 -03:00
LuanRT
d4382e81c3 chore: update proto and format code 2022-12-19 18:48:00 -03:00
LuanRT
89956cab46 chore: default Accept-Language to * 2022-12-19 18:46:47 -03:00
LuanRT
ac9341c769 chore(release): v2.6.0 2022-12-19 04:07:48 -03:00
LuanRT
cac762569a feat(Session): allow overriding geolocation (#260)
* Allow overriding geolocation

* Fix some inconsistencies (unrelated)
2022-12-19 03:55:38 -03:00
LuanRT
9978ebf085 refactor(Parser): reduce reliance on localised strings (#258) 2022-12-17 00:54:08 -03:00
LuanRT
b036e2fcdc feat(Channel): parse subscribe button
This way one can subscribe to a given channel simply by calling the button's endpoint.
2022-12-16 17:13:13 -03:00
LuanRT
e37f42f41b feat: bring back Video#is_live and add ExpandableMetadata (#256)
* bring back `Video#is_live`

* add ExpandableMetadata
2022-12-15 19:01:42 -03:00
absidue
883a023624 feat(TextRun): add support for formatting (#254) 2022-12-14 22:48:35 -03:00
LuanRT
506834b253 docs: fix formatting (oops) 2022-12-12 01:18:42 -03:00
LuanRT
87e7ef77eb chore(release): v2.5.2 2022-12-12 00:21:32 -03:00
LuanRT
27fdd8268a docs: update ToC 2022-12-12 00:14:55 -03:00
LuanRT
d4ea87b8b0 chore(docs): fix typo 2022-12-12 00:13:24 -03:00
LuanRT
ec87eea20d chore: update deps 2022-12-12 00:10:56 -03:00
LuanRT
e43ad202f4 chore: update examples 2022-12-12 00:10:33 -03:00
LuanRT
104c36b450 docs: reword a few things 2022-12-11 23:58:26 -03:00
absidue
f5d61d70f2 fix: author and thumbnails for autogenerated playlists (#251) 2022-12-07 20:34:53 -03:00
LuanRT
c76f5f478d 2.5.1 2022-11-30 19:11:40 -03:00
LuanRT
49d1432b5a chore: fix a few inconsistencies 2022-11-30 19:02:49 -03:00
LuanRT
be157ef016 fix: signature decipher extraction failing (#249) 2022-11-30 18:39:37 -03:00
LuanRT
9f703203b6 chore(docs): update readme 2022-11-29 05:49:15 -03:00
LuanRT
516eeeff45 refactor: improve Search parser (#247)
* refactor: improve Search parser

* chore: lint
2022-11-29 03:50:17 -03:00
LuanRT
6caa679df6 chore(release) v2.5.0 2022-11-25 01:36:50 -03:00
LuanRT
2a87f42b32 fix(Search): check if WatchCardHeroVideo is null before casting
Related #243
2022-11-25 01:25:02 -03:00
LuanRT
f7c1e0f249 fix(Music): search endpoint missing
Related: #242
2022-11-23 20:04:24 -03:00
LuanRT
fe4c5433cf feat: make Player instance optional (#240) 2022-11-16 03:17:59 -03:00
LuanRT
0e5e0c0fab feat(Channel): add support for filters (#237)
* feat: add support for filters

Also add `channel#getShorts()` and `channel#getLiveStreams()`

* docs: update API ref

* chore: add tests
2022-11-14 19:08:16 -03:00
LuanRT
f0fd6146c7 Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2022-11-14 15:32:08 -03:00
LuanRT
43061970c6 fix: export Player & Session classes 2022-11-14 15:30:40 -03:00
LuanRT
746023d9bb chore(docs): fix typo' 2022-11-12 19:36:47 -03:00
LuanRT
3102479dd9 chore(release): v2.4.1
:]
2022-11-12 19:07:06 -03:00
LuanRT
c7a13c948c chore: remove unnecessary code 2022-11-12 19:02:40 -03:00
LuanRT
ec875ba321 chore(release): v2.4.0 2022-11-12 18:49:56 -03:00
LuanRT
db77bba802 fix(NotificationsCount): default to 0 2022-11-12 17:29:07 -03:00
LuanRT
5ea0a0ebf8 feat: add support for switching accounts (cookie based auth only) (#236)
* feat: add support for switching accounts

* style: lint
2022-11-12 16:26:02 -03:00
LuanRT
0130229236 fix(Actions): do not send undefined payloads 2022-11-12 15:38:29 -03:00
LuanRT
da517fe6d1 refactor: improve home feed parsing (#234)
* chore: update tests

* style: format code

* docs: update API ref
2022-11-12 01:31:11 -03:00
LuanRT
95ff1e6c5e refactor(Library): use memo to get target YTNodes 2022-11-11 19:00:12 -03:00
LuanRT
0f8adfd9b8 chore(parser): ignore AdSlot 2022-11-11 17:23:13 -03:00
LuanRT
b514765354 chore(docs): update examples 2022-11-11 17:05:24 -03:00
LuanRT
3cbcd71a3a feat: add support for topic/auto-generated channels and fix minor parsing errors (#233)
* dev: add support for topic channels

* dev(parser): do not try to parse empty nodes

* dev: add support for auto-generated game channels
2022-11-11 00:38:44 -03:00
Burhan Syed
4c00f15f55 fix: WatchCardHeroVideo accessibilityData parse error (#231)
* fix #230: WatchCardHeroVideo AccessibilityData Parser error

* add WatchCardHeroVideo test case
2022-11-10 19:18:08 -03:00
LuanRT
ea1d206b26 2.3.3 2022-11-06 03:38:47 -03:00
LuanRT
aa334aacbd refactor: clean up, fix & remove outdated code (#228)
* dev: refactor and remove redundant code

* docs(music): update `Library` API ref

* docs: update examples

* chore: update lock file
2022-11-06 03:32:16 -03:00
LuanRT
1eda93ee08 fix(session): visitorData and originalUrl 2022-10-21 14:42:34 -03:00
LuanRT
fe0ac0a961 chore(studio): fix a small typo 2022-10-19 17:11:50 -03:00
Daniel Wykerd
8740deb1f2 feat: custom parser error handler (#222)
As suggested in issue #218
2022-10-18 18:44:22 -03:00
mdashlw
d71b762df5 fix: don't remove "VL" from playlist id (#223) 2022-10-18 18:42:55 -03:00
LuanRT
dc14d3785f chore(release): v2.3.2 2022-10-13 16:58:19 -03:00
LuanRT
088f909515 chore: update proto 2022-10-13 16:52:19 -03:00
LuanRT
2a78d77aa3 refactor: get visitor data from the API [skip ci] 2022-10-13 16:39:56 -03:00
LuanRT
1b2862c00f refactor: improve live chat polling (#220)
* dev: add RemoveChatItemByAuthorAction renderer parser

* dev: improve live chat polling
2022-10-12 16:16:07 -03:00
LuanRT
477c030084 feat(studio): add support for updating video metadata (#219)
* dev: update proto

* dev: add `Studio#updateVideoMetadata`

* feat: add `category` option

* chore(studio): update API ref
2022-10-12 16:08:53 -03:00
Émilien Devos
19d579df13 fix: wrong element name (#217) 2022-10-11 05:03:21 -03:00
LuanRT
5313c57783 chore(docs): fix typos [skip ci] 2022-10-06 05:24:09 -03:00
LuanRT
190f7681be chore: update tests 2022-10-06 05:20:24 -03:00
LuanRT
6e027bcc85 docs(livechat): update API ref 2022-10-06 04:44:49 -03:00
LuanRT
6b531dd0ea chore: lint 2022-10-06 04:38:28 -03:00
LuanRT
92f24076db docs(ytmusic): add library class docs 2022-10-06 04:36:17 -03:00
Akazawa Daisuke
a9eba7ca62 feat: add RemoveChatItemAction and LiveChatTickerStickerItem (#214) 2022-10-03 03:09:40 -03:00
Akazawa Daisuke
2f56c15ecc feat(LiveChat): add support for moderation & more (#202)
* Live Chat - Implement moderation

* Live Chat - Implement class ItemMenu

* fix moderation method

Co-authored-by: LuanRT <luan.lrt4@gmail.com>
2022-10-02 02:00:24 -03:00
LuanRT
95e0479745 docs: add parser ytnode instructions & other minor changes (#206)
* docs: add instructions on implementing ytnodes

* docs(parser): fix grammar & other minor improvements

* docs: update guidelines

* chore: update parser warning messages
2022-09-28 03:08:51 -03:00
LuanRT
556c7cd6e8 docs(parser): rephrase validTypes description [skip ci] 2022-09-23 03:38:11 -03:00
LuanRT
a4a88419ef docs(parser): escape | separators [skip ci] 2022-09-23 03:34:53 -03:00
LuanRT
aefecd061e chore(release): v2.2.3 2022-09-23 03:19:54 -03:00
LuanRT
7485726f1e refactor: fix a few parsing inconsistencies 2022-09-23 03:06:21 -03:00
LuanRT
9e703abe3a chore(deps): bump jintr to 0.3.1 2022-09-22 18:44:16 -03:00
LuanRT
affbe84284 fix: include thirdParty prop for requests using TV_EMBEDDED (#198)
* dev: update `Context` interface

* dev: include `thirdParty` prop in requests using `TV_EMBEDDED`
2022-09-18 16:58:51 -03:00
Daniel Wykerd
fcbdae3e34 fix: browser example (#197) 2022-09-18 12:46:19 -03:00
LuanRT
059c858021 chore(docs): add a note about streaming data [skip ci] 2022-09-17 21:29:33 -03:00
LuanRT
4ecd3360e0 chore(release): v2.2.1 2022-09-17 20:47:55 -03:00
LuanRT
08e9527931 chore: update proto [skip ci] 2022-09-17 20:07:23 -03:00
LuanRT
a9f03a1523 fix: like/dislike methods not working correctly 2022-09-17 19:49:05 -03:00
LuanRT
c8980c7985 chore(docs): fix typo 2022-09-17 19:28:46 -03:00
LuanRT
2e5688f235 feat: add TVHTML5_SIMPLY_EMBEDDED_PLAYER client (#193)
* feat: add `TV_EMBEDDED` client

See #191, this should help bypassing some age restricted videos.

* dev(VideoInfo): update format options interface

* dev: set `clientScreen` to `EMBED`

* dev: update API ref

* dev: update `Context` interface
2022-09-17 19:15:20 -03:00
LuanRT
dcf2b720a0 fix: minor parsing issues and other improvements (#194)
* feat: add `ConfirmDialog`

This usually appears in the `playability_status` object.

* fix(PlayerErrorMessage): check if `iconType` exists before parsing

* chore(parser): fix a few inconsistencies

* feat(ytmusic): add `MetadataScreen`

TODO: Check TrackInfo, YouTube Music is probably getting some minor UI updates.
2022-09-17 19:14:46 -03:00
SALVADOR, 1 M. LIGAYAO
a90f5eb853 fix: add missing import in index.ts (#188)
* added missing import in index.ts

* commit changes suggested by LuanRT

Co-authored-by: LuanRT <luan.lrt4@gmail.com>

* removed extra require

Co-authored-by: Salvador Ligayao <futuremr.ligayao03@gmail.com>
Co-authored-by: LuanRT <luan.lrt4@gmail.com>
2022-09-17 01:30:35 -03:00
Supertiger
c6482e07b9 docs: fix a small typo in api/session.md (#189)
It says "key" twice, someone forgot to rename one of them to "api_version" :)
2022-09-16 12:21:57 -03:00
LuanRT
2de77c8f2c fix: make cookie auth possible again
See #105
2022-09-14 14:52:10 -03:00
LuanRT
2aaa209906 chore(docs): fix typo [skip ci] 2022-09-13 03:03:22 -03:00
LuanRT
ab028ba1ec chore(package) release v2.1.0 2022-09-13 02:40:31 -03:00
LuanRT
f2f48af1bc feat(Music): add automix support and other minor improvements (#184)
* dev(NavigationEndpoint): add `/player` endpoint

* dev: add AudioOnlyPlayability, BrowserMediaSession and MusicDownloadStateBadge

* dev: allow endpoints to be overridden

* dev: minor parser changes

* dev(TrackInfo): add `<info>#getTab(title?)`

* dev: allow `Music#getInfo()` to accept list items

* dev: revert a few changes, I probably overcomplicated this.

* dev: add tests

* dev: add `TrackInfo#getUpNext()`, `TrackInfo#getRelated()` and `TrackInfo#getLyrics()`

* docs: update API ref

* fix(docs): formatting inconsistencies
2022-09-13 02:26:13 -03:00
LuanRT
3a7da21fd1 fix: improve sig extraction (#183)
* dev: improve sig decipher code extraction

* chore(deps): update Jinter to 0.2.0
2022-09-13 01:36:27 -03:00
LuanRT
89794d65da fix: likes not being parsed correctly 2022-09-11 22:44:27 -03:00
LuanRT
91847ae3cc feat(LiveChat): add SegmentedLikeDislikeButton and LiveChatDialog (#181)
* feat: add `LiveChatDialog`

* feat: add `SegmentedLikeDislikeButton`
2022-09-10 14:54:13 -03:00
LuanRT
eb44b71939 feat: add CollaboratorInfoCardContent renderer parser (#180) 2022-09-10 04:09:38 -03:00
LuanRT
88ebb5e2ae fix: replace s placeholders in playback tracking urls 2022-09-10 03:32:43 -03:00
LuanRT
b237b6af4e Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2022-09-10 03:29:30 -03:00
Nico K
9e618cc576 fix: LiveChatAuthorBadge where MetadataBadge was expected (#179)
* fix `LiveChatAuthorBadge` where `MetadataBadge` was expected

* add "failsafe" for author badges
2022-09-09 19:30:20 -03:00
LuanRT
daf95cfe87 chore: update contribution guidelines 2022-09-09 17:21:48 -03:00
Patrick Kan
bc03c91df9 feat: add PlaylistPanelVideoWrapper parser (#176)
* feat: add `PlaylistPanelVideoWrapper` parser

* fix: `PlaylistPanelVideoWrapper` no counterpart
2022-09-09 15:30:21 -03:00
Akazawa Daisuke
e00be25bf4 feat: add LiveChatAutoModMessage (#177) 2022-09-09 15:29:36 -03:00
LuanRT
c9856a8359 fix: search continuations not being parsed correctly (#173)
* feat: add `TitleAndButtonListHeader`

* fix: continuations not being parsed correctly

* chore: add a test

* chore(package): bump version to 2.0.2

* chore: lint
2022-09-08 21:31:07 -03:00
LuanRT
4b29ad74de chore(docs): rephrase a few things 2022-09-07 03:23:51 -03:00
Patrick Kan
60730a5531 fix: Music#getArtist() and DropdownItem (#170)
* fix: `Music#getArtist()` fails for private artist

* fix: `DropdownItem` inconsistent prop naming
2022-09-06 14:29:29 -03:00
LuanRT
70f2398180 chore(docs): fix another hyperlink 2022-09-06 05:32:20 -03:00
LuanRT
5b3109afef docs: fix hyperlinks
Use actual links otherwise this would not work on NPM
2022-09-06 05:09:00 -03:00
LuanRT
60fe4b1829 chore: tidy up 2022-09-06 04:57:46 -03:00
LuanRT
ddbf9e93da chore(docs): fix download example 2022-09-06 04:02:20 -03:00
LuanRT
e3d483ed75 chore(docs): update examples 2022-09-06 03:37:14 -03:00
LuanRT
320c007396 docs: add video upload example 2022-09-06 03:34:07 -03:00
LuanRT
28a651ea3a feat: add <info>#addToWatchHistory() (#169)
* dev: add `Actions#stats()`

* dev(parser): parse playback tracking urls

* dev: fix a small bug (unrelated)

* feat: add `<info>#addToWatchHistory()`

* docs: update API ref
2022-09-06 02:40:22 -03:00
LuanRT
85fc468cc9 feat: add music#getRecap() (#165)
* dev: add recap renderer parsers

* dev: finish implementation 

* docs: update YouTube Music API ref
2022-09-05 18:08:34 -03:00
LuanRT
f9da261441 chore: add CompactPromotedVideo to ignore list 2022-09-05 03:33:20 -03:00
LuanRT
4484f78394 fix(VideoSecondaryInfo): subscribe_button can also be just a Button 2022-09-05 03:30:44 -03:00
LuanRT
4181969d52 feat: properly type renderer parsers
CardCollection, ChipCloud, Endscreen, PlayerOverlay, PlayerOverlayAutoplay, VideoSecondaryInfo and WatchNextEndScreen.
2022-09-05 03:25:36 -03:00
LuanRT
ecac5f4d7e feat: add ANDROID_MUSIC client 2022-09-05 03:17:07 -03:00
Akazawa Daisuke
a8322e35f5 feat: Add paid chat color info (#164) 2022-09-04 05:57:41 -03:00
LuanRT
3a6f4ffa9d chore(docs): update examples 2022-09-04 05:18:58 -03:00
LuanRT
3dc357bee0 feat: expose parser and YTNodes as public APIs 2022-09-04 05:17:24 -03:00
LuanRT
982a086760 chore(docs): minor fixes and improvements 2022-09-03 20:41:55 -03:00
LuanRT
75959105bd chore(docs): fix typo [skip ci] 2022-09-03 16:44:51 -03:00
LuanRT
80496d30a3 chore(docs): remove unused links [skip ci] 2022-09-03 16:37:57 -03:00
LuanRT
4bddc771b2 Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2022-09-03 16:28:58 -03:00
LuanRT
c26a07dc73 docs: add a more complete download example 2022-09-03 16:28:18 -03:00
Patrick Kan
e498815795 fix: Music#getAlbum()fails for private album ID (#162) 2022-09-03 14:09:29 -03:00
LuanRT
60ef3eabd3 chore: fix stale workflow 2022-09-03 01:05:47 -03:00
LuanRT
1da8043c18 chore: lint 2022-09-03 01:05:30 -03:00
LuanRT
4f015536ac fix: ytmusic formats returning 401 when deciphered (#161)
* fix: sending incomplete video info payload

* fix: check if microformat is `MicroformatData` before parsing
2022-09-03 00:43:17 -03:00
LuanRT
c3f98246f0 docs: add parser info and examples (#160)
* docs: include a parser example in the readme

* docs: fix typo

* docs: rephrasing a few things
2022-09-02 17:31:04 -03:00
Patrick Kan
53cb26546e chore: minor fixes (#159)
* fix: add `params` to `watch_playlist` endpoint

* fix: continuation in `PlaylistPanelContinuation`
2022-09-02 14:24:36 -03:00
LuanRT
e3d38ad107 chore: update labeler workflow [skip ci] 2022-09-02 14:21:37 -03:00
LuanRT
74d53f388a chore: remove unused code 2022-09-02 04:45:52 -03:00
LuanRT
7a7c657733 chore(docs): minor rewording [skip ci] 2022-09-02 04:22:09 -03:00
LuanRT
d34a8d7fc4 chore: add release and labeler workflows [skip ci] 2022-09-01 17:57:02 -03:00
LuanRT
f8c07101bf chore: remove old download examples [skip ci]
TODO: Maybe bring back ffmpeg examples?
2022-09-01 05:29:03 -03:00
LuanRT
dccb2b7e50 chore: remove old readme 2022-09-01 05:19:58 -03:00
LuanRT
573ebf2568 chore: update workflows 2022-09-01 05:14:42 -03:00
LuanRT
898cb56c71 chore(docs): finish most of v2's documentation 2022-09-01 05:10:16 -03:00
Patrick Kan
b9e6e16ce9 feat: add MusicVisualHeader (#157) 2022-08-30 05:11:14 -03:00
Patrick Kan
c99364942c fix: DidYouMean endpoints and add text prop (#158)
* feat: add `text` to `DidYouMean`

* fix: parse correct endpoint in `DidYouMean`
2022-08-30 05:10:51 -03:00
LuanRT
317bca261c feat(download): bring back WEB client (#156)
* refactor: remove dead code and integrate with Jinter

* chore: tidy up
2022-08-29 04:48:33 -03:00
Patrick Kan
173aec65f5 fix: Music#Artistparse err if missing shelves (#155) 2022-08-28 15:50:00 -03:00
LuanRT
13a86cb4e7 feat: add settings page parser (#154)
* feat: add settings page parsers

* fix(AccountManager): small ts error

* feat: add `CopyLink` & `SettingsCheckbox`

* deps: remove “flat” dependency
2022-08-28 05:11:11 -03:00
Patrick Kan
05b4593e0a feat: fix music#library.getArtists() and add MusicShelf.bottom_button (#152)
* fix: #143

* feat: add `bottom_button` to `MusicShelf`
2022-08-25 17:14:32 -03:00
Patrick Kan
6fe4d235ff feat: add MusicSortFilterButton (#151) 2022-08-25 02:06:52 -03:00
LuanRT
f4ce4d2f74 feat: add account info parsers 2022-08-25 01:43:05 -03:00
LuanRT
541cdc455f feat: add parsers for TimeWatched 2022-08-24 06:13:19 -03:00
LuanRT
c000bd8d5f docs(parser): fix typos 2022-08-24 02:46:56 -03:00
Patrick Kan
f3d77b3e97 Add end_icons to MusicCarouselShelfBasicHeader and fix music#getPlaylist() (#149)
* ft: add end_icons to MusicCarouselShelfBasicHeader

* fix: `music#getPlaylist()` breaking playlist_id
2022-08-22 16:46:52 -03:00
Ben Gerard
22b2953ec8 fix: captions should be a PlayerCaptionsTracklist (#148) 2022-08-21 18:56:57 -03:00
Patrick Kan
a4965ee43d fix: playlist radios misidentified as videos (#147) 2022-08-21 18:55:58 -03:00
LuanRT
842c185f4d chore(docs): improve auth example 2022-08-20 05:28:54 -03:00
LuanRT
790d528a2d tests: use ts-jest for tests 2022-08-20 04:05:34 -03:00
LuanRT
ed79551314 chore: update tsconfig 2022-08-20 04:02:13 -03:00
LuanRT
34281e2445 refactor: migrate parsers to TS (#133)
* dev: finish top-level parsers TS migration

* dev: migrate menu renderers to TS

* chore: fix ts errors

* dev: finish ts migration 🎉
2022-08-20 03:18:17 -03:00
Patrick Kan
b101a39d30 chore: PlaylistPanel fixes (#146)
* fix:`PlaylistPanel` possible content type mismatch

* fix: `PlaylistPanel` err when no continuation
2022-08-19 06:52:47 -03:00
Patrick Kan
dc2f0055cc feat: improve parsing (#145)
* fix: err in `MusicDetailHeader` when no duration

* feat: get video duration from more places
2022-08-19 06:02:01 -03:00
dependabot[bot]
ecdac38458 chore(deps): bump undici from 5.8.0 to 5.8.2 (#144)
Bumps [undici](https://github.com/nodejs/undici) from 5.8.0 to 5.8.2.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.8.0...v5.8.2)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-18 17:45:39 -03:00
Patrick Kan
31326ec9eb refactor: misc fixes and additions (#142)
* feat: add `header` to `Grid` parser

* feat: parse title in `MusicHeader`

* feat: improve parsing of artist-type items
2022-08-18 05:35:24 -03:00
Patrick Kan
dba34dc5ae feat(ytmusic): music#Playlist fixes and additions (#138)
* feat: add MusicEditablePlaylistDetailHeader parser

* feat: more info in `DropdownItem`

* fix: empty `year` value in `MusicDetailHeader`

* fix(ytmusic#Playlist): header err w/ own playlists

* feat: include reload continuation in `MusicShelf`

* feat(ytmusic): add getSuggestions() to Playlist
2022-08-14 20:39:31 -03:00
Patrick Kan
713fd13c74 fix(music#Library): sort_by err when items <= 1 (#137) 2022-08-13 19:46:55 -03:00
Patrick Kan
f6a2a418be feat(ytmusic): implement music#Library (#136)
* feat: add ItemSectionTab and related parsers

* feat: add `continuation` to `Grid`parser class

* feat (ytmusic): implement music#getLibrary()

* Improve album fetch in `MusicResponsiveListItem`

* music#Library: return [] for empty results

* feat: add `Dropdown` & `DropdownItem` parsers

* feat: add `CreatePlaylistDialog` parser

* feat: add `create_playlist` to NavigationEndpoint

* feat: add `AutomixPreviewVideo` parser

* feat: improve parsing of items

* fix: `PlaylistPanel` continuation

* feat: more args in `Actions#next`

* feat: add `PlaylistPanelContinuation` to `Parser`

* chore: update parser-map

* music#Library: refactor + add shuffle songs opt

* feat: add `endpoint` to `DropdownItem`

* feat: add `end_items` to `ItemSectionTabbedHeader`

* feat(ytmusic): add `sort_by` to `music#Library`
2022-08-13 17:39:35 -03:00
LuanRT
e82302a6ea chore: revert commit 59d37e9ed6 2022-08-12 05:45:59 -03:00
LuanRT
59d37e9ed6 chore: bump client versions 2022-08-12 00:34:58 -03:00
LuanRT
c10cce1e2a chore: include androidSdkVersion param in Android requests 2022-08-12 00:30:14 -03:00
LuanRT
63ae9061eb chore: include alt param in all requests 2022-08-11 22:58:03 -03:00
LuanRT
03b183be70 Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2022-08-11 20:47:36 -03:00
LuanRT
2d7fe04a8a fix: oopsie, forgot to remove the video id while debugging 2022-08-11 20:47:21 -03:00
patrickkfkan
4d6067937a fix: build error caused by music#Playlist.getRelated() (#135)
* fix(ytmusic): title check in `Playlist#getRelated`
2022-08-11 20:43:38 -03:00
LuanRT
52207df393 chore: lint 2022-08-11 20:41:54 -03:00
LuanRT
9a914e29ba Merge branch 'main' of https://github.com/LuanRT/YouTube.js 2022-08-11 20:37:01 -03:00
LuanRT
34022fddfb hotfix: use Android client when requesting initial video info 2022-08-11 20:35:30 -03:00
patrickkfkan
9b4d86b81f feat(ytmusic): add music#getPlaylist() (#131)
* add music#getPlaylist()
* fix: lint errors
2022-08-10 14:11:31 -03:00
patrickkfkan
dc79b19d56 refactor: migrate MusicCarouselShelfBasicHeader to TypeScript and add more_content prop (#132)
* refactor: migrate `MusicCarouselShelfBasicHeader` to TS

* feat: `MusicCarouselShelfBasicHeader.more_content`
2022-08-09 15:37:19 -03:00
Daniel Wykerd
ad3ab4f637 docs: OAuth example 2022-08-08 15:16:58 -03:00
LuanRT
60ff0513f1 docs: fix typos / rephrasing 2022-08-07 06:40:45 -03:00
LuanRT
4ab2bb744a chore: lint 2022-08-07 06:17:43 -03:00
LuanRT
40fc24b043 refactor!: fix inconsistent use of SuperParsedResult 2022-08-07 06:15:55 -03:00
LuanRT
709c448053 refactor!: migrate core renderers to TypeScript 2022-08-07 06:14:09 -03:00
LuanRT
3833b333a7 refactor: migrate MusicCarouselShelf to TypeScript 2022-08-05 16:33:51 -03:00
LuanRT
38280290f7 fix(ytmusic): oopsie, forgot to declare player_overlays 2022-08-04 16:54:38 -03:00
LuanRT
d5f34982f4 feat(ytmusic): add music#getInfo()
Already functional but still WIP.
2022-08-04 16:49:20 -03:00
LuanRT
3ff3d3c633 feat: add SimpleCardContent
Related: #129
2022-08-04 02:16:12 -03:00
LuanRT
a788c9c80f feat: migrate all playlist renderers to TypeScript 2022-08-04 01:56:53 -03:00
LuanRT
9e2443d1aa chore(docs): fix minor typos and other things 2022-08-03 18:43:21 -03:00
LuanRT
bb3ed9dcd3 docs: update v2 API ref 2022-08-03 18:35:35 -03:00
LuanRT
51f9eb15ae docs(comments): update result types 2022-08-03 17:10:56 -03:00
LuanRT
d6398296c3 docs: update examples 2022-08-03 17:06:00 -03:00
LuanRT
af6856ced4 chore: tidy things up
Move a few things here and there. Organization makes life easier.
2022-08-03 03:34:59 -03:00
LuanRT
3cdaab8b7a docs: update live chat examples 2022-08-01 15:55:27 -03:00
LuanRT
daaba3745e feat: improve LiveChat types 2022-08-01 15:54:54 -03:00
LuanRT
323b90a98c feat: add LiveChatProductItem and migrate LiveChatBanner to TypeScript 2022-08-01 15:52:25 -03:00
LuanRT
3abcde7e67 refactor!: rewrite MusicNavigationButton to TypeScript
Plus fix “endpoint” prop, it is `clickCommand` and not `navigationEndpoint`.
2022-08-01 03:28:15 -03:00
LuanRT
2599e734b8 fix(ytmusic): music#getRelated() now works again
Like nearly all YouTube Music methods, this one was also broken due to a recent refactor on the parser.
2022-08-01 03:06:30 -03:00
LuanRT
c10006fa57 chore: remove unused constants 2022-07-31 14:59:36 -03:00
LuanRT
61f8b2a9a0 chore: remove unneeded checks 2022-07-30 05:48:46 -03:00
LuanRT
cdbdfec057 chore: lint 2022-07-30 05:40:43 -03:00
LuanRT
4d332402db fix(ytmusic): fix music#getLyrics() & music#getUpNext()
These were broken due to recent changes in the parser — both should be fixed now. Note that `music#getRelated()` is still broken.
2022-07-30 05:37:23 -03:00
LuanRT
c66940ae65 refactor(ytmusic): migrate Explore & Library to TypeScript 2022-07-30 04:18:12 -03:00
LuanRT
ff9aeeedce refactor: rewrite Library to TypeScript 2022-07-29 16:09:11 -03:00
LuanRT
88a6ee907e chore: lint 2022-07-29 06:58:49 -03:00
LuanRT
72c3af84b0 refactor(ytmusic)!: rewrite Album to TypeScript 2022-07-29 06:58:28 -03:00
LuanRT
99233bcf7a refactor!: rewrite History to TypeScript 2022-07-29 06:20:58 -03:00
LuanRT
adae925367 refactor!: rewrite Analytics to TypeScript (#122)
* refactor: migrate all analytics’ classes to TypeScript

Also, add AnalyticsShortsCarouselCard and AnalyticsRoot.
2022-07-29 05:39:34 -03:00
LuanRT
5a99190136 fix(linter): oops, wrong extension 2022-07-29 01:19:55 -03:00
LuanRT
6008d4cf0d chore: update workflows 2022-07-29 01:16:35 -03:00
LuanRT
f4b947f8e2 fix(linter): ignore compiled protobuf 2022-07-29 01:11:20 -03:00
LuanRT
00cd35867a refactor: use “prepare” script instead of “prepublishOnly” 2022-07-29 01:07:49 -03:00
LuanRT
7ba09a66d8 refactor: migrate NotificationsMenu to TypeScript 2022-07-29 01:00:56 -03:00
LuanRT
c16d632b31 fix: race condition causing “update-credentials” to fire multiple times 2022-07-28 05:11:10 -03:00
Daniel Wykerd
9ef765dbc1 feat: allow users to cache OAuth credentials (#121)
Use `UniversalCache` instance to cache user credentials

Opt-in via `OAuth#cacheCredentials()`

* chore: lint
2022-07-28 00:04:07 -03:00
Daniel Wykerd
dbfcb36fd7 fix: TabbedFeed#getTab to parse response. (#120)
* fix: TabbedFeed#getTab to parse response.

* fix: Channel parser and example

* refactor: migrate youtube Search to TS

* chore: lint
2022-07-26 17:29:30 -03:00
LuanRT
0393ab7f38 chore: add .npmignore
This is needed so build output can be included in the package when publishing to npm.
2022-07-25 18:28:28 -03:00
Daniel Wykerd
eb5d49d14e refactor: replace xmlbuilder2 with linkedom (#119)
* refactor: replace xmlbuilder2 with linkedom

This reduces our bundle size from 909mb to 530mb

* chore: lint
2022-07-25 16:48:46 -03:00
Daniel Wykerd
a83518d021 refactor: allow uploads of streams (#117)
This allows uploading from a ReadableStream or File instead of reading
the whole file into memory first.
2022-07-25 15:51:42 -03:00
LuanRT
95079ced09 feat: add support for uploading videos (#115)
* chore: add video upload url

* feat!: add support for uploading videos

This is probably complete but I will do a self-review later today.

* style: align comments

* style: lint code

* chore: tidy things up
2022-07-25 04:45:55 -03:00
Daniel Wykerd
616b1405c3 refactor: generate typescript protobuf encoders (#114)
This also removes dependency `buffer` for browsers.

Co-authored-by: LuanRT <luan.lrt4@gmail.com>
2022-07-23 15:16:07 -03:00
Daniel Wykerd
ef6ec59402 feat: smaller user-agent list (#112) (#113) 2022-07-23 15:05:53 -03:00
LuanRT
a2103963b4 feat: add Studio#setThumbnail() method (#111)
* feat: add support for protobuf payloads to `Actions#execute()`

* chore: compile proto definitions file

* feat(wip): add `Studio` class and implement `Studio#setThumbnail()` method

* fix: check if parameters are missing
2022-07-23 02:45:47 -03:00
LuanRT
8ed6cc9e24 chore(docs): add sponsor (SerpApi) 2022-07-23 02:32:01 -03:00
Daniel Wykerd
9c44cfc7f8 fix: add missing playlist_length (#110)
* fix: add missing playlist_length

Also convert to TS

* chore: lint
2022-07-22 17:08:32 -03:00
dependabot[bot]
c487a65e8f chore(deps): bump undici from 5.7.0 to 5.8.0 (#109)
Bumps [undici](https://github.com/nodejs/undici) from 5.7.0 to 5.8.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.7.0...v5.8.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-22 17:08:13 -03:00
LuanRT
9c7850d197 refactor(ytmusic): rewrite Artist to TypeScript 2022-07-22 05:21:02 -03:00
LuanRT
c12b1482fe feat(ytmusic): expose Message renderer in the Search object 2022-07-22 05:19:17 -03:00
LuanRT
851afddf51 refactor(ytmusic): rewrite HomeFeed to TypeScript 2022-07-22 03:14:56 -03:00
LuanRT
8b9cd236ae chore: fix warnings 2022-07-21 17:17:46 -03:00
LuanRT
0fb0c2318a fix: filtered search & continuations not working correctly 2022-07-21 17:12:32 -03:00
LuanRT
dfd09e9683 fix: DidYouMean & ShowingResultsFor throwing type errors 2022-07-21 15:36:17 -03:00
LuanRT
6da69b4f18 feat: update InnerTubePayload protobuf
Refer to #104
2022-07-21 15:14:13 -03:00
LuanRT
60e6326402 style: format code 2022-07-21 03:51:28 -03:00
LuanRT
4bf4639902 chore: fix browser bundle, #108 2022-07-20 16:51:33 -03:00
LuanRT
0f8c25a5f0 chore: fix linter 2022-07-20 16:33:29 -03:00
LuanRT
6a5ebeb8ee chore: clean up build steps 2022-07-20 16:28:51 -03:00
Daniel Wykerd
fb68e6bcfe feat!: better cross runtime support (#97)
* refactor: remove dependancies

removes node-forge and uuid in favor of Web APIs

* refactor!: commonjs to es6

To aid with #93 I will make all my changes in TypeScript instead.
This is the first step into making that happen.

Used: https://github.com/wessberg/cjstoesm

* refactor!: NToken and Signature TS files

Bring this PR up to speed with #93

* feat: cross platform cache (WIP)

this is untested!
should remove idb as dependecy.

* feat: EventEmitter polyfill

* refactor: remove events

* feat: HTTPClient based on Fetch API (WIP)

* refactor!: parsers refactor (WIP)

Initial TS support for parsers as per #93

This adds several type safety checks to the parser which'll help to
ensure valid data is returned by the parser.

* refactor!: parsers refactor (WIP)

Bring more in line with the existing implementations & make less verbose

* refactor!: parser refactor

I was overcomplicating things, this is much simpler and compatible with
the existing JS API

* fix: some missed parsers while refactoring

* fix: better type inferance for parseResponse

* feat(TS): typesafe YTNode casts

* feat: more type safety in YTNode and Parser

* refactor: VideoInfo download with fetch & TS (WIP)

Again, this also does some work for #93

* fix: LiveChat in VideoInfo

* refactor!: more typesafety in parser

* refactor!: VideoInfo almost completed

* refactor!: player and session refactors

- Remove the Player class' dependance on Session.
- Add additional context to the Session.

* refactor!: move auth logic to Session (WIP)

* refactor: TS port for Actions and Innertube

My fingers hurt from typing out all those types :-P

* refactor: NavigationEndpoint TS

this is still a WIP and should be improved.
NavigationEndpoint should probably be refactored further.

* refactor!: VideoInfo compiles without errors

* chore: delete old player

* fix: import errors

It compiles and runs!!

* fix: Utils import fixes

* fix: several runtime errors

* fix: video streaming

* chore: remove console.log debugging

Whoops, forgot to remove these before I pushed the previous commit

* chore: remove old unused dependencies

* fix: typescript errors

Now emitting declarations and source maps

* refactor: TS feed

* chore: delete old Feed

* refactor: move streamToIterable into Utils

* refactor: AccountManager TS

* refactor: FilterableFeed to TS

* refactor: InteractionManager to TS

* refactor: PlaylistManager to TS

* refactor: TabbedFeed to TS

* refactor: Music to TS (WIP)

more work to be done, see TODO comments

* fix: getting the tests to pass (6/12)

YouTube.js Tests
    Search
      ✓ Should search on YouTube (1152 ms)
      ✕ Should search on YouTube Music (705 ms)
      ✕ Should retrieve YouTube search suggestions (722 ms)
      ✓ Should retrieve YouTube Music search suggestions (233 ms)
    Comments
      ✓ Should retrieve comments (585 ms)
      ✕ Should retrieve next batch of comments (221 ms)
      ✕ Should retrieve comment replies (1 ms)
    General
      ✕ Should retrieve playlist with YouTube (732 ms)
      ✓ Should retrieve home feed (838 ms)
      ✓ Should retrieve trending content (543 ms)
      ✓ Should retrieve video info (639 ms)
      ✕ Should download video (5 ms)

* fix: tests (7/12)

YouTube.js Tests
    Search
      ✓ Should search on YouTube (1984 ms)
      ✕ Should search on YouTube Music (1139 ms)
      ✕ Should retrieve YouTube search suggestions (1433 ms)
      ✓ Should retrieve YouTube Music search suggestions (529 ms)
    Comments
      ✓ Should retrieve comments (324 ms)
      ✓ Should retrieve next batch of comments (395 ms)
      ✕ Should retrieve comment replies
    General
      ✕ Should retrieve playlist with YouTube (653 ms)
      ✓ Should retrieve home feed (1085 ms)
      ✓ Should retrieve trending content (513 ms)
      ✓ Should retrieve video info (921 ms)
      ✕ Should download video (3 ms)

* fix: download tests (8/12)

YouTube.js Tests
    Search
      ✓ Should search on YouTube (1293 ms)
      ✕ Should search on YouTube Music (927 ms)
      ✕ Should retrieve YouTube search suggestions (1250 ms)
      ✓ Should retrieve YouTube Music search suggestions (258 ms)
    Comments
      ✓ Should retrieve comments (803 ms)
      ✓ Should retrieve next batch of comments (511 ms)
      ✕ Should retrieve comment replies
    General
      ✕ Should retrieve playlist with YouTube (528 ms)
      ✓ Should retrieve home feed (1047 ms)
      ✓ Should retrieve trending content (548 ms)
      ✓ Should retrieve video info (825 ms)
      ✓ Should download video (1779 ms)

* fix: tests (9/12)

YouTube.js Tests
    Search
      ✓ Should search on YouTube (1276 ms)
      ✕ Should search on YouTube Music (955 ms)
      ✓ Should retrieve YouTube search suggestions (661 ms)
      ✓ Should retrieve YouTube Music search suggestions (491 ms)
    Comments
      ✓ Should retrieve comments (624 ms)
      ✓ Should retrieve next batch of comments (353 ms)
      ✕ Should retrieve comment replies
    General
      ✕ Should retrieve playlist with YouTube (672 ms)
      ✓ Should retrieve home feed (1277 ms)
      ✓ Should retrieve trending content (999 ms)
      ✓ Should retrieve video info (1106 ms)
      ✓ Should download video (2514 ms)

* feat: key based type validation for parsers

* fix: comments tests pass (10/12)

YouTube.js Tests
    Search
      ✓ Should search on YouTube (938 ms)
      ✕ Should search on YouTube Music (850 ms)
      ✓ Should retrieve YouTube search suggestions (528 ms)
      ✓ Should retrieve YouTube Music search suggestions (224 ms)
    Comments
      ✓ Should retrieve comments (518 ms)
      ✓ Should retrieve next batch of comments (337 ms)
      ✓ Should retrieve comment replies (358 ms)
    General
      ✕ Should retrieve playlist with YouTube (466 ms)
      ✓ Should retrieve home feed (1051 ms)
      ✓ Should retrieve trending content (623 ms)
      ✓ Should retrieve video info (863 ms)
      ✓ Should download video (2656 ms)

* refactor: type safety checks removing @ts-ignore

* fix: playlist tests pass (11/12)

YouTube.js Tests
    Search
      ✓ Should search on YouTube (991 ms)
      ✕ Should search on YouTube Music (924 ms)
      ✓ Should retrieve YouTube search suggestions (606 ms)
      ✓ Should retrieve YouTube Music search suggestions (225 ms)
    Comments
      ✓ Should retrieve comments (393 ms)
      ✓ Should retrieve next batch of comments (284 ms)
      ✓ Should retrieve comment replies (252 ms)
    General
      ✓ Should retrieve playlist with YouTube (578 ms)
      ✓ Should retrieve home feed (1148 ms)
      ✓ Should retrieve trending content (541 ms)
      ✓ Should retrieve video info (799 ms)
      ✓ Should download video (1419 ms)

* fix: all tests pass for node 🎉

YouTube.js Tests
    Search
      ✓ Should search on YouTube (1053 ms)
      ✓ Should search on YouTube Music (761 ms)
      ✓ Should retrieve YouTube search suggestions (453 ms)
      ✓ Should retrieve YouTube Music search suggestions (221 ms)
    Comments
      ✓ Should retrieve comments (627 ms)
      ✓ Should retrieve next batch of comments (412 ms)
      ✓ Should retrieve comment replies (268 ms)
    General
      ✓ Should retrieve playlist with YouTube (565 ms)
      ✓ Should retrieve home feed (775 ms)
      ✓ Should retrieve trending content (498 ms)
      ✓ Should retrieve video info (875 ms)
      ✓ Should download video (1364 ms)

* build: working Deno bundle

Still need to test whether this bundle works in the browser

* docs: update deno example to download video

* refactor: MusicResponsiveListItem to TS

* docs: TSDoc for Parser helpers

* docs: Parser documentation for TS

* docs: add note about parseItem and parseArray

* test: remove browser tests since they're identical

* feat: browser support and proxy example

* fix: PlaylistManager TS after merge

* feat: in-browser video streaming

* refactor: cleanup the Dash example

* feat: allow custom fetch implementations

* feat: fetch debugger

* fix: OAuth login

* refactor: remove file extensions from imports

* refactor: build scripts

* fix: CustomEvent on node

* fix: LiveChat

* fix: linting

* fix: liniting in build-parser-json

* chore: update test workflow

* fix: NToken errors after lint fixes

* fix: codacy complaints

* docs: update to reflect changes

Definitly needs more work but its a start

* refactor: cleanup imports/exports

* fix: browser example

- Remove user-agent before making request.
- Fix cache on browsers

* fix: cache on node

* fix: stupid mistake

* refactor: Session#signIn to wait untill success

This also splits the 'auth' event up into 3 distinct events:
- 'auth' -> fired on success
- 'auth-pending' -> fired when pending authentication
- 'auth-error' -> fired when an error occurred

* refactor: freeze Constants

* refactor: cleanup HTTPClient Request

* refactor: debugFetch readability

* chore: lint

* refactor: replace jsdoc with tsdoc eslint plugin

remove @param annotations without descriptions

* fix: bunch of liniting warnings

* refactor: better inference on YTNode#is

As suggested by @MasterOfBob777

* fix: linting warnings

* revert: undici import

* refactor: rename `list_type` to `item_type`
2022-07-20 14:06:12 -03:00
LuanRT
e2f455d7bd chore(docs): add contribution guidelines file 2022-07-18 04:36:21 -03:00
LuanRT
39d2c4c09d chore(docs): move things around a bit 2022-07-13 04:51:09 -03:00
LuanRT
2e3b1c2bf2 chore(docs): add a note about our Discord server 2022-07-13 04:49:19 -03:00
LuanRT
0d4bca5a9d chore (docs): add discord badge 2022-07-13 04:32:00 -03:00
LuanRT
1ce2feb18b style: lint code
Also, remove “strict” rule in favor of typescript (#93, #97)
2022-07-12 23:28:56 -03:00
LuanRT
7ded405de0 chore(package): build 2022-07-12 23:25:27 -03:00
LuanRT
7400b8a9d9 fix(pm): check before setting video ids 2022-07-12 19:15:42 -03:00
LuanRT
2247026da1 chore: fix typo 2022-07-12 18:33:52 -03:00
LuanRT
d8266ff786 refactor!: rewrite PlaylistManager
Probably fixes mentioned issues.

#100, #101
2022-07-12 18:22:53 -03:00
LuanRT
d1f2369e43 fix(build): mark all deps as external
I don't really like the idea of having yet another config file just so we can get all deps from package.json and mark them as external. So let's add them to the build command manually.

#95
2022-07-12 02:05:46 -03:00
LuanRT
4fe349389c chore(package): build 2022-07-11 06:57:51 -03:00
LuanRT
68cb841c00 refactor!: finish parser migration
Finally! :)

This removes all code related to the old parser.

#65
2022-07-11 06:19:10 -03:00
LuanRT
947fd7895b chore: update type declarations 2022-07-11 06:13:21 -03:00
LuanRT
0509b704a8 refactor: rewrite Innertube#getNotifications() to use the new parser 2022-07-11 04:07:39 -03:00
LuanRT
f924a39409 feat(parser): allow parser to find renderers by name
Now we can organize renderers in individual folders and fix the mess that `../contents/classes` is!
2022-07-11 02:47:58 -03:00
LuanRT
03f9fc5c2e chore(docs): rewording 2022-07-10 22:00:44 -03:00
LuanRT
8a5073b0b9 refactor: rewrite search suggestions logic (#92)
* refactor: rewrite YouTube Music search suggestions

The search suggestions method can be found under `Innertube#music.getSearchSuggestions(query)`

* feat: allow `execute(..)` to return parsed data

This simplifies how response data is handled and also makes it easier for end users to write custom functionality.

* style: lint code

* chore: change a few things

* refactor: rewrite YouTube search suggestions

* chore(package): build

* chore: update type declarations

* chore: fix tests
2022-07-10 17:30:20 -03:00
LuanRT
0356dafa96 docs: fix typos 2022-07-09 14:53:53 -03:00
LuanRT
bd7279f800 docs: remove uneeded badge
This is kind of ugly so let's get rid of it.
2022-07-07 15:43:08 -03:00
LuanRT
11d553b2c0 chore: rephrase a few things in the parser documentation 2022-07-07 03:42:59 -03:00
LuanRT
670b918642 style: format code 2022-07-07 03:42:21 -03:00
LuanRT
5a14fe3c4c chore: add additional build option
Add the `--keep-names` option to the build command.

The library sometimes uses constructor names to differentiate between InnerTube renderers. I noticed that after building the code in prod mode class names are drastically renamed and a few things ended up breaking. This fixes all these problems.
2022-07-07 03:39:45 -03:00
LuanRT
ae1a2a7f84 chore: temporarily remove decipher tests
Doesn't look like we can run this on Node 12, may be due to the use of optional chaining.
2022-07-07 00:37:26 -03:00
LuanRT
1837d4929c fix(tests): require deciphers only when needed 2022-07-07 00:20:48 -03:00
LuanRT
d729972251 chore(tests): check node version before running decipher tests 2022-07-07 00:14:10 -03:00
LuanRT
d7267d9aa5 chore: update workflows 2022-07-07 00:01:06 -03:00
LuanRT
650b563301 style: lint code 2022-07-06 23:55:42 -03:00
LuanRT
fd52556603 chore: update bundled code 2022-07-06 23:50:15 -03:00
LuanRT
ff81c2afe8 chore: update type declarations 2022-07-06 23:48:17 -03:00
LuanRT
9c97434e5e chore: tidy things up and fix typos 2022-07-06 23:47:38 -03:00
LuanRT
021a7fd97a refactor(utils): add tmpdir function 2022-07-06 23:45:57 -03:00
LuanRT
a011f62a90 deps: remove tmpdir dependency 2022-07-06 23:44:32 -03:00
LuanRT
dff535a9e2 fix: refactor Analytics to use memo 2022-07-06 17:34:31 -03:00
Bob Varioa
f52d15cdb0 Make project multiplatform (#91)
* Prefer `c ? x : y` over `c && x || y`

* Avoid unnecessary asssignment expressions

* Prefer switch statements over object lookup tables

* Add an .editorconfig

* Fix style issues

* Fix mentioned issues

* remove dynamic require

* Introduce esbuild as a build system

* Add cross platform stream api

* Replace 'fs' with custom cache api

* Add cross platform crypto api

* Add misc. dependencies

* Create multi-platform tests

* Update package-lock, Add build files

* Pull from upstream

* Fix linting issues, and update build files

* Fix comments issues

* Regenerate types, add source maps

Co-authored-by: bob <bob.varioa@gmail.com>
2022-07-06 16:47:48 -03:00
LuanRT
84d5edb6f0 refactor: rewrite OAuth and Requester (#90)
* chore: update type declarations

* dev: refactor oauth & requester

* chore: tidy things up

* chore: remove unneeded check
2022-07-04 16:34:02 -03:00
LuanRT
d7d6a4e019 style: remove white space 2022-07-03 04:40:26 -03:00
LuanRT
3bdcdf7cf1 chore(docs): add more info about the parser 2022-07-03 04:28:46 -03:00
LuanRT
b314458ed9 chore(docs): rephrase 2022-07-03 01:40:12 -03:00
LuanRT
1d62e469a9 refactor: rewrite Comments Section logic (#88)
* feat: add core comments section classes

* chore: update type declarations

* chore: fix linter warnings

* style: fix linter

* chore: update tests

* chore(tests): fix typo

* chore(tests): fix typo x2

* fix(tests): `getReplies()` method is only present in `CommentThread` and not `Comment`

* chore(tests): fix comment id path

* chore(tests): remove outdated code

* chore(tests): fix results path

* chore: enforce code style

* chore: update type declarations

* docs: add examples and documentation

* chore(docs): fix paths

* chore(docs): fix more paths

* chore(docs): fix `Comments.js` path

* chore(docs): fix typo

* chore(docs): mention example file

* chore(examples): fix imports

* chore(examples): fix typo
2022-07-02 19:55:33 -03:00
Bob Varioa
0a851bde31 refactor: remove confusing code practices (#87)
* Prefer `c ? x : y` over `c && x || y`

* Avoid unnecessary asssignment expressions

* Prefer switch statements over object lookup tables

* Add an .editorconfig

* Fix style issues

* Fix mentioned issues

Co-authored-by: bob <bob.varioa@gmail.com>
2022-07-01 19:37:59 -03:00
LuanRT
3e2b932844 style: format code 2022-06-29 20:57:16 -03:00
LuanRT
263b4887c3 feat(livechat): add LiveChatPaidSticker action 2022-06-29 19:44:33 -03:00
LuanRT
4f994c338b refactor: rewrite Live Chat logic (#85)
* dev: start LiveChat refactor

* dev: implement simple module system to separate classes

+ add a few Live Chat actions

* dev: add fundamental Live Chat classes

* chore: update type declarations

* feat: finalize Live Chat

Now supporting almost all kinds of messages! Next up: add a ability to send messages.

* chore: update type declarations

* chore: update contributors list

* feat(livechat): add `sendMessage()` method

* chore: remove unneeded files

* style: format code

* chore: remove outdated examples

* chore: update tests

* chore: remove trailing spaces

* chore: remove trailing spaces x2
2022-06-29 16:51:51 -03:00
Daniel Krásný
ef9a22e85a feat(ytmusic): multiple video authors (#83)
Parse all `authors` from a music video. For legacy reasons, `author` key is kept returning the first entry. Definitions updated respectively.
2022-06-27 19:15:47 -03:00
Daniel Krásný
8849a01ecf fix(ytmusic): Multiple authors/artists (#82)
(legacy parser)

Changed return types of SongResultItem's key artist and VideoResultItem's key author to array of strings instead of string.
2022-06-27 14:15:42 -03:00
LuanRT
a948c2e480 chore: update issue templates 2022-06-25 03:58:35 -03:00
LuanRT
f5c6dbc63e fix: add PlaylistHeader renderer
#81
2022-06-24 04:26:39 -03:00
LuanRT
829181ba6f chore: remove unneeded code 2022-06-23 15:30:11 -03:00
LuanRT
7ec6d6dd21 feat: add YouTube livechat renderers
Next up: refactor old livechat parser
2022-06-23 03:46:53 -03:00
LuanRT
d2b3eead41 fix: ItemSection target_id not being parsed 2022-06-23 03:13:15 -03:00
LuanRT
96857ccadf feat(ytmusic): expose additional segments in albums 2022-06-23 02:47:03 -03:00
LuanRT
c24e6256c5 chore: fix typo 2022-06-22 19:11:16 -03:00
LuanRT
00c2db791f style: format & remove unneeded code 2022-06-22 19:05:08 -03:00
LuanRT
20556970a7 feat(ytmusic): add support for stations in search results, #78 2022-06-22 05:46:33 -03:00
Daniel Wykerd
1681a9b84c feat(player): improved decipher logic (#79)
* feat(player): improved decipher logic

- Improve the deciphering logic for Signatures and NTokens.
- This makes NToken transforms more than 20x faster
- It also improves caching of the player drastically, by only keeping
the processed responses in binary format. Bringing down the cache
per player from 1.8MB to less than 400 bytes

* fix: linting errors

* fix: tests

* refactor: replace TS enum with ordinary JS objects
2022-06-21 14:29:13 -03:00
LuanRT
b3c5e340af chore: update lock file 2022-06-21 04:08:31 -03:00
LuanRT
bb3f3cc584 fix(ytmusic): check if id is valid before proceeding 2022-06-21 03:59:44 -03:00
LuanRT
86291fe1f9 chore: fix typo 2022-06-21 03:35:49 -03:00
LuanRT
6eef4b746b fix(ytmusic): parse nav endpoints only if they exist
#78
2022-06-21 03:34:56 -03:00
王超毅
4088ef59c6 fix(VideoInfo): Fix the problem that chooseFormat still returns empty even though there are videos to adapt.
when the video exists in 2160p and the default format is mp4, the selected format output is empty
2022-06-21 01:17:55 -03:00
王超毅
4a7c9d7b31 fix(examples): fix download stream callback console video info 2022-06-21 01:17:55 -03:00
LuanRT
36f02cdcdb chore(ytmusic): use optional chaining on duration text 2022-06-20 18:10:35 -03:00
LuanRT
97d4cc1056 feat(ytmusic): add support for retrieving albums 2022-06-20 16:33:51 -03:00
LuanRT
e90285bfab chore: update type declarations 2022-06-20 16:33:12 -03:00
LuanRT
7fc9b526b0 feat(ytmusic): add support for artists
Available through `Innertube#music.getArtist(id: string)`

#78
2022-06-20 06:08:24 -03:00
LuanRT
99b88e2684 chore: update type declarations 2022-06-20 06:05:27 -03:00
LuanRT
748e34758f feat: tidy things up and implement more renderers
- Finished Library parser
- Fixed search continuations
- Improved channel parser
- Improved playlist parser
- Added support for posts of type poll
- Improved History parser
- Removed redundant code
2022-06-20 03:02:42 -03:00
LuanRT
a556aacfdd chore: regenerate type declarations 2022-06-20 02:51:19 -03:00
LuanRT
9ffaaacb3e style: format code 2022-06-18 05:22:54 -03:00
LuanRT
4c7a42d8d4 fix: search continuations should return a Search class
Why? To keep things consistent.
2022-06-18 05:16:21 -03:00
LuanRT
1d2c1ed69b chore: regenerate type declarations 2022-06-18 05:10:53 -03:00
LuanRT
5af2a9972e chore: remove unused var 2022-06-17 16:34:05 -03:00
LuanRT
1efbef6f49 chore(ytmusic): simplify home feed 2022-06-17 16:32:13 -03:00
LuanRT
4e1f6af736 chore: update jsdoc comments 2022-06-17 16:19:52 -03:00
LuanRT
98e7afda87 feat: add suppory for YouTube Music's “Explore” tab 2022-06-17 16:17:24 -03:00
LuanRT
58809c2280 chore: remove unused URLs 2022-06-16 20:58:08 -03:00
LuanRT
1484e3c2aa dev: always use InnerTube prod url 2022-06-16 20:52:00 -03:00
LuanRT
e0546944a8 chore: fix typo 2022-06-16 20:14:31 -03:00
LuanRT
d246008eab chore: add other InnerTube API urls 2022-06-16 20:10:11 -03:00
LuanRT
455556ba89 feat: add all watch history feed action renderers 2022-06-16 16:09:29 -03:00
LuanRT
eaa16244d2 fix(analytics): rename old Thumbnail module path 2022-06-16 15:26:00 -03:00
LuanRT
919a35d024 feat: wrap Library sections around Proxy trap 2022-06-16 15:06:31 -03:00
LuanRT
d54fc282ad chore: remove a few deprecated methods 2022-06-16 14:59:58 -03:00
LuanRT
51f7adf397 fix: rename YouTube Music renderers 2022-06-16 14:51:50 -03:00
Daniel Wykerd
d990fc9b88 fix: lint 2022-06-16 13:46:43 -03:00
Daniel Wykerd
418dcac80a docs(download): examples for downloading videos 2022-06-16 13:46:43 -03:00
Daniel Wykerd
60075f8726 fix: chooseFormat filtering improvements 2022-06-16 13:46:43 -03:00
Daniel Wykerd
41aa54b8d9 fix: download to use getBasicInfo 2022-06-16 13:46:43 -03:00
Daniel Wykerd
662bccf2c2 chore: update .gitignore
Ignore videos and tmp/ directory
2022-06-16 12:03:24 +02:00
LuanRT
abe045762b chore(docs): rephrase 2022-06-15 23:55:57 -03:00
LuanRT
67d526e15d chore(docs): add warning about upcoming changes 2022-06-15 23:54:45 -03:00
LuanRT
940b8322cc chore(docs): add warning about upcoming changes 2022-06-15 23:53:55 -03:00
LuanRT
d6bbe8f183 fix(linter): remove unneeded vars and add jsdoc 2022-06-15 23:29:30 -03:00
LuanRT
28d51fcc4f perf: use getBasicInfo() 2022-06-15 23:29:30 -03:00
LuanRT
e8a81084e6 fix(ytmusic): rename old class types 2022-06-15 23:29:30 -03:00
Daniel Wykerd
4ef546b3f0 fix: emit info Innertube.download 2022-06-15 23:29:30 -03:00
Daniel Wykerd
ec5a2aa7fd fix: decipher 2022-06-15 23:29:30 -03:00
Daniel Wykerd
2cbb0179ae fix: Innertube.download 2022-06-15 23:29:30 -03:00
Daniel Wykerd
b594dad510 fix: missing import 2022-06-15 23:29:30 -03:00
Daniel Wykerd
6d7609c32a feat: download video directly from VideoInfo
As suggested in #45, this also implements a new "best" and
"bestefficiency" format selector.
2022-06-15 23:29:30 -03:00
LuanRT
75e0453f69 fix: stringify ChipCloudChip text
This is required in order for `selectFilter()` to work properly
2022-06-15 19:55:45 -03:00
LuanRT
f6af3faa41 feat: add ThumbnailOverlayInlineUnplayable renderer 2022-06-15 19:36:44 -03:00
LuanRT
3458bb422a feat: add ThumbnailOverlayEndorsement, #75 2022-06-15 19:22:52 -03:00
LuanRT
521029de52 fix: ignore DisplayAd renderer 2022-06-15 19:14:02 -03:00
Daniel Wykerd
4a102878d8 refactor!: feature complete contents parser
* feat: allow setting search params to custom value

This is useful for getting results other than videos, like playlists and
channels.

* feat: add initial parsers for common renderers

* feat: artist search renderers

Added common renderers used when searching artists

* refactor: snake_case

* feat: channel home page renderers

* feat: parsers for more channel tabs

These are needed for channel tabs: Videos, Playlists, Community,
Channels

Additionally, do not merely return text as string, since they may
include links which may be navigated to

* feat: channel full metadata

* feat: renderers for playlists

* refactor!: Actions.browse

Channels should be viewable when not logged in, also added 'navigation'
type for use in NagivationEndpoint in the future.

* feat: home feed parsers

* feat: watch page renderers

* feat: start implementing HomeFeed API

The HomeFeed class remains compatible with the existing API

* feat: generate types using tsc and jsdoc

* feat: browse continuations from navigationEndpoint

* fix: Actions moved to session

This follows commit 1bfe2676d8

* fix: add more typescript config

* chore: use correct spaces and quotes

* feat: Trending API

* feat: reimplement existing channel API

* feat: add base video feed class

* feat: get channel videos

* feat: channel playlists

* feat: get channel community posts

* feat: get channels from channel

* feat: get channel about page data

* feat: add missing channel parsers

this commit also adds regenerated types I've neglected to push

* feat: initial playlist reimplementation

* feat: complete playlist reimplementation

* refactor: change InnertubeError to ES6 class

* fix: some unresolved types

* chore: update types

* feat: wip video details

* feat: get music tracks in video

Possibly an implementation for issue #48

* refactor:  merge parsers (wip)

This is a work in progress.

* fix: add pnpm to ignore

* fix: merge issues

* fix: merge Video and VideoInfo

VideoInfo should be working again.
Also remove the old parsers.

* feat: set matching in Simplify

Still looking into removing Simplify

* fix: ContinuationItem

This `call` method allows for traversal of continuations with the Simplify API
but may be removed in the future

* fix: optionally returned data

* revert: replace ContinuationItem with main

* feat(parser): contents memoization by classname

* feat(channel): working without Simplify

* feat(feed): working continuations

* fix: liniting issues

* feat(feed): filterable feed for home

* feat(feed): tabbed feed for trending & channel

* refactor: remove Simplify completely

* chore: lint

* refactor: alias `items` with `contents`

* refactor: `Search` to extend `Feed`

* fix: Search working

Also added MenuServiceItemDownload

* refactor: move `Channel` and `Playlist`

* fix: pass all tests

* fix: linting errors
2022-06-15 18:31:34 -03:00
LuanRT
43470efb6e chore: remove unused vars - x2 2022-06-15 18:09:25 -03:00
LuanRT
0067ccd438 chore: remove unused vars 2022-06-15 16:49:25 -03:00
LuanRT
62811bd8f1 feat: implement SecondarySearchContainer renderer 2022-06-15 16:46:05 -03:00
LuanRT
71309a0788 fix: oopsie 2022-06-14 20:10:12 -03:00
LuanRT
7e6f944a4b feat: wrap format arrays around proxy trap
This allows users to easily find a format.

Ex:
```js
info.streaming_data.adaptive_formats.get({ quality_label: "720p" });
```
2022-06-14 19:42:44 -03:00
LuanRT
3d0b217743 fix: do not return null if a renderer is not found
This caused the parser to return null when ads or renderers that are not implemented are present.
2022-06-14 17:54:31 -03:00
LuanRT
3c98244c3b fix: refinement cards getter returning undefined 2022-06-14 17:50:12 -03:00
LuanRT
20600fcc04 chore: start docs for v2.0.0 2022-06-14 15:55:56 -03:00
LuanRT
564a5deaec chore: update workflows 2022-06-14 15:30:11 -03:00
LuanRT
54a50d5704 chore(docs): remove unneeded tags 2022-06-14 15:08:37 -03:00
LuanRT
49688a0ad6 chore: fix invalid jsdoc comments 2022-06-14 15:03:45 -03:00
LuanRT
040b382590 chore: use eslint to validate jsdoc 2022-06-14 15:03:05 -03:00
LuanRT
60b67a399c chore: update types 2022-06-14 15:02:28 -03:00
LuanRT
3f22a44ba9 feat: accurately emulate like/dislike button clicks 2022-06-13 17:33:39 -03:00
LuanRT
6aa30648fe chore: update type definitions 2022-06-13 16:23:49 -03:00
LuanRT
5f08be7991 feat: add support for retrieving YouTube Music's home feed 2022-06-13 07:38:49 -03:00
LuanRT
79d6b84dda chore: update types 2022-06-13 07:37:01 -03:00
LuanRT
7142a63b1d feat(ytmusic): add support for retrieving up next 2022-06-13 05:20:56 -03:00
LuanRT
5fd9f7ea83 chore: regenerate types 2022-06-13 05:19:31 -03:00
LuanRT
ee71e6a55f chore: remove unneeded code 2022-06-13 04:26:32 -03:00
LuanRT
b6a898f733 feat: add full support for refinement cards 2022-06-13 04:20:49 -03:00
LuanRT
797c545b80 chore: update type definitions 2022-06-13 04:19:20 -03:00
LuanRT
b3da6b11f8 chore: use null as default value 2022-06-11 08:09:26 -03:00
LuanRT
81bbbaebe2 fix: isn't always available 2022-06-11 08:06:50 -03:00
LuanRT
2254b69670 feat: add support for retrieving YTMusic “related” tab
+ finish lyrics parser and implement all needed YouTube Music renderers
2022-06-11 08:00:58 -03:00
LuanRT
a7ee98820a chore: update type definitions 2022-06-10 17:16:58 -03:00
LuanRT
c7474d7087 feat: add music search filters protobuf message
This allows users to choose filters they want without having to rely on the `selectFilter()` method.
2022-06-10 17:12:06 -03:00
LuanRT
d167a0b807 feat: add support for music search filters 2022-06-10 15:07:23 -03:00
LuanRT
95f713ff53 chore: update type definitions 2022-06-10 15:06:27 -03:00
LuanRT
53965630b7 dev: check if renderer should be ignore before parsing
Will mostly be used to ignore ad renderers.
2022-06-10 04:32:24 -03:00
LuanRT
9840acc63d feat: add support for retrieving watch next feed continuation 2022-06-10 03:57:05 -03:00
LuanRT
1676b11b0e chore: fix typos 2022-06-10 03:37:36 -03:00
LuanRT
afa39753d5 chore: add jsdoc comments to selectFilter method 2022-06-10 03:34:55 -03:00
LuanRT
659df51115 feat(VideoInfo): add support for selecting feed filters 2022-06-10 03:00:25 -03:00
LuanRT
dab89545fe chore: remove unused vars 2022-06-10 01:56:22 -03:00
LuanRT
73de36b946 feat: add merchandise parser 2022-06-10 01:50:21 -03:00
LuanRT
049fd16aab docs: update jsdoc comments 2022-06-09 15:19:46 -03:00
LuanRT
bcaa02f10c chore: update parser's readme 2022-06-09 15:02:28 -03:00
LuanRT
153238aefc dev: finish YouTube Music search parsers 2022-06-09 14:33:26 -03:00
LuanRT
b2014c80f4 dev: create ytmusic class
In future versions anything related to YouTube Music will be implemented here. The main Innertube class will expose it to users as `Innertube#music`.
2022-06-08 20:21:27 -03:00
LuanRT
018092eb78 chore: update type definitions 2022-06-08 20:12:48 -03:00
LuanRT
4ee6ec0d20 refactor: move data access code to /parser 2022-06-08 20:11:05 -03:00
LuanRT
cbac2e1c81 chore: remove unneeded param 2022-06-07 06:03:14 -03:00
LuanRT
fc191ae3d9 chore: remove unneeded super() 2022-06-07 06:00:48 -03:00
LuanRT
0661563656 feat: implement chip cloud & compact renderers 2022-06-07 05:57:28 -03:00
LuanRT
2c3f37191d fix: comments entry point teaser_content always N/A 2022-06-07 03:02:39 -03:00
LuanRT
4f7de3cc50 feat: add support for captions 2022-06-07 02:52:01 -03:00
LuanRT
5ec2a5512e chore: update funding.yml 2022-06-06 21:27:02 -03:00
LuanRT
ebbfb86600 test: a search now returns more than 20 results 2022-06-06 17:28:42 -03:00
LuanRT
07b83a823c feat: finish youtube search parser
The library is now able to parser everything from a search.
2022-06-06 17:19:24 -03:00
LuanRT
688fd55117 chore: add more info to parser's readme 2022-06-06 05:27:07 -03:00
LuanRT
87534c6489 chore(docs): update parser's readme 2022-06-06 04:53:06 -03:00
LuanRT
12618c1a0b chore: fix typo 2022-06-06 04:40:19 -03:00
LuanRT
55fd4e8143 chore: update type definitions 2022-06-06 04:20:28 -03:00
LuanRT
359020193b dev: start parser refactor on the main codebase, see #65 and #44
Things were getting a bit complicated and slow with the old parser so I decided to continue #44's work on the main codebase.
2022-06-06 04:19:14 -03:00
xrip
0b4853cb81 Access axios instance via this.#axios instead of getter 2022-05-31 16:45:56 -03:00
xrip
4ad5a5da64 Access axios instance via this.#axios instead of getter 2022-05-31 16:45:56 -03:00
xrip
f05270daee Share axios instance between modules.
This allows to use axios with http(s) and socks proxies via http(s)Agent and proxy settings.
2022-05-31 16:45:56 -03:00
LuanRT
4ccb4b07b7 chore: update proto 2022-05-30 17:05:33 -03:00
LuanRT
71c4b16654 chore: add notification/record_interactions endpoint 2022-05-30 17:03:38 -03:00
Shubham Parihar
82e8620a77 docs: fix sample code for download example 2022-05-29 15:15:39 -03:00
LuanRT
91dc854668 chore(docs): add getTimeWatched() example 2022-05-28 05:09:17 -03:00
LuanRT
f0565ec924 fix(package): add missing comma 2022-05-28 04:48:47 -03:00
LuanRT
15437e3937 chore(release): v1.4.3
- `Innertube#actions` and `Innertube#oauth` are now public classes so power users can have more control over the instance.
- Implemented all endpoints reverse engineered from the YouTube APK.
- The player script is now cached in the OS tmp folder to avoid permission problems.
- Added support for almost all YouTube search filters.
- Added support for editing channel name and description.
- Added support for retrieving Time Watched and basic channel analytics.
- Added support for comment translation.
- Typings are now generated directly from jsdocs.
- The initial Innertube configuration is now extracted from `/sw.js_data` and the visitor data is generated by the library.
- Refactored the entire library to improve maintainability and performance.
2022-05-28 04:46:30 -03:00
LuanRT
c7c0ac8b54 chore(docs): add examples for editing channel name and description 2022-05-28 04:02:03 -03:00
LuanRT
1e23cdb510 chore: fix typos 2022-05-27 17:28:58 -03:00
LuanRT
a85e9ef667 refactor!: welp, a lot of stuff
- Use the OS temp folder to cache the player, closes #57.
- Added support for editing channel name, closes #40.
- Added support for editing channel description.
- Added support for retrieving basic channel analytics, closes #54.
- Moved `Innertube#getAccountInfo()` to `Innertube#account`, and renamed it to `getInfo()`.
- `getInfo()` is now able to return email, channel id, etc.
- Improved jsdoc.
2022-05-27 08:17:16 -03:00
LuanRT
865b6870a1 refactor!: change getSearchSuggestions response schema 2022-05-27 07:35:00 -03:00
LuanRT
7284425618 chore: remove unneeded code 2022-05-25 04:03:05 -03:00
LuanRT
05f74fe004 feat: implement get_user_mention_suggestions endpoint 2022-05-25 03:56:57 -03:00
LuanRT
864f10f2e9 feat: implement geo/place_autocomplete endpoint
Found this while decompiling the YouTube APK. It is basically Google's Place Autocomplete API, but tweaked for Innertube.
2022-05-25 03:50:34 -03:00
LuanRT
369e1048d1 feat: implement /thumbnails endpoint 2022-05-25 02:29:55 -03:00
LuanRT
b1cf5d33b8 feat: implement channel management endpoints, #40 2022-05-25 01:57:54 -03:00
LuanRT
19008e126d chore: update tests 2022-05-24 06:37:27 -03:00
LuanRT
c525163f28 chore: update type definitions 2022-05-24 06:20:56 -03:00
LuanRT
155dc9bd15 refactor!: change how requests are handled 2022-05-24 06:19:13 -03:00
LuanRT
5560ba3ce4 chore: rephrase comment 2022-05-19 05:14:38 -03:00
LuanRT
6aaf9c70b9 refactor: use /sw.js_data to retrieve initial session data
Seems like the `/sw.js` service worker endpoint has a few peculiarities, see #55
2022-05-19 05:02:22 -03:00
LuanRT
e0c7496e37 style(tests): use single quotes 2022-05-18 07:38:46 -03:00
LuanRT
fa79e5cad2 fix: add default function to obj literals to avoid unexpected errors 2022-05-18 06:24:03 -03:00
LuanRT
98a2b49395 chore: update .eslintignore 2022-05-18 06:01:07 -03:00
LuanRT
17978193d0 chore: update type definitions 2022-05-18 05:58:02 -03:00
LuanRT
13f571a6dc chore: update workflows 2022-05-18 05:57:15 -03:00
LuanRT
9f3f8ad820 style: format code 2022-05-18 05:56:28 -03:00
LuanRT
2ba7a5c64e chore: update dev dependencies 2022-05-18 05:54:05 -03:00
LuanRT
d7d1c96d8c chore: use jest for tests 2022-05-18 05:53:09 -03:00
LuanRT
0219c075c7 chore: add linter 2022-05-18 05:51:54 -03:00
LuanRT
759351c38e feat: add basic channel analytics protobuf message 2022-05-16 15:47:15 -03:00
LuanRT
6312e97f95 chore: use timestamp in seconds for visitorData
YouTube also accepts timestamps in milliseconds, but since all clients generate visitorData with timestamps in seconds then the library should do the same.
2022-05-15 21:49:28 -03:00
LuanRT
c60babcf25 chore: update typings 2022-05-15 18:46:52 -03:00
LuanRT
c48cfcd8a0 chore(docs): add search filters examples 2022-05-15 16:13:54 -03:00
LuanRT
594202d61d chore(package): fix repo url 2022-05-12 18:05:57 -03:00
LuanRT
7a5490452a chore: remove uneeded jsdoc param 2022-05-12 14:47:03 -03:00
LuanRT
b4bb44b797 fix: add missing await key, #51 2022-05-11 06:29:46 -03:00
LuanRT
43f3c3fbf8 feat: add type search filter
The `no_filters` protobuf message was also implemented so playlists, channels, etc can be retrived from a search without any filter. #44
2022-05-11 06:14:25 -03:00
LuanRT
b48ae0b8d3 chore: update search filter protobuf message 2022-05-11 06:09:41 -03:00
LuanRT
8cf3e67f79 chore: fix getTrending() jsdoc, #50 2022-05-11 03:11:43 -03:00
LuanRT
ffa243bc07 chore: update type definitions 2022-05-09 18:47:17 -03:00
LuanRT
a08580eeee chore(docs): rephrase 2022-05-09 18:43:38 -03:00
LuanRT
039ebb7c0c chore(docs): remove unneeded stuff 2022-05-09 18:37:23 -03:00
LuanRT
46a385aa06 chore: fix major bugs and improve error handling
Seems like some methods weren't working due to a typo in the browseId, this commit should fix it. Also, additional checks were added so unexpected errors aren't thrown.
2022-05-09 18:30:22 -03:00
LuanRT
f656ccd690 chore: remove unneeded code 2022-05-09 15:15:28 -03:00
LuanRT
ddd276d99f chore: update .gitignore 2022-05-08 22:59:03 -03:00
LuanRT
5fbeaeabb6 chore: update Utils.js jsdoc 2022-05-08 22:58:41 -03:00
LuanRT
18e62f6ff8 chore: rename variable 2022-05-08 22:35:58 -03:00
LuanRT
6235985871 fix: use polling interval provided by the OAuth server 2022-05-08 22:34:40 -03:00
LuanRT
4eef0ddab0 chore: update jsdoc 2022-05-08 21:51:16 -03:00
LuanRT
6127690b4c docs: oops, forgot the hyperlink 2022-05-08 05:59:21 -03:00
LuanRT
b6cfdb733c feat: generate types using jsdoc, #50 2022-05-08 05:56:33 -03:00
LuanRT
b565213f11 docs: fix typos and reword some stuff 2022-05-08 05:53:05 -03:00
LuanRT
a5c9c9d863 feat: add support for comment translation 2022-05-06 17:50:33 -03:00
LuanRT
cf95d82d3e chore: update comment action protobuf schemas 2022-05-06 17:49:28 -03:00
LuanRT
00e0131672 docs: add git to installation instructions 2022-05-06 02:12:39 -03:00
LuanRT
2315306d9f chore: oops 2022-05-05 16:23:46 -03:00
LuanRT
1dfd4b6263 chore: add more metadata to the error class 2022-05-05 16:21:43 -03:00
LuanRT
b0a861dec8 refactor: generate sessions manually
Session generation has been moved to `core/SessionBuilder.js`, which retrieves & generates all the required data to create a valid session. This should also decrease initialization time by over 600 milliseconds!
2022-05-05 04:33:24 -03:00
LuanRT
4943685e57 refactor: simplify the player class 2022-05-05 04:17:11 -03:00
LuanRT
b773f5668c feat: add visitor data protobuf schema 2022-05-05 04:13:46 -03:00
LuanRT
4fd7371cf3 chore: update tests 2022-05-05 04:12:41 -03:00
LuanRT
16bb879689 chore: use prettyPrint parameter to reduce response sizes 2022-05-02 21:15:36 -03:00
LuanRT
a852cd22c8 chore: generate cpn for videoplayback urls 2022-05-02 21:05:17 -03:00
LuanRT
90bb3e20c0 feat: implement sound search endpoint 2022-05-02 05:07:11 -03:00
LuanRT
eab40c0034 chore: move getTimeWatched() placeholder to Innertube.account 2022-05-02 03:54:14 -03:00
LuanRT
19f7336a48 chore: add jsdoc for debug mode option 2022-05-02 02:10:11 -03:00
LuanRT
75895e5492 chore: update deciphers jsdoc 2022-05-02 01:49:37 -03:00
LuanRT
0cdfac1812 feat: add sound info protobuf schema and remove required keys, #38 2022-05-02 00:22:22 -03:00
LuanRT
446966fb2d chore(docs): add contributors list 2022-05-01 19:50:24 -03:00
LuanRT
29897981f0 feat: finalize protobuf encoder for comment translations 2022-05-01 17:49:23 -03:00
LuanRT
7e8a517de9 chore: add .gitignore file 2022-05-01 17:14:52 -03:00
LuanRT
a8b9487b58 feat: add comment translation protobuf schema 2022-05-01 17:00:56 -03:00
LuanRT
80a338e5ff chore: update compiled proto messages 2022-05-01 03:48:18 -03:00
LuanRT
e2ca022a47 chore: add jsdoc to protobuf encoders 2022-05-01 03:16:45 -03:00
luan.lrt4@gmail.com
2ebcd49f02 chore: remove unneeded async key 2022-05-01 00:14:18 -03:00
luan.lrt4@gmail.com
98a62c31da chore: remove unneeded code 2022-04-30 23:39:52 -03:00
luan.lrt4@gmail.com
1bfe2676d8 refactor!: handle all request errors in Request.js and add debug mode 2022-04-30 23:16:17 -03:00
luan.lrt4@gmail.com
4db0a0358f fix: remove unneeded if statement, #43 2022-04-29 18:49:44 -03:00
luan.lrt4@gmail.com
6bdccb89e5 chore: update protobuf messages 2022-04-28 03:12:10 -03:00
luan.lrt4@gmail.com
bbfecdb015 chore(docs): update badge 2022-04-28 01:52:41 -03:00
luan.lrt4@gmail.com
f79d4b635d feat: full support for playlist management, closes #36 2022-04-26 04:27:03 -03:00
luan.lrt4@gmail.com
283c06e64f chore: remove unneeded semicolon 2022-04-26 04:05:02 -03:00
luan.lrt4@gmail.com
5c572dba66 chore(docs): update badges 2022-04-26 03:52:29 -03:00
luan.lrt4@gmail.com
aa943a46a8 chore: update workflows 2022-04-25 02:44:54 -03:00
luan.lrt4@gmail.com
d634892b01 chore: update tests 2022-04-24 22:58:29 -03:00
luan.lrt4@gmail.com
2010714f50 fix: uncaught exception when retrieving private playlists 2022-04-24 22:52:21 -03:00
luan.lrt4@gmail.com
c6c96fd223 chore(docs): rephrasing 2022-04-22 16:03:04 -03:00
luan.lrt4@gmail.com
db41fa40d2 chore: bump version to 1.4.2 2022-04-22 00:53:05 -03:00
luan.lrt4@gmail.com
02ece1ddda chore: fix typo 2022-04-22 00:32:43 -03:00
luan.lrt4@gmail.com
b175e02f6d chore: oops 2022-04-22 00:27:03 -03:00
luan.lrt4@gmail.com
d3394f846a feat: add support for reporting comments and add comments sorting option 2022-04-22 00:22:50 -03:00
luan.lrt4@gmail.com
07b73ab78d chore: remove unneeded code 2022-04-20 06:19:36 -03:00
luan.lrt4@gmail.com
d743b5a088 refactor: use a single axios instance and remove redundant code 2022-04-20 06:18:07 -03:00
luan.lrt4@gmail.com
bb206c044c chore(tests): update signature decipher path 2022-04-20 03:55:14 -03:00
luan.lrt4@gmail.com
d48065405d chore: use compiled protobuf schemas to reduce dependency footprint 2022-04-20 03:52:44 -03:00
luan.lrt4@gmail.com
dbc8b62ba2 feat: add option to change geolocation & fix minor bugs, closes #34 2022-04-19 05:35:11 -03:00
luan.lrt4@gmail.com
e32981728b chore(release): add support for trending content and release v1.4.1 2022-04-17 22:27:42 -03:00
luan.lrt4@gmail.com
7b33dcbb79 chore: fix typo 2022-04-16 23:04:47 -03:00
LuanRT
4c6bf49bbe chore(docs): add signOut() example 2022-04-16 22:49:07 -03:00
luan.lrt4@gmail.com
4bbc2d50f4 refactor!: move everything that needs parsing to parser and improve oauth system 2022-04-16 22:08:01 -03:00
luan.lrt4@gmail.com
440d80063d chore: update typings 2022-04-16 22:02:17 -03:00
luan.lrt4@gmail.com
c49147523a chore: update tests 2022-04-16 21:20:21 -03:00
luan.lrt4@gmail.com
e221c79448 chore: move type definitions to its own folder 2022-04-15 14:43:56 -03:00
LuanRT
291d04e703 chore: add type definitions (WIP) 2022-04-15 13:52:25 -03:00
luan.lrt4@gmail.com
12baec0b0d feat: method to bulk add videos to a playlist 2022-04-15 05:59:44 -03:00
luan.lrt4@gmail.com
b793c61fd8 chore: oops 2022-04-15 05:28:12 -03:00
luan.lrt4@gmail.com
b9e15b5fbd feat: add support for playlist creation/deletion 2022-04-15 05:25:52 -03:00
luan.lrt4@gmail.com
d0c54f2b8b chore(docs): remove whitespace 2022-04-15 05:21:49 -03:00
Vorticalbox
6ff984df66 remove: unneeded comment
removed left over comment i added when writing this
2022-04-15 08:54:55 +01:00
Vorticalbox
4fa2e5c127 Create index.d.ts 2022-04-15 08:49:07 +01:00
luan.lrt4@gmail.com
725f186bd9 chore: add YouTube Studio api url (WIP) 2022-04-15 01:00:09 -03:00
luan.lrt4@gmail.com
07340931a0 chore(tests): use results from ytmusic 2022-04-13 18:56:19 -03:00
luan.lrt4@gmail.com
46d62bf83f chore: add more tests for better coverage 2022-04-13 18:50:23 -03:00
luan.lrt4@gmail.com
c28da62ec1 fix: ytmusic search suggestions not working, closes #20 2022-04-13 18:30:52 -03:00
luan.lrt4@gmail.com
c7fc18b516 feat (ytmusic): add support for singles in top result 2022-04-13 18:07:28 -03:00
luan.lrt4@gmail.com
7230a2d927 chore: fix typos 2022-04-13 01:51:03 -03:00
luan.lrt4@gmail.com
924693349c chore: remove unneeded file 2022-04-13 01:48:33 -03:00
luan.lrt4@gmail.com
1ab302319d refactor!: rewrite parser and refactor project structure, closes #19 2022-04-13 01:47:57 -03:00
luan.lrt4@gmail.com
bbc1d0135b deps: add new dependency 2022-04-04 13:59:34 -03:00
luan.lrt4@gmail.com
9c1e34c9ab feat: implement pagination, refactor some methods & better error handling 2022-04-04 13:56:22 -03:00
luan.lrt4@gmail.com
c5eea2b4ff feat: implement pagination for all endpoints 2022-04-04 13:52:59 -03:00
luan.lrt4@gmail.com
60130f4d0f refactor: add utility to access deep object properties 2022-04-04 13:51:27 -03:00
luan.lrt4@gmail.com
5090c572d5 chore(release): v1.3.8 2022-03-30 23:52:28 -03:00
luan.lrt4@gmail.com
c9c72d0f31 feat: add support for comment replies, like and dislike 2022-03-30 23:31:11 -03:00
luan.lrt4@gmail.com
7635f49191 chore: add comment reply/action prototbuf messages 2022-03-30 14:33:22 -03:00
luan.lrt4@gmail.com
c932e65dad chore: simplify livechat logic and fix yt search suggestions 2022-03-28 14:18:49 -03:00
luan.lrt4@gmail.com
23717aab11 chore: rephrase comment 2022-03-26 05:42:53 -03:00
luan.lrt4@gmail.com
85df28a7fb feat: add support for channels (WIP) 2022-03-26 05:35:16 -03:00
luan.lrt4@gmail.com
9f4970b3ee refactor: separate protobuf stuff from utilities 2022-03-26 05:33:49 -03:00
luan.lrt4@gmail.com
82bbc715ff fix: playlists and home feed should work when logged out 2022-03-23 03:18:40 -03:00
1585 changed files with 220670 additions and 4126 deletions

12
.editorconfig Normal file
View File

@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false

12
.github/FUNDING.yml vendored
View File

@@ -1,12 +0,0 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: luanrt
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

View File

@@ -1,19 +0,0 @@
---
name: Feature Request
about: Use this template for requesting new features
title: "[FEATURE NAME]"
labels: enhancement
assignees:
---
## Expected Behavior
Please describe the behavior you are expecting
## Current Behavior
What is the current behavior?
## Sample Code
If applicable, provide a sample code snippet that demonstrates the gist of the feature you're proposing. This can be either from a usage standpoint, or an implementation standpoint.

View File

@@ -1,39 +0,0 @@
---
name: Issue Report
about: Use this template to report a problem
title: "[VERSION] [PROBLEM SUMMARY]"
labels: bug
assignees:
---
## Expected Behavior
Please describe the behavior you are expecting
## Current Behavior
What is the current behavior?
## Failure Information (for bugs)
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
### Steps to Reproduce
Please provide detailed steps for reproducing the issue.
1. step 1
2. step 2
3. you get it...
### Failure Logs
Please include any relevant log snippets or files here.
## Checklist
- [ ] I am running the latest version
- [ ] I checked the documentation and found no answer
- [ ] I checked to make sure that this issue has not already been filed
- [ ] I'm reporting the issue to the correct repository (for multi-repository projects)
- [ ] I have provided sufficient information

View File

@@ -1,15 +0,0 @@
---
name: Question
about: Use this template to ask a question about the project
title: "[QUESTION SUMMARY]"
labels: question
assignees:
---
## Question
State your question
## Sample Code
Please include relevant code snippets or files that provide context for your question.

View File

@@ -1 +1 @@
blank_issues_enabled: false
blank_issues_enabled: true

33
.github/ISSUE_TEMPLATE/feature.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Feature request
description: Use this template to suggest new features
labels: [enhancement]
body:
- type: textarea
id: feature-description
attributes:
label: Describe your suggestion
placeholder: How would it work?
validations:
required: true
- type: textarea
id: other-details
attributes:
label: Other details
placeholder: |
Additional details and attachments.
- type: checkboxes
id: checklist
attributes:
label: Checklist
options:
- label: I am running the latest version.
required: true
- label: I checked the documentation and found no answer.
required: true
- label: I have searched the existing issues and made sure this is not a duplicate.
required: true
- label: I have provided sufficient information.
required: true

77
.github/ISSUE_TEMPLATE/issue.yml vendored Normal file
View File

@@ -0,0 +1,77 @@
name: Issue Report
title: "<version> <title>"
description: Use this template to report a problem
labels: [bug]
body:
- type: textarea
id: reproduce-steps
attributes:
label: Steps to reproduce
description: Please provide detailed steps for reproducing the issue.
placeholder: |
Example:
1. Step 1
2. Step 2
3. You get it..
validations:
required: true
- type: textarea
id: failure-logs
attributes:
label: Failure Logs
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: What did you expect to happen?
validations:
required: true
- type: textarea
id: current-behavior
attributes:
label: Current behavior
description: What is the current behavior?
validations:
required: true
- type: dropdown
id: version
attributes:
label: Version
description: What version of the library are you running?
options:
- Default
- Edge
validations:
required: true
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
- type: checkboxes
id: checklist
attributes:
label: Checklist
options:
- label: I am running the latest version.
required: false
- label: I checked the documentation and found no answer.
required: true
- label: I have searched the existing issues and made sure this is not a duplicate.
required: true
- label: I have provided sufficient information.
required: true

33
.github/ISSUE_TEMPLATE/question.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Question
description: Use this template to ask a question about the project
labels: [question]
body:
- type: textarea
id: question
attributes:
label: Question
placeholder: What do you want to know?
validations:
required: true
- type: textarea
id: other-details
attributes:
label: Other details
placeholder: |
Additional details and attachments.
- type: checkboxes
id: checklist
attributes:
label: Checklist
options:
- label: I am running the latest version.
required: true
- label: I checked the documentation and found no answer.
required: true
- label: I have searched the existing issues and made sure this is not a duplicate.
required: true
- label: I have provided sufficient information.
required: true

View File

@@ -1,27 +0,0 @@
# Pull Request Template
## Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
## Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
## Checklist:
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] I have checked my code and corrected any misspellings

53
.github/labeler_config.yml vendored Normal file
View File

@@ -0,0 +1,53 @@
version: 1
labels:
- label: "breaking-change"
title: "^refactor!:.*"
- label: "github"
files:
- ".github/.*"
- label: "git"
files:
- ".gitignore"
- ".gitattributes"
- label: "tests"
files:
- "test/.*"
- label: "docs"
files:
- "docs/.*"
- "README.md"
- label: "parser"
files:
- "src/parser/.*"
- "src/Innertube.ts"
- label: "core"
files:
- "src/core/.*"
- label: "protobuf"
files:
- "src/proto/.*"
- label: "xsmall-diff"
size-below: 10
- label: "small-diff"
size-above: 9
size-below: 100
- label: "medium-diff"
size-above: 99
size-below: 500
- label: "large-diff"
size-above: 499
size-below: 1000
- label: "xlarge-diff"
size-above: 999

6
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,6 @@
<!-- Thank you for submitting a Pull Request! Please:
* Read our contributing guidelines: https://github.com/LuanRT/YouTube.js/blob/main/CONTRIBUTING.md
* Add "Fixes #<issue_number>" to the PR description if you are fixing an issue.
* Ensure that the code is up-to-date with the `main` branch.
* Include a description of the proposed changes and how to test them.
-->

14
.github/workflows/labeler.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
name: Label PRs
on:
- pull_request_target
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: srvaroa/labeler@master
with:
config_path: .github/labeler_config.yml
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

18
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm ci
- run: npm run lint

View File

@@ -1,29 +0,0 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 14.x, 15.x, 16.x ]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test

61
.github/workflows/release-please.yml vendored Normal file
View File

@@ -0,0 +1,61 @@
name: release-please
on:
push:
branches:
- main
jobs:
release-please:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: node
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Build for Deno
run: |
npm ci
npm run build:deno
if: ${{ steps.release.outputs.release_created }}
- name: Move Deno files
run: |
mkdir build
mv deno build/deno
cp deno.ts build/deno.ts
cp {LICENSE,README.md} build
if: ${{ steps.release.outputs.release_created }}
- name: Push to the Deno branch
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: deno
FOLDER: ./build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_EMPTY_COMMITS: true
MESSAGE: "chore: ${{ steps.release.outputs.tag_name }} release"
TAG: ${{ steps.release.outputs.tag_name }}-deno
if: ${{ steps.release.outputs.release_created }}
- name: Remove Deno folder
run: rm -rf build
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
if: ${{ steps.release.outputs.release_created }}
- name: Publish package to npmjs
run: |
npm ci
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}

View File

@@ -8,12 +8,11 @@ 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.'
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.'
stale-pr-message: 'This PR has been automatically marked as stale because it has not had recent activity. Remove the stale label or comment or this will be closed in 2 days'
days-before-stale: 6
days-before-close: 2
any-of-issue-labels: 'needs-more-info,cannot-reproduce,question,help-wanted'
days-before-stale: 60
days-before-close: 4

18
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run test

83
.gitignore vendored Normal file
View File

@@ -0,0 +1,83 @@
# YouTube player cache directory
cache/
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Coverage directory used by tools like istanbul
coverage
*.lcov
# Dependency directories
node_modules/
jspm_packages/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
# pnpm
.pnpm-debug.log*
pnpm-lock.yaml
# Downloaded assets
*.mp4
*.m4a
*.webm
*.mkv
# Temporary files for testing
tmp/
# Build output
dist/
bundle/*.js.*
bundle/*.js
bundle/*.cjs
bundle/*.cjs.*
deno/
# VSCode files
.vscode/
# Webstorm files
.idea/
# MacOS
.DS_Store
*.bin

8
.npmignore Normal file
View File

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

1017
CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

20
COLLABORATORS.md Normal file
View File

@@ -0,0 +1,20 @@
# Collaborators
This page lists the collaborators who have contributed to the development and success of the project.
## [LuanRT](https://github.com/LuanRT)
[![Github Sponsors](https://img.shields.io/badge/donate-30363D?style=flat-square&logo=GitHub-Sponsors&logoColor=#white)](https://github.com/sponsors/LuanRT)
Owner and maintainer.
## [Wykerd](https://github.com/wykerd/)
Initial parser implementation, several bug fixes, major refactorings and general maintenance.
## [MasterOfBob777](https://github.com/MasterOfBob777)
Bug fixes and TypeScript support.
## [patrickkfkan](https://github.com/patrickkfkan)
Major refactorings, improved YouTube Music support, and bug fixes.
## [Absidue](https://github.com/absidue)
Several bug fixes, new features & improved MPD support.

66
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,66 @@
Welcome to YouTube.js! We're thrilled to have you interested in contributing to our project. As a community-driven project, we believe in the power of collaboration and look forward to working with you. To get started, please follow our guidelines:
## Issues
### Creating a new issue
Before creating a new issue, we recommend searching for similar or related issues to avoid duplication efforts. However, if you can't find one, you're more than welcome to create a new issue using a relevant issue form. Please make sure to describe the issue as clearly and concisely as possible.
### Solving an issue
If you want to lend a hand by solving an issue, it's always good to browse existing issues to find one that grabs your attention. You can narrow down the search using tags as filters. If you find an issue you'd like to help with, please feel free to open a Pull Request with a fix. We appreciate documentation updates and grammar fixes too!
## Making Changes
1. Fork the repository on GitHub.
2. Ensure that you have the latest Node.js v16 version installed.
3. Create a working branch and start making your changes and improvements!
### Committing updates
When you're done with the changes, make sure to commit them. Don't forget to write a clear, descriptive commit message. We recommend following the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
### Creating a Pull Request
Once you're happy with your updates, create a pull request on GitHub. This is the most efficient way to get your contribution reviewed and eventually merged into our codebase.
- Use the pull request template to fill in the necessary details.
- If you're solving an issue, link the pull request to that issue.
- Enable the checkbox to allow maintainers to edit the branch and update it for merging.
- Changes may be required before we can merge your changes, and we'll let you know what needs to be done.
### Testing, Linting, and Building
We have some automated processes set up for testing, linting, and building. Please run the following commands to test, lint, and build your code before submitting it:
Testing:
```sh
npm run test
```
Linting:
```sh
npm run lint
```
Building:
```sh
# Build all
npm run build
# Protobuf
npm run build:proto
# Parser map
npm run build:parser-map
# Deno
npm run build:deno
# ES Module
npm run build:esm
# Node
npm run bundle:node
# Browser
npm run bundle:browser
npm run bundle:browser:prod
```
We appreciate your efforts and contributions to YouTube.js! Together, we can make this project even better.

View File

@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.

1005
README.md

File diff suppressed because it is too large Load Diff

1
bundle/browser.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
export * from '../dist/src/platform/lib.js';

1
bundle/node.d.cts Normal file
View File

@@ -0,0 +1 @@
export * from '../dist/src/platform/lib.js';

3
deno.ts Normal file
View File

@@ -0,0 +1,3 @@
export * from './deno/src/platform/deno.ts';
import Innertube from './deno/src/platform/deno.ts';
export default Innertube;

View File

@@ -0,0 +1,124 @@
/**
* @param {import('typescript').Program} program
* @param {import('ts-patch').PluginConfig} pluginConfig
* @param {import('ts-patch').TransformerExtras} extras
*/
module.exports = (program, pluginConfig, { ts: tsInstance }) => {
/** @param {import('typescript').TransformationContext} context */
return (context) => {
const { factory } = context
/** @param {import('typescript').SourceFile} sourceFile */
return (sourceFile) => {
/**
* @param {import('typescript').Node} node
* @returns {import('typescript').Node}
*/
const visitor = (node) => {
if (
tsInstance.isEnumDeclaration(node) &&
(!node.modifiers || node.modifiers.every(modifier => modifier.kind !== tsInstance.SyntaxKind.DeclareKeyword))
) {
let variableStatementModifiers
if (node.modifiers?.some(modifier => modifier.kind === tsInstance.SyntaxKind.ExportKeyword)) {
variableStatementModifiers = [
factory.createModifier(tsInstance.SyntaxKind.ExportKeyword)
]
}
const properties = []
let currentValue = 0
for (const member of node.members) {
const name = member.name.text
let value
let isNumeric = true
let hasMinus = false
if (!member.initializer) {
value = currentValue.toString()
currentValue++
} else if (tsInstance.isStringLiteral(member.initializer)) {
value = member.initializer.text
isNumeric = false
} else if (tsInstance.isNumericLiteral(member.initializer)) {
value = member.initializer.text
currentValue = Number(value) + 1
} else if (
tsInstance.isPrefixUnaryExpression(member.initializer) &&
member.initializer.operator === tsInstance.SyntaxKind.MinusToken
) {
value = member.initializer.operand.text
hasMinus = true
currentValue = (-1 * Number(value)) + 1
} else {
console.warn(`Unsupported enum member initializer "${tsInstance.SyntaxKind[member.initializer.kind]}" in "${node.name.text}", using original enum output.`)
return tsInstance.visitEachChild(node, visitor, context);
}
if (isNumeric) {
if (hasMinus) {
properties.push(
factory.createPropertyAssignment(
name,
factory.createPrefixUnaryExpression(
tsInstance.SyntaxKind.MinusToken,
factory.createNumericLiteral(value)
)
),
factory.createPropertyAssignment(
factory.createStringLiteral(`-${value}`),
factory.createStringLiteral(name)
)
)
} else {
properties.push(
factory.createPropertyAssignment(
name,
factory.createNumericLiteral(value)
),
factory.createPropertyAssignment(
value,
factory.createStringLiteral(name)
)
)
}
} else {
properties.push(
factory.createPropertyAssignment(
name,
factory.createStringLiteral(value)
)
)
}
}
const convertedEnum = factory.createVariableStatement(
variableStatementModifiers,
factory.createVariableDeclarationList(
[
factory.createVariableDeclaration(
factory.createIdentifier(node.name.text),
undefined,
undefined,
factory.createObjectLiteralExpression(
properties,
true
)
)
],
tsInstance.NodeFlags.Const
)
)
return convertedEnum
}
return tsInstance.visitEachChild(node, visitor, context);
};
return tsInstance.visitNode(sourceFile, visitor);
}
}
}

View File

@@ -0,0 +1,42 @@
import glob from 'glob';
import path from 'path';
import fs from 'fs';
import url from 'url';
const import_list = [];
const misc_imports = [];
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
glob.sync('../src/parser/classes/**/*.{js,ts}', { cwd: __dirname })
.forEach((file) => {
// Trim path
const is_misc = file.includes('/misc/');
file = file.replace('../src/parser/classes/', '').replace('.js', '').replace('.ts', '');
const import_name = file.split('/').pop();
if (is_misc) {
const class_name = file.split('/').pop().replace('.js', '').replace('.ts', '');
misc_imports.push(`export { default as ${class_name} } from './classes/${file}.js';`);
} else {
import_list.push(`export { default as ${import_name} } from './classes/${file}.js';`);
}
});
fs.writeFileSync(
path.resolve(__dirname, '../src/parser/nodes.ts'),
`// This file was auto generated, do not edit.
// See ./scripts/build-parser-map.js
${import_list.join('\n')}
`
);
fs.writeFileSync(
path.resolve(__dirname, '../src/parser/misc.ts'),
`// This file was auto generated, do not edit.
// See ./scripts/build-parser-map.js
${misc_imports.join('\n')}
`
);

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

@@ -0,0 +1,48 @@
import { fetch } from 'undici';
import { gunzip } from 'zlib';
import { dirname, resolve } from 'path';
import { fileURLToPath } from 'url';
import { writeFile } from 'fs/promises';
const __dirname = dirname(fileURLToPath(import.meta.url));
const buf = await (await fetch('https://github.com/intoli/user-agents/blob/master/src/user-agents.json.gz?raw=true')).arrayBuffer();
const bytes = new Uint8Array(buf);
// Only get desktop and mobile agents
const allowed_agents = new Set([
'desktop',
'mobile'
]);
const decompressed = await new Promise((resolve, reject) => {
gunzip(bytes, (err, result) => {
if (err) {
reject(err);
} else {
resolve(result.buffer);
}
});
});
const contents = new TextDecoder().decode(decompressed);
const agents = JSON.parse(contents);
if (!Array.isArray(agents)) {
throw new Error('Invalid user-agents.json');
}
const agentsByDevice = agents.reduce((acc, agent) => {
const device = agent.deviceCategory;
if (!allowed_agents.has(device))
return acc;
if (!acc[device]) {
acc[device] = [];
}
// We dont want to massive of a list of agents for each device
if (acc[device].length <= 25) acc[device].push(agent.userAgent);
return acc;
}, {});
await writeFile(resolve(__dirname, '..', 'src', 'utils', 'user-agents.ts'), `/* eslint-disable */\n/* Generated file do not edit */\nexport default ${JSON.stringify(agentsByDevice, null, 2)} as { desktop: string[], mobile: string[] };`);

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

@@ -0,0 +1,415 @@
# youtubei.js
## References
### AddToPlaylistServiceRequest
Re-exports [AddToPlaylistServiceRequest](namespaces/APIResponseTypes/type-aliases/AddToPlaylistServiceRequest.md)
***
### AppendContinuationItemsAction
Re-exports [AppendContinuationItemsAction](namespaces/YTNodes/classes/AppendContinuationItemsAction.md)
***
### BrowseRequest
Re-exports [BrowseRequest](namespaces/APIResponseTypes/type-aliases/BrowseRequest.md)
***
### BrowseRequestSupportedMetadata
Re-exports [BrowseRequestSupportedMetadata](namespaces/APIResponseTypes/type-aliases/BrowseRequestSupportedMetadata.md)
***
### ContinuationRequest
Re-exports [ContinuationRequest](namespaces/APIResponseTypes/type-aliases/ContinuationRequest.md)
***
### CpnSource
Re-exports [CpnSource](namespaces/APIResponseTypes/type-aliases/CpnSource.md)
***
### CreateCommentRequest
Re-exports [CreateCommentRequest](namespaces/APIResponseTypes/type-aliases/CreateCommentRequest.md)
***
### CreatePlaylistServiceRequest
Re-exports [CreatePlaylistServiceRequest](namespaces/APIResponseTypes/type-aliases/CreatePlaylistServiceRequest.md)
***
### default
Renames and re-exports [Innertube](classes/Innertube.md)
***
### DeletePlaylistServiceRequest
Re-exports [DeletePlaylistServiceRequest](namespaces/APIResponseTypes/type-aliases/DeletePlaylistServiceRequest.md)
***
### FeedbackContext
Re-exports [FeedbackContext](namespaces/APIResponseTypes/type-aliases/FeedbackContext.md)
***
### FeedbackRequest
Re-exports [FeedbackRequest](namespaces/APIResponseTypes/type-aliases/FeedbackRequest.md)
***
### FormData
Re-exports [FormData](namespaces/APIResponseTypes/type-aliases/FormData.md)
***
### GetAccountsListInnertubeRequest
Re-exports [GetAccountsListInnertubeRequest](namespaces/APIResponseTypes/type-aliases/GetAccountsListInnertubeRequest.md)
***
### GetKidsBlocklistPickerRequest
Re-exports [GetKidsBlocklistPickerRequest](namespaces/APIResponseTypes/type-aliases/GetKidsBlocklistPickerRequest.md)
***
### IBotguardChallenge
Re-exports [IBotguardChallenge](namespaces/APIResponseTypes/interfaces/IBotguardChallenge.md)
***
### IBrowseResponse
Re-exports [IBrowseResponse](namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)
***
### IEndpoint
Re-exports [IEndpoint](namespaces/APIResponseTypes/interfaces/IEndpoint.md)
***
### IGetChallengeResponse
Re-exports [IGetChallengeResponse](namespaces/APIResponseTypes/type-aliases/IGetChallengeResponse.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)
***
### InlineSettingStatus
Re-exports [InlineSettingStatus](namespaces/APIResponseTypes/type-aliases/InlineSettingStatus.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)
***
### IRawBotguardChallenge
Re-exports [IRawBotguardChallenge](namespaces/APIResponseTypes/interfaces/IRawBotguardChallenge.md)
***
### IRawPlayerConfig
Re-exports [IRawPlayerConfig](namespaces/APIResponseTypes/interfaces/IRawPlayerConfig.md)
***
### IRawResponse
Re-exports [IRawResponse](namespaces/APIResponseTypes/interfaces/IRawResponse.md)
***
### IRawTrustedResource
Re-exports [IRawTrustedResource](namespaces/APIResponseTypes/interfaces/IRawTrustedResource.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)
***
### ITrustedResource
Re-exports [ITrustedResource](namespaces/APIResponseTypes/interfaces/ITrustedResource.md)
***
### IUpdatedMetadataResponse
Re-exports [IUpdatedMetadataResponse](namespaces/APIResponseTypes/type-aliases/IUpdatedMetadataResponse.md)
***
### LikeRequest
Re-exports [LikeRequest](namespaces/APIResponseTypes/type-aliases/LikeRequest.md)
***
### LikeTarget
Re-exports [LikeTarget](namespaces/APIResponseTypes/type-aliases/LikeTarget.md)
***
### LiveChatItemContextMenuRequest
Re-exports [LiveChatItemContextMenuRequest](namespaces/APIResponseTypes/type-aliases/LiveChatItemContextMenuRequest.md)
***
### ModifyChannelNotificationPreferenceRequest
Re-exports [ModifyChannelNotificationPreferenceRequest](namespaces/APIResponseTypes/type-aliases/ModifyChannelNotificationPreferenceRequest.md)
***
### NextNavendpoint
Re-exports [NextNavendpoint](namespaces/APIResponseTypes/type-aliases/NextNavendpoint.md)
***
### PerformCommentActionRequest
Re-exports [PerformCommentActionRequest](namespaces/APIResponseTypes/type-aliases/PerformCommentActionRequest.md)
***
### PlaylistEditRequest
Re-exports [PlaylistEditRequest](namespaces/APIResponseTypes/type-aliases/PlaylistEditRequest.md)
***
### PlaylistPrivacyStatus
Re-exports [PlaylistPrivacyStatus](namespaces/APIResponseTypes/type-aliases/PlaylistPrivacyStatus.md)
***
### RawData
Re-exports [RawData](namespaces/APIResponseTypes/type-aliases/RawData.md)
***
### RawNode
Re-exports [RawNode](namespaces/APIResponseTypes/type-aliases/RawNode.md)
***
### ReelWatchRequest
Re-exports [ReelWatchRequest](namespaces/APIResponseTypes/type-aliases/ReelWatchRequest.md)
***
### SearchRequest
Re-exports [SearchRequest](namespaces/APIResponseTypes/type-aliases/SearchRequest.md)
***
### ShareEntityServiceRequest
Re-exports [ShareEntityServiceRequest](namespaces/APIResponseTypes/type-aliases/ShareEntityServiceRequest.md)
***
### SubscribeRequest
Re-exports [SubscribeRequest](namespaces/APIResponseTypes/type-aliases/SubscribeRequest.md)
***
### UnsubscribeRequest
Re-exports [UnsubscribeRequest](namespaces/APIResponseTypes/type-aliases/UnsubscribeRequest.md)
***
### WatchNextRequest
Re-exports [WatchNextRequest](namespaces/APIResponseTypes/type-aliases/WatchNextRequest.md)
***
### WatchRequest
Re-exports [WatchRequest](namespaces/APIResponseTypes/type-aliases/WatchRequest.md)
## Namespaces
- [APIResponseTypes](namespaces/APIResponseTypes/README.md)
- [Clients](namespaces/Clients/README.md)
- [Constants](namespaces/Constants/README.md)
- [FormatUtils](namespaces/FormatUtils/README.md)
- [Generator](namespaces/Generator/README.md)
- [Helpers](namespaces/Helpers/README.md)
- [Log](namespaces/Log/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)
- [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)

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

@@ -0,0 +1,135 @@
[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:49](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Actions.ts#L49)
## Properties
### session
> **session**: [`Session`](Session.md)
#### Defined in
[src/core/Actions.ts:47](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Actions.ts#L47)
## 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`
**args.skip\_auth\_check?**: `boolean`
##### Returns
`Promise`\<[`ParsedResponse`](../type-aliases/ParsedResponse.md)\<`T`\>\>
##### Defined in
[src/core/Actions.ts:93](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Actions.ts#L93)
#### 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`
**args.skip\_auth\_check?**: `boolean`
##### Returns
`Promise`\<[`ApiResponse`](../interfaces/ApiResponse.md)\>
##### Defined in
[src/core/Actions.ts:100](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Actions.ts#L100)
***
### 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:71](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Actions.ts#L71)

View File

@@ -0,0 +1,241 @@
[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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/continuations.ts#L143)
***
### token
> **token**: `string`
#### Defined in
[src/parser/continuations.ts:145](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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`
The types to cast to
#### Returns
`InstanceType`\<`K`\[`number`\]\>
The node cast to one of the given types
#### Throws
If the node is not of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:38](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L38)
***
### 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:50](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L50)
***
### 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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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:60](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L60)

View File

@@ -0,0 +1,221 @@
[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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/continuations.ts#L220)
## Properties
### request
> **request**: `string`
#### Defined in
[src/parser/continuations.ts:217](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/continuations.ts#L217)
***
### token
> **token**: `string`
#### Defined in
[src/parser/continuations.ts:218](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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`
The types to cast to
#### Returns
`InstanceType`\<`K`\[`number`\]\>
The node cast to one of the given types
#### Throws
If the node is not of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:38](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L38)
***
### 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:50](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L50)
***
### 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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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:60](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L60)

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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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,235 @@
[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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/continuations.ts#L114)
## Properties
### continuation
> **continuation**: `string`
#### Defined in
[src/parser/continuations.ts:111](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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`
The types to cast to
#### Returns
`InstanceType`\<`K`\[`number`\]\>
The node cast to one of the given types
#### Throws
If the node is not of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:38](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L38)
***
### 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:50](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L50)
***
### 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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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:60](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L60)

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:22](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/utils/HTTPClient.ts#L22)
## 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:28](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/utils/HTTPClient.ts#L28)
## 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:32](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/utils/HTTPClient.ts#L32)

View File

@@ -0,0 +1,702 @@
[youtubei.js](../README.md) / Innertube
# Class: Innertube
Provides access to various services and modules in the YouTube API.
## Example
```ts
import { Innertube, UniversalCache } from 'youtubei.js';
const innertube = await Innertube.create({ cache: new UniversalCache(true)});
```
## Constructors
### new Innertube()
> **new Innertube**(`session`): [`Innertube`](Innertube.md)
#### Parameters
**session**: [`Session`](Session.md)
#### Returns
[`Innertube`](Innertube.md)
#### Defined in
[src/Innertube.ts:65](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L65)
## 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:588](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L588)
***
### actions
> `get` **actions**(): [`Actions`](Actions.md)
An internal class used to dispatch requests.
#### Returns
[`Actions`](Actions.md)
#### Defined in
[src/Innertube.ts:609](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L609)
***
### 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:602](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L602)
***
### 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:581](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L581)
***
### 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:567](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L567)
***
### 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:595](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L595)
***
### session
> `get` **session**(): [`Session`](Session.md)
The session used by this instance.
#### Returns
[`Session`](Session.md)
#### Defined in
[src/Innertube.ts:616](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L616)
***
### 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:574](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L574)
## 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)
**args**
**args.parse**: `true`
##### Returns
`Promise`\<`T`\>
##### Defined in
[src/Innertube.ts:558](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L558)
#### 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:559](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L559)
***
### 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:448](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L448)
***
### getAttestationChallenge()
> **getAttestationChallenge**(`engagement_type`, `ids`?): `Promise`\<[`IGetChallengeResponse`](../namespaces/APIResponseTypes/type-aliases/IGetChallengeResponse.md)\>
Fetches an attestation challenge.
#### Parameters
**engagement\_type**: [`EngagementType`](../namespaces/Types/type-aliases/EngagementType.md)
**ids?**: `Record`\<`string`, `any`\>[]
#### Returns
`Promise`\<[`IGetChallengeResponse`](../namespaces/APIResponseTypes/type-aliases/IGetChallengeResponse.md)\>
#### Defined in
[src/Innertube.ts:544](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L544)
***
### 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:116](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L116)
***
### 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:367](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L367)
***
### 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:361](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L361)
***
### 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:282](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L282)
***
### getCourses()
> **getCourses**(): `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:349](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L349)
***
### getGuide()
> **getGuide**(): `Promise`\<[`Guide`](../namespaces/YT/classes/Guide.md)\>
#### Returns
`Promise`\<[`Guide`](../namespaces/YT/classes/Guide.md)\>
#### Defined in
[src/Innertube.ts:326](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L326)
***
### 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:407](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L407)
***
### getHistory()
> **getHistory**(): `Promise`\<[`History`](../namespaces/YT/classes/History.md)\>
#### Returns
`Promise`\<[`History`](../namespaces/YT/classes/History.md)\>
#### Defined in
[src/Innertube.ts:337](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L337)
***
### getHomeFeed()
> **getHomeFeed**(): `Promise`\<[`HomeFeed`](../namespaces/YT/classes/HomeFeed.md)\>
#### Returns
`Promise`\<[`HomeFeed`](../namespaces/YT/classes/HomeFeed.md)\>
#### Defined in
[src/Innertube.ts:320](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L320)
***
### 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:73](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L73)
***
### getLibrary()
> **getLibrary**(): `Promise`\<[`Library`](../namespaces/YT/classes/Library.md)\>
#### Returns
`Promise`\<[`Library`](../namespaces/YT/classes/Library.md)\>
#### Defined in
[src/Innertube.ts:331](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L331)
***
### getNotifications()
> **getNotifications**(): `Promise`\<[`NotificationsMenu`](../namespaces/YT/classes/NotificationsMenu.md)\>
#### Returns
`Promise`\<[`NotificationsMenu`](../namespaces/YT/classes/NotificationsMenu.md)\>
#### Defined in
[src/Innertube.ts:374](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L374)
***
### 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:394](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L394)
***
### 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:388](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L388)
***
### getPost()
> **getPost**(`post_id`, `channel_id`): `Promise`\<[`Feed`](../namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)\>\>
Gets a post page given a post id and the channel id
#### Parameters
**post\_id**: `string`
**channel\_id**: `string`
#### Returns
`Promise`\<[`Feed`](../namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)\>\>
#### Defined in
[src/Innertube.ts:468](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L468)
***
### getPostComments()
> **getPostComments**(`post_id`, `channel_id`, `sort_by`?): `Promise`\<[`Comments`](../namespaces/YT/classes/Comments.md)\>
Gets the comments of a post.
#### Parameters
**post\_id**: `string`
**channel\_id**: `string`
**sort\_by?**: `"TOP_COMMENTS"` \| `"NEWEST_FIRST"`
#### Returns
`Promise`\<[`Comments`](../namespaces/YT/classes/Comments.md)\>
#### Defined in
[src/Innertube.ts:492](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L492)
***
### getSearchSuggestions()
> **getSearchSuggestions**(`query`, `previous_query`?): `Promise`\<`string`[]\>
#### Parameters
**query**: `string`
**previous\_query?**: `string`
#### Returns
`Promise`\<`string`[]\>
#### Defined in
[src/Innertube.ts:255](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L255)
***
### 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:146](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L146)
***
### 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:433](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L433)
***
### 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:355](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L355)
***
### 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:343](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L343)
***
### getUnseenNotificationsCount()
> **getUnseenNotificationsCount**(): `Promise`\<`number`\>
#### Returns
`Promise`\<`number`\>
#### Defined in
[src/Innertube.ts:379](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L379)
***
### resolveURL()
> **resolveURL**(`url`): `Promise`\<[`NavigationEndpoint`](../namespaces/YTNodes/classes/NavigationEndpoint.md)\>
Resolves the given URL.
#### Parameters
**url**: `string`
#### Returns
`Promise`\<[`NavigationEndpoint`](../namespaces/YTNodes/classes/NavigationEndpoint.md)\>
#### Defined in
[src/Innertube.ts:456](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L456)
***
### 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:179](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L179)
***
### 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:69](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/Innertube.ts#L69)

View File

@@ -0,0 +1,221 @@
[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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/continuations.ts#L12)
***
### continuation?
> `optional` **continuation**: `string`
#### Defined in
[src/parser/continuations.ts:13](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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`
The types to cast to
#### Returns
`InstanceType`\<`K`\[`number`\]\>
The node cast to one of the given types
#### Throws
If the node is not of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:38](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L38)
***
### 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:50](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L50)
***
### 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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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:60](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L60)

View File

@@ -0,0 +1,291 @@
[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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/continuations.ts#L159)
***
### continuation
> **continuation**: [`Continuation`](Continuation.md)
#### Defined in
[src/parser/continuations.ts:171](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/continuations.ts#L171)
***
### emojis
> **emojis**: `object`[]
#### Defined in
[src/parser/continuations.ts:165](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L8)
***
### viewer\_name
> **viewer\_name**: `string`
#### Defined in
[src/parser/continuations.ts:172](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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`
The types to cast to
#### Returns
`InstanceType`\<`K`\[`number`\]\>
The node cast to one of the given types
#### Throws
If the node is not of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:38](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L38)
***
### 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:50](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L50)
***
### 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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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:60](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L60)

View File

@@ -0,0 +1,221 @@
[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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/continuations.ts#L84)
***
### continuation
> **continuation**: `string`
#### Defined in
[src/parser/continuations.ts:83](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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`
The types to cast to
#### Returns
`InstanceType`\<`K`\[`number`\]\>
The node cast to one of the given types
#### Throws
If the node is not of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:38](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L38)
***
### 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:50](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L50)
***
### 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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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:60](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L60)

View File

@@ -0,0 +1,221 @@
[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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/continuations.ts#L97)
***
### continuation
> **continuation**: `string`
#### Defined in
[src/parser/continuations.ts:96](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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`
The types to cast to
#### Returns
`InstanceType`\<`K`\[`number`\]\>
The node cast to one of the given types
#### Throws
If the node is not of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:38](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L38)
***
### 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:50](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L50)
***
### 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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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:60](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L60)

View File

@@ -0,0 +1,211 @@
[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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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`
The types to cast to
#### Returns
`InstanceType`\<`K`\[`number`\]\>
The node cast to one of the given types
#### Throws
If the node is not of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:38](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L38)
***
### 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:50](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L50)
***
### 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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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:60](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L60)

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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/OAuth2.ts#L44)
***
### YTTV\_URL
> **YTTV\_URL**: `URL`
#### Defined in
[src/core/OAuth2.ts:38](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/OAuth2.ts#L54)
***
### pollForAccessToken()
> **pollForAccessToken**(`device_and_user_code`): `void`
#### Parameters
**device\_and\_user\_code**: [`DeviceAndUserCode`](../type-aliases/DeviceAndUserCode.md)
#### Returns
`void`
#### Defined in
[src/core/OAuth2.ts:130](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/OAuth2.ts#L85)
***
### shouldRefreshToken()
> **shouldRefreshToken**(): `boolean`
#### Returns
`boolean`
#### Defined in
[src/core/OAuth2.ts:313](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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:19](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/utils/Utils.ts#L19)
## Methods
### load()
> `static` **load**(`platform`): `void`
#### Parameters
**platform**: [`PlatformShim`](../namespaces/Types/interfaces/PlatformShim.md)
#### Returns
`void`
#### Defined in
[src/utils/Utils.ts:16](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/utils/Utils.ts#L16)

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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Player.ts#L13)
***
### player\_id
> **player\_id**: `string`
#### Defined in
[src/core/Player.ts:11](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Player.ts#L14)
***
### sts
> **sts**: `number`
#### Defined in
[src/core/Player.ts:12](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Player.ts#L12)
## Accessors
### url
> `get` **url**(): `string`
#### Returns
`string`
#### Defined in
[src/core/Player.ts:261](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Player.ts#L261)
***
### LIBRARY\_VERSION
> `get` `static` **LIBRARY\_VERSION**(): `number`
#### Returns
`number`
#### Defined in
[src/core/Player.ts:265](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Player.ts#L265)
## 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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Player.ts#L24)
***
### extractNSigSourceCode()
> `static` **extractNSigSourceCode**(`data`): `undefined` \| `string`
#### Parameters
**data**: `string`
#### Returns
`undefined` \| `string`
#### Defined in
[src/core/Player.ts:245](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Player.ts#L245)
***
### extractSigSourceCode()
> `static` **extractSigSourceCode**(`data`): `undefined` \| `string`
#### Parameters
**data**: `string`
#### Returns
`undefined` \| `string`
#### Defined in
[src/core/Player.ts:226](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Player.ts#L194)

View File

@@ -0,0 +1,221 @@
[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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/continuations.ts#L129)
***
### continuation
> **continuation**: `string`
#### Defined in
[src/parser/continuations.ts:128](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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`
The types to cast to
#### Returns
`InstanceType`\<`K`\[`number`\]\>
The node cast to one of the given types
#### Throws
If the node is not of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:38](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L38)
***
### 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:50](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L50)
***
### 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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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:60](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L60)

View File

@@ -0,0 +1,231 @@
[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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/continuations.ts#L54)
***
### slot?
> `optional` **slot**: `string`
#### Defined in
[src/parser/continuations.ts:55](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/continuations.ts#L55)
***
### target\_id
> **target\_id**: `string`
#### Defined in
[src/parser/continuations.ts:53](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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`
The types to cast to
#### Returns
`InstanceType`\<`K`\[`number`\]\>
The node cast to one of the given types
#### Throws
If the node is not of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:38](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L38)
***
### 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:50](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L50)
***
### 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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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:60](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L60)

View File

@@ -0,0 +1,221 @@
[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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/continuations.ts#L69)
***
### continuation
> **continuation**: `string`
#### Defined in
[src/parser/continuations.ts:68](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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`
The types to cast to
#### Returns
`InstanceType`\<`K`\[`number`\]\>
The node cast to one of the given types
#### Throws
If the node is not of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:38](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L38)
***
### 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:50](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L50)
***
### 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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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:60](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L60)

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

@@ -0,0 +1,667 @@
[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:237](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L237)
## Properties
### account\_index
> **account\_index**: `number`
#### Defined in
[src/core/Session.ts:232](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L232)
***
### actions
> **actions**: [`Actions`](Actions.md)
#### Defined in
[src/core/Session.ts:228](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L228)
***
### api\_version
> **api\_version**: `string`
#### Defined in
[src/core/Session.ts:231](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L231)
***
### cache?
> `optional` **cache**: [`ICache`](../namespaces/Types/interfaces/ICache.md)
#### Defined in
[src/core/Session.ts:229](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L229)
***
### context
> **context**: [`Context`](../type-aliases/Context.md)
#### Defined in
[src/core/Session.ts:223](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L223)
***
### cookie?
> `optional` **cookie**: `string`
#### Defined in
[src/core/Session.ts:234](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L234)
***
### http
> **http**: [`HTTPClient`](HTTPClient.md)
#### Defined in
[src/core/Session.ts:226](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L226)
***
### key
> **key**: `string`
#### Defined in
[src/core/Session.ts:230](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L230)
***
### logged\_in
> **logged\_in**: `boolean`
#### Defined in
[src/core/Session.ts:227](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L227)
***
### oauth
> **oauth**: [`OAuth2`](OAuth2.md)
#### Defined in
[src/core/Session.ts:225](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L225)
***
### player?
> `optional` **player**: [`Player`](Player.md)
#### Defined in
[src/core/Session.ts:224](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L224)
***
### po\_token?
> `optional` **po\_token**: `string`
#### Defined in
[src/core/Session.ts:233](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L233)
***
### user\_agent?
> `optional` **user\_agent**: `string`
#### Defined in
[src/core/Session.ts:235](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L235)
## Accessors
### client\_name
> `get` **client\_name**(): `string`
#### Returns
`string`
#### Defined in
[src/core/Session.ts:594](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L594)
***
### client\_version
> `get` **client\_version**(): `string`
#### Returns
`string`
#### Defined in
[src/core/Session.ts:590](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L590)
***
### lang
> `get` **lang**(): `string`
#### Returns
`string`
#### Defined in
[src/core/Session.ts:598](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L598)
## 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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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:254](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L254)
#### 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:255](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L255)
#### 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:256](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L256)
#### 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:257](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L257)
***
### 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:263](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L263)
#### 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:264](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L264)
#### 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:265](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L265)
***
### 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:557](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L557)
***
### 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:580](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L580)
***
### 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:271](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L271)
***
### 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:302](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L302)
***
### getSessionData()
> `static` **getSessionData**(`lang`, `location`, `account_index`, `visitor_data`, `user_agent`, `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` = `''`
**user\_agent**: `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:341](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Session.ts#L341)

View File

@@ -0,0 +1,221 @@
[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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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`
The types to cast to
#### Returns
`InstanceType`\<`K`\[`number`\]\>
The node cast to one of the given types
#### Throws
If the node is not of the given type
#### Inherited from
[`YTNode`](../namespaces/Helpers/classes/YTNode.md).[`as`](../namespaces/Helpers/classes/YTNode.md#as)
#### Defined in
[src/parser/helpers.ts:38](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L38)
***
### 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:50](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L50)
***
### 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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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:60](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/helpers.ts#L60)

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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/utils/Cache.ts#L15)

View File

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

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:21](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Actions.ts#L21)
***
### status\_code
> **status\_code**: `number`
#### Defined in
[src/core/Actions.ts:20](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Actions.ts#L20)
***
### success
> **success**: `boolean`
#### Defined in
[src/core/Actions.ts:19](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/core/Actions.ts#L19)

View File

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

View File

@@ -0,0 +1,66 @@
[youtubei.js](../../README.md) / APIResponseTypes
# APIResponseTypes
## Index
### Interfaces
- [IBotguardChallenge](interfaces/IBotguardChallenge.md)
- [IEndpoint](interfaces/IEndpoint.md)
- [IParsedResponse](interfaces/IParsedResponse.md)
- [IPlayabilityStatus](interfaces/IPlayabilityStatus.md)
- [IPlaybackTracking](interfaces/IPlaybackTracking.md)
- [IPlayerConfig](interfaces/IPlayerConfig.md)
- [IRawBotguardChallenge](interfaces/IRawBotguardChallenge.md)
- [IRawPlayerConfig](interfaces/IRawPlayerConfig.md)
- [IRawResponse](interfaces/IRawResponse.md)
- [IRawTrustedResource](interfaces/IRawTrustedResource.md)
- [IResponseContext](interfaces/IResponseContext.md)
- [IServiceTrackingParams](interfaces/IServiceTrackingParams.md)
- [IStreamingData](interfaces/IStreamingData.md)
- [ITrustedResource](interfaces/ITrustedResource.md)
### Type Aliases
- [AddToPlaylistServiceRequest](type-aliases/AddToPlaylistServiceRequest.md)
- [BrowseRequest](type-aliases/BrowseRequest.md)
- [BrowseRequestSupportedMetadata](type-aliases/BrowseRequestSupportedMetadata.md)
- [ContinuationRequest](type-aliases/ContinuationRequest.md)
- [CpnSource](type-aliases/CpnSource.md)
- [CreateCommentRequest](type-aliases/CreateCommentRequest.md)
- [CreatePlaylistServiceRequest](type-aliases/CreatePlaylistServiceRequest.md)
- [DeletePlaylistServiceRequest](type-aliases/DeletePlaylistServiceRequest.md)
- [FeedbackContext](type-aliases/FeedbackContext.md)
- [FeedbackRequest](type-aliases/FeedbackRequest.md)
- [FormData](type-aliases/FormData.md)
- [GetAccountsListInnertubeRequest](type-aliases/GetAccountsListInnertubeRequest.md)
- [GetKidsBlocklistPickerRequest](type-aliases/GetKidsBlocklistPickerRequest.md)
- [IBrowseResponse](type-aliases/IBrowseResponse.md)
- [IGetChallengeResponse](type-aliases/IGetChallengeResponse.md)
- [IGetNotificationsMenuResponse](type-aliases/IGetNotificationsMenuResponse.md)
- [IGetTranscriptResponse](type-aliases/IGetTranscriptResponse.md)
- [IGuideResponse](type-aliases/IGuideResponse.md)
- [INextResponse](type-aliases/INextResponse.md)
- [InlineSettingStatus](type-aliases/InlineSettingStatus.md)
- [IPlayerResponse](type-aliases/IPlayerResponse.md)
- [IResolveURLResponse](type-aliases/IResolveURLResponse.md)
- [ISearchResponse](type-aliases/ISearchResponse.md)
- [IUpdatedMetadataResponse](type-aliases/IUpdatedMetadataResponse.md)
- [LikeRequest](type-aliases/LikeRequest.md)
- [LikeTarget](type-aliases/LikeTarget.md)
- [LiveChatItemContextMenuRequest](type-aliases/LiveChatItemContextMenuRequest.md)
- [ModifyChannelNotificationPreferenceRequest](type-aliases/ModifyChannelNotificationPreferenceRequest.md)
- [NextNavendpoint](type-aliases/NextNavendpoint.md)
- [PerformCommentActionRequest](type-aliases/PerformCommentActionRequest.md)
- [PlaylistEditRequest](type-aliases/PlaylistEditRequest.md)
- [PlaylistPrivacyStatus](type-aliases/PlaylistPrivacyStatus.md)
- [RawData](type-aliases/RawData.md)
- [RawNode](type-aliases/RawNode.md)
- [ReelWatchRequest](type-aliases/ReelWatchRequest.md)
- [SearchRequest](type-aliases/SearchRequest.md)
- [ShareEntityServiceRequest](type-aliases/ShareEntityServiceRequest.md)
- [SubscribeRequest](type-aliases/SubscribeRequest.md)
- [UnsubscribeRequest](type-aliases/UnsubscribeRequest.md)
- [WatchNextRequest](type-aliases/WatchNextRequest.md)
- [WatchRequest](type-aliases/WatchRequest.md)

View File

@@ -0,0 +1,53 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IBotguardChallenge
# Interface: IBotguardChallenge
## Properties
### client\_experiments\_state\_blob
> **client\_experiments\_state\_blob**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:93](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L93)
***
### global\_name
> **global\_name**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:92](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L92)
***
### interpreter\_hash
> **interpreter\_hash**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:90](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L90)
***
### interpreter\_url
> **interpreter\_url**: [`ITrustedResource`](ITrustedResource.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:89](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L89)
***
### program
> **program**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:91](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L91)

View File

@@ -0,0 +1,35 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IEndpoint
# Interface: IEndpoint\<T\>
## Type Parameters
**T** = `any`
## Methods
### buildRequest()
> **buildRequest**(): `T`
#### Returns
`T`
#### Defined in
[src/parser/types/CommandEndpoints.ts:3](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L3)
***
### getApiPath()
> **getApiPath**(): `string`
#### Returns
`string`
#### Defined in
[src/parser/types/CommandEndpoints.ts:2](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L2)

View File

@@ -0,0 +1,511 @@
[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:30](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L30)
***
### actions\_memo?
> `optional` **actions\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:31](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L31)
***
### 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:54](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L54)
***
### annotations?
> `optional` **annotations**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`PlayerAnnotationsExpanded`](../../YTNodes/classes/PlayerAnnotationsExpanded.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:66](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L66)
***
### background?
> `optional` **background**: [`MusicThumbnail`](../../YTNodes/classes/MusicThumbnail.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:27](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L27)
***
### bg\_challenge?
> `optional` **bg\_challenge**: [`IBotguardChallenge`](IBotguardChallenge.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:29](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L29)
***
### captions?
> `optional` **captions**: [`PlayerCaptionsTracklist`](../../YTNodes/classes/PlayerCaptionsTracklist.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:64](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L64)
***
### cards?
> `optional` **cards**: [`CardCollection`](../../YTNodes/classes/CardCollection.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:69](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L69)
***
### challenge?
> `optional` **challenge**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:28](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L28)
***
### contents?
> `optional` **contents**: [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:32](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L32)
***
### contents\_memo?
> `optional` **contents\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:33](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L33)
***
### continuation?
> `optional` **continuation**: [`Continuation`](../../../classes/Continuation.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:47](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L47)
***
### 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:48](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L48)
***
### continuation\_contents\_memo?
> `optional` **continuation\_contents\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:50](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L50)
***
### continuation\_endpoint?
> `optional` **continuation\_endpoint**: [`YTNode`](../../Helpers/classes/YTNode.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:78](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L78)
***
### 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:70](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L70)
***
### current\_video\_endpoint?
> `optional` **current\_video\_endpoint**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:62](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L62)
***
### endpoint?
> `optional` **endpoint**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:63](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L63)
***
### endscreen?
> `optional` **endscreen**: [`Endscreen`](../../YTNodes/classes/Endscreen.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:68](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L68)
***
### engagement\_panels?
> `optional` **engagement\_panels**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`EngagementPanelSectionList`](../../YTNodes/classes/EngagementPanelSectionList.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:74](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L74)
***
### entries?
> `optional` **entries**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)[]
#### Defined in
[src/parser/types/ParsedResponse.ts:76](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L76)
***
### entries\_memo?
> `optional` **entries\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:77](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L77)
***
### estimated\_results?
> `optional` **estimated\_results**: `number`
#### Defined in
[src/parser/types/ParsedResponse.ts:56](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L56)
***
### header?
> `optional` **header**: [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:34](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L34)
***
### header\_memo?
> `optional` **header\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:35](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L35)
***
### items?
> `optional` **items**: [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:75](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L75)
***
### items\_memo?
> `optional` **items\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:40](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L40)
***
### 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:38](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L38)
***
### 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:39](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L39)
***
### metadata?
> `optional` **metadata**: [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:51](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L51)
***
### microformat?
> `optional` **microformat**: [`YTNode`](../../Helpers/classes/YTNode.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:52](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L52)
***
### on\_response\_received\_actions?
> `optional` **on\_response\_received\_actions**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`AppendContinuationItemsAction`](../../YTNodes/classes/AppendContinuationItemsAction.md) \| [`OpenPopupAction`](../../YTNodes/classes/OpenPopupAction.md) \| [`NavigateAction`](../../../classes/NavigateAction.md) \| [`ShowMiniplayerCommand`](../../../classes/ShowMiniplayerCommand.md) \| [`ReloadContinuationItemsCommand`](../../../classes/ReloadContinuationItemsCommand.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:41](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L41)
***
### on\_response\_received\_actions\_memo?
> `optional` **on\_response\_received\_actions\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:42](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L42)
***
### on\_response\_received\_commands?
> `optional` **on\_response\_received\_commands**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`AppendContinuationItemsAction`](../../YTNodes/classes/AppendContinuationItemsAction.md) \| [`OpenPopupAction`](../../YTNodes/classes/OpenPopupAction.md) \| [`NavigateAction`](../../../classes/NavigateAction.md) \| [`ShowMiniplayerCommand`](../../../classes/ShowMiniplayerCommand.md) \| [`ReloadContinuationItemsCommand`](../../../classes/ReloadContinuationItemsCommand.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:45](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L45)
***
### on\_response\_received\_commands\_memo?
> `optional` **on\_response\_received\_commands\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:46](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L46)
***
### on\_response\_received\_endpoints?
> `optional` **on\_response\_received\_endpoints**: [`ObservedArray`](../../Helpers/type-aliases/ObservedArray.md)\<[`AppendContinuationItemsAction`](../../YTNodes/classes/AppendContinuationItemsAction.md) \| [`OpenPopupAction`](../../YTNodes/classes/OpenPopupAction.md) \| [`NavigateAction`](../../../classes/NavigateAction.md) \| [`ShowMiniplayerCommand`](../../../classes/ShowMiniplayerCommand.md) \| [`ReloadContinuationItemsCommand`](../../../classes/ReloadContinuationItemsCommand.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:43](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L43)
***
### on\_response\_received\_endpoints\_memo?
> `optional` **on\_response\_received\_endpoints\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:44](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L44)
***
### overlay?
> `optional` **overlay**: [`YTNode`](../../Helpers/classes/YTNode.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:53](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L53)
***
### playability\_status?
> `optional` **playability\_status**: [`IPlayabilityStatus`](IPlayabilityStatus.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:59](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L59)
***
### playback\_tracking?
> `optional` **playback\_tracking**: [`IPlaybackTracking`](IPlaybackTracking.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:58](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L58)
***
### player\_config?
> `optional` **player\_config**: [`IPlayerConfig`](IPlayerConfig.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:61](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L61)
***
### player\_overlays?
> `optional` **player\_overlays**: [`SuperParsedResult`](../../Helpers/classes/SuperParsedResult.md)\<[`YTNode`](../../Helpers/classes/YTNode.md)\>
#### Defined in
[src/parser/types/ParsedResponse.ts:57](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L57)
***
### player\_response?
> `optional` **player\_response**: [`IPlayerResponse`](../type-aliases/IPlayerResponse.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:79](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L79)
***
### refinements?
> `optional` **refinements**: `string`[]
#### Defined in
[src/parser/types/ParsedResponse.ts:55](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L55)
***
### sidebar?
> `optional` **sidebar**: [`YTNode`](../../Helpers/classes/YTNode.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:36](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L36)
***
### sidebar\_memo?
> `optional` **sidebar\_memo**: [`Memo`](../../Helpers/classes/Memo.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:37](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L37)
***
### storyboards?
> `optional` **storyboards**: [`PlayerStoryboardSpec`](../../YTNodes/classes/PlayerStoryboardSpec.md) \| [`PlayerLiveStoryboardSpec`](../../YTNodes/classes/PlayerLiveStoryboardSpec.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:67](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L67)
***
### streaming\_data?
> `optional` **streaming\_data**: [`IStreamingData`](IStreamingData.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:60](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L60)
***
### video\_details?
> `optional` **video\_details**: [`VideoDetails`](../../Misc/classes/VideoDetails.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:65](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L65)
***
### watch\_next\_response?
> `optional` **watch\_next\_response**: [`INextResponse`](../type-aliases/INextResponse.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:80](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L80)

View File

@@ -0,0 +1,53 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IPlayabilityStatus
# Interface: IPlayabilityStatus
## Properties
### audio\_only\_playability
> **audio\_only\_playability**: `null` \| [`AudioOnlyPlayability`](../../YTNodes/classes/AudioOnlyPlayability.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:103](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L103)
***
### embeddable
> **embeddable**: `boolean`
#### Defined in
[src/parser/types/ParsedResponse.ts:104](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L104)
***
### error\_screen
> **error\_screen**: `null` \| [`YTNode`](../../Helpers/classes/YTNode.md)
#### Defined in
[src/parser/types/ParsedResponse.ts:102](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L102)
***
### reason
> **reason**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:105](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L105)
***
### status
> **status**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:101](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L101)

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:98](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L98)
***
### videostats\_watchtime\_url
> **videostats\_watchtime\_url**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:97](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L97)

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:109](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L109)
***
### 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:117](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L117)
***
### stream\_selection\_config
> **stream\_selection\_config**: `object`
#### max\_bitrate
> **max\_bitrate**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:114](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L114)

View File

@@ -0,0 +1,53 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IRawBotguardChallenge
# Interface: IRawBotguardChallenge
## Properties
### clientExperimentsStateBlob
> **clientExperimentsStateBlob**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:50](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L50)
***
### globalName
> **globalName**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:49](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L49)
***
### interpreterHash
> **interpreterHash**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:47](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L47)
***
### interpreterUrl
> **interpreterUrl**: [`IRawTrustedResource`](IRawTrustedResource.md)
#### Defined in
[src/parser/types/RawResponse.ts:46](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L46)
***
### program
> **program**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:48](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L48)

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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L25)

View File

@@ -0,0 +1,495 @@
[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:63](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L63)
***
### alerts?
> `optional` **alerts**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:71](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L71)
***
### annotations?
> `optional` **annotations**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:107](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L107)
***
### background?
> `optional` **background**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:55](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L55)
***
### bgChallenge?
> `optional` **bgChallenge**: [`IRawBotguardChallenge`](IRawBotguardChallenge.md)
#### Defined in
[src/parser/types/RawResponse.ts:56](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L56)
***
### captions?
> `optional` **captions**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:105](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L105)
***
### cards?
> `optional` **cards**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:110](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L110)
***
### challenge?
> `optional` **challenge**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:57](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L57)
***
### contents?
> `optional` **contents**: [`RawData`](../type-aliases/RawData.md)
#### Defined in
[src/parser/types/RawResponse.ts:58](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L58)
***
### continuation?
> `optional` **continuation**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:67](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L67)
***
### continuationContents?
> `optional` **continuationContents**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:62](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L62)
***
### cpnInfo?
> `optional` **cpnInfo**: `object`
#### cpn
> **cpn**: `string`
#### cpnSource
> **cpnSource**: [`CpnSource`](../type-aliases/CpnSource.md)
#### Defined in
[src/parser/types/RawResponse.ts:111](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L111)
***
### currentVideoEndpoint?
> `optional` **currentVideoEndpoint**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:101](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L101)
***
### endpoint?
> `optional` **endpoint**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:104](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L104)
***
### endscreen?
> `optional` **endscreen**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:109](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L109)
***
### engagementPanels?
> `optional` **engagementPanels**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:117](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L117)
***
### entries?
> `optional` **entries**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:118](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L118)
***
### estimatedResults?
> `optional` **estimatedResults**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:73](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L73)
***
### frameworkUpdates?
> `optional` **frameworkUpdates**: `any`
#### Defined in
[src/parser/types/RawResponse.ts:116](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L116)
***
### header?
> `optional` **header**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:65](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L65)
***
### items?
> `optional` **items**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:115](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L115)
***
### liveChatItemContextMenuSupportedRenderers?
> `optional` **liveChatItemContextMenuSupportedRenderers**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:64](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L64)
***
### metadata?
> `optional` **metadata**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:68](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L68)
***
### microformat?
> `optional` **microformat**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:69](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L69)
***
### onResponseReceivedActions?
> `optional` **onResponseReceivedActions**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:59](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L59)
***
### onResponseReceivedCommands?
> `optional` **onResponseReceivedCommands**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:61](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L61)
***
### onResponseReceivedEndpoints?
> `optional` **onResponseReceivedEndpoints**: [`RawNode`](../type-aliases/RawNode.md)[]
#### Defined in
[src/parser/types/RawResponse.ts:60](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L60)
***
### overlay?
> `optional` **overlay**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:70](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L70)
***
### 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:83](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L83)
***
### 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:75](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L75)
***
### playerConfig?
> `optional` **playerConfig**: [`IRawPlayerConfig`](IRawPlayerConfig.md)
#### Defined in
[src/parser/types/RawResponse.ts:98](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L98)
***
### playerOverlays?
> `optional` **playerOverlays**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:74](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L74)
***
### playerResponse?
> `optional` **playerResponse**: [`IRawResponse`](IRawResponse.md)
#### Defined in
[src/parser/types/RawResponse.ts:99](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L99)
***
### playlistId?
> `optional` **playlistId**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:103](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L103)
***
### refinements?
> `optional` **refinements**: `string`[]
#### Defined in
[src/parser/types/RawResponse.ts:72](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L72)
***
### responseContext?
> `optional` **responseContext**: [`IResponseContext`](IResponseContext.md)
#### Defined in
[src/parser/types/RawResponse.ts:54](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L54)
***
### sidebar?
> `optional` **sidebar**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:66](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L66)
***
### storyboards?
> `optional` **storyboards**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:108](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L108)
***
### 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:90](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L90)
***
### unseenCount?
> `optional` **unseenCount**: `number`
#### Defined in
[src/parser/types/RawResponse.ts:102](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L102)
***
### videoDetails?
> `optional` **videoDetails**: [`RawNode`](../type-aliases/RawNode.md)
#### Defined in
[src/parser/types/RawResponse.ts:106](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L106)
***
### watchNextResponse?
> `optional` **watchNextResponse**: [`IRawResponse`](IRawResponse.md)
#### Defined in
[src/parser/types/RawResponse.ts:100](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L100)

View File

@@ -0,0 +1,23 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IRawTrustedResource
# Interface: IRawTrustedResource
## Properties
### privateDoNotAccessOrElseSafeScriptWrappedValue?
> `optional` **privateDoNotAccessOrElseSafeScriptWrappedValue**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:42](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L42)
***
### privateDoNotAccessOrElseTrustedResourceUrlWrappedValue?
> `optional` **privateDoNotAccessOrElseTrustedResourceUrlWrappedValue**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:41](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L41)

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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L8)
***
### service
> **service**: `string`
#### Defined in
[src/parser/types/RawResponse.ts:7](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/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:132](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L132)
***
### dash\_manifest\_url?
> `optional` **dash\_manifest\_url**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:133](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L133)
***
### expires
> **expires**: `Date`
#### Defined in
[src/parser/types/ParsedResponse.ts:130](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L130)
***
### formats
> **formats**: [`Format`](../../Misc/classes/Format.md)[]
#### Defined in
[src/parser/types/ParsedResponse.ts:131](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L131)
***
### hls\_manifest\_url?
> `optional` **hls\_manifest\_url**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:134](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L134)
***
### server\_abr\_streaming\_url?
> `optional` **server\_abr\_streaming\_url**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:135](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L135)

View File

@@ -0,0 +1,23 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / ITrustedResource
# Interface: ITrustedResource
## Properties
### private\_do\_not\_access\_or\_else\_safe\_script\_wrapped\_value?
> `optional` **private\_do\_not\_access\_or\_else\_safe\_script\_wrapped\_value**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:85](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L85)
***
### private\_do\_not\_access\_or\_else\_trusted\_resource\_url\_wrapped\_value?
> `optional` **private\_do\_not\_access\_or\_else\_trusted\_resource\_url\_wrapped\_value**: `string`
#### Defined in
[src/parser/types/ParsedResponse.ts:84](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L84)

View File

@@ -0,0 +1,27 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / AddToPlaylistServiceRequest
# Type Alias: AddToPlaylistServiceRequest
> **AddToPlaylistServiceRequest**: `object`
## Type declaration
### excludeWatchLater?
> `optional` **excludeWatchLater**: `boolean`
### params?
> `optional` **params**: `string`
### playlistId?
> `optional` **playlistId**: `string`
### videoIds?
> `optional` **videoIds**: `string`[]
## Defined in
[src/parser/types/CommandEndpoints.ts:55](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L55)

View File

@@ -0,0 +1,39 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / BrowseRequest
# Type Alias: BrowseRequest
> **BrowseRequest**: `object`
## Type declaration
### browseId?
> `optional` **browseId**: `string`
### browseRequestSupportedMetadata?
> `optional` **browseRequestSupportedMetadata**: [`BrowseRequestSupportedMetadata`](BrowseRequestSupportedMetadata.md)
### formData?
> `optional` **formData**: [`FormData`](FormData.md)
### inlineSettingStatus?
> `optional` **inlineSettingStatus**: [`InlineSettingStatus`](InlineSettingStatus.md)
### params?
> `optional` **params**: `string`
### query?
> `optional` **query**: `string`
### subscriptionSettingsState?
> `optional` **subscriptionSettingsState**: `string`
## Defined in
[src/parser/types/CommandEndpoints.ts:6](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L6)

View File

@@ -0,0 +1,23 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / BrowseRequestSupportedMetadata
# Type Alias: BrowseRequestSupportedMetadata
> **BrowseRequestSupportedMetadata**: `object`
## Type declaration
### downloadsBrowseParams
> **downloadsBrowseParams**: `object`
### downloadsBrowseParams.offlineFeatureSettingState
> **offlineFeatureSettingState**: `object`
### downloadsBrowseParams.offlineFeatureSettingState.isSdEnabled
> **isSdEnabled**: `boolean`
## Defined in
[src/parser/types/CommandEndpoints.ts:25](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L25)

View File

@@ -0,0 +1,31 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / ContinuationRequest
# Type Alias: ContinuationRequest
> **ContinuationRequest**: `object`
## Type declaration
### continuation?
> `optional` **continuation**: `string`
### fetchCommentsParams?
> `optional` **fetchCommentsParams**: `object`
### fetchCommentsParams.continuation
> **continuation**: `string`
### formData?
> `optional` **formData**: [`FormData`](FormData.md)
### notificationsMenuRequestType?
> `optional` **notificationsMenuRequestType**: `string`
## Defined in
[src/parser/types/CommandEndpoints.ts:143](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L143)

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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/RawResponse.ts#L4)

View File

@@ -0,0 +1,63 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / CreateCommentRequest
# Type Alias: CreateCommentRequest
> **CreateCommentRequest**: `object`
## Type declaration
### accessRestrictions?
> `optional` **accessRestrictions**: `object`
### accessRestrictions.restriction
> **restriction**: `"RESTRICTION_TYPE_EVERYONE"` \| `"RESTRICTION_TYPE_SPONSORS_ONLY"`
### botguardResponse?
> `optional` **botguardResponse**: `string`
### commentText?
> `optional` **commentText**: `string`
### createCommentParams?
> `optional` **createCommentParams**: `string`
### imageAttachment?
> `optional` **imageAttachment**: `object`
### imageAttachment.encryptedBlobId
> **encryptedBlobId**: `string`
### pollAttachment?
> `optional` **pollAttachment**: `object`
### pollAttachment.choices
> **choices**: `string`[]
### sharedPostAttachment?
> `optional` **sharedPostAttachment**: `object`
### sharedPostAttachment.postId
> **postId**: `string`
### videoAttachment?
> `optional` **videoAttachment**: `object`
### videoAttachment.videoId
> **videoId**: `string`
## Defined in
[src/parser/types/CommandEndpoints.ts:179](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L179)

View File

@@ -0,0 +1,35 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / CreatePlaylistServiceRequest
# Type Alias: CreatePlaylistServiceRequest
> **CreatePlaylistServiceRequest**: `object`
## Type declaration
### description?
> `optional` **description**: `string`
### params?
> `optional` **params**: `string`
### privacyStatus?
> `optional` **privacyStatus**: [`PlaylistPrivacyStatus`](PlaylistPrivacyStatus.md)
### sourcePlaylistId?
> `optional` **sourcePlaylistId**: `string`
### title?
> `optional` **title**: `string`
### videoIds?
> `optional` **videoIds**: `string`[]
## Defined in
[src/parser/types/CommandEndpoints.ts:104](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L104)

View File

@@ -0,0 +1,15 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / DeletePlaylistServiceRequest
# Type Alias: DeletePlaylistServiceRequest
> **DeletePlaylistServiceRequest**: `object`
## Type declaration
### playlistId?
> `optional` **playlistId**: `string`
## Defined in
[src/parser/types/CommandEndpoints.ts:113](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L113)

View File

@@ -0,0 +1,15 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / FeedbackContext
# Type Alias: FeedbackContext
> **FeedbackContext**: `object`
## Type declaration
### cpn
> **cpn**: `string`
## Defined in
[src/parser/types/CommandEndpoints.ts:35](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L35)

View File

@@ -0,0 +1,27 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / FeedbackRequest
# Type Alias: FeedbackRequest
> **FeedbackRequest**: `object`
## Type declaration
### feedbackContext?
> `optional` **feedbackContext**: [`FeedbackContext`](FeedbackContext.md)
### feedbackTokens?
> `optional` **feedbackTokens**: `string`[]
### isFeedbackTokenUnencrypted?
> `optional` **isFeedbackTokenUnencrypted**: `boolean`
### shouldMerge?
> `optional` **shouldMerge**: `boolean`
## Defined in
[src/parser/types/CommandEndpoints.ts:39](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L39)

View File

@@ -0,0 +1,31 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / FormData
# Type Alias: FormData
> **FormData**: `object`
## Type declaration
### accountSettingsFormData
> **accountSettingsFormData**: `object`
### accountSettingsFormData.flagAudioDescriptionDefaultOn
> **flagAudioDescriptionDefaultOn**: `boolean`
### accountSettingsFormData.flagAutoCaptionsDefaultOn
> **flagAutoCaptionsDefaultOn**: `boolean`
### accountSettingsFormData.flagCaptionsDefaultOff
> **flagCaptionsDefaultOff**: `boolean`
### accountSettingsFormData.flagDisableInlinePreview
> **flagDisableInlinePreview**: `boolean`
## Defined in
[src/parser/types/CommandEndpoints.ts:16](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L16)

View File

@@ -0,0 +1,43 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / GetAccountsListInnertubeRequest
# Type Alias: GetAccountsListInnertubeRequest
> **GetAccountsListInnertubeRequest**: `object`
## Type declaration
### callCircumstance?
> `optional` **callCircumstance**: `"SUPPLEMENTAL_USER"` \| `"SWITCHING_USERS_FULL"`
### channelSwitcherQuery?
> `optional` **channelSwitcherQuery**: `string`
### contentOwnerConfig?
> `optional` **contentOwnerConfig**: `Record`\<`string`, `any`\>
### nextNavendpoint?
> `optional` **nextNavendpoint**: [`NextNavendpoint`](NextNavendpoint.md)
### obfuscatedSelectedGaiaId?
> `optional` **obfuscatedSelectedGaiaId**: `string`
### requestType?
> `optional` **requestType**: `string`
### selectedSerializedDelegationContext?
> `optional` **selectedSerializedDelegationContext**: `string`
### triggerChannelCreation?
> `optional` **triggerChannelCreation**: `boolean`
## Defined in
[src/parser/types/CommandEndpoints.ts:162](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L162)

View File

@@ -0,0 +1,19 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / GetKidsBlocklistPickerRequest
# Type Alias: GetKidsBlocklistPickerRequest
> **GetKidsBlocklistPickerRequest**: `object`
## Type declaration
### blockedForKidsContent?
> `optional` **blockedForKidsContent**: `object`
### blockedForKidsContent.external\_channel\_id
> **external\_channel\_id**: `string`
## Defined in
[src/parser/types/CommandEndpoints.ts:173](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L173)

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:140](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L140)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / IGetChallengeResponse
# Type Alias: IGetChallengeResponse
> **IGetChallengeResponse**: `Pick`\<[`IParsedResponse`](../interfaces/IParsedResponse.md), `"challenge"` \| `"bg_challenge"`\>
## Defined in
[src/parser/types/ParsedResponse.ts:147](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L147)

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:144](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L144)

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:143](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L143)

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:146](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L146)

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"` \| `"continuation_contents"` \| `"continuation_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:139](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L139)

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:138](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L138)

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:142](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L142)

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:141](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L141)

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:145](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/ParsedResponse.ts#L145)

View File

@@ -0,0 +1,9 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / InlineSettingStatus
# Type Alias: InlineSettingStatus
> **InlineSettingStatus**: `"INLINE_SETTING_STATUS_DISABLED"` \| `"INLINE_SETTING_STATUS_ON"`
## Defined in
[src/parser/types/CommandEndpoints.ts:33](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L33)

View File

@@ -0,0 +1,19 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / LikeRequest
# Type Alias: LikeRequest
> **LikeRequest**: `object`
## Type declaration
### params?
> `optional` **params**: `string`
### target?
> `optional` **target**: [`LikeTarget`](LikeTarget.md)
## Defined in
[src/parser/types/CommandEndpoints.ts:50](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L50)

View File

@@ -0,0 +1,15 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / LikeTarget
# Type Alias: LikeTarget
> **LikeTarget**: `object`
## Type declaration
### videoId
> **videoId**: `string`
## Defined in
[src/parser/types/CommandEndpoints.ts:46](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L46)

View File

@@ -0,0 +1,15 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / LiveChatItemContextMenuRequest
# Type Alias: LiveChatItemContextMenuRequest
> **LiveChatItemContextMenuRequest**: `object`
## Type declaration
### params?
> `optional` **params**: `string`
## Defined in
[src/parser/types/CommandEndpoints.ts:152](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L152)

View File

@@ -0,0 +1,19 @@
[youtubei.js](../../../README.md) / [APIResponseTypes](../README.md) / ModifyChannelNotificationPreferenceRequest
# Type Alias: ModifyChannelNotificationPreferenceRequest
> **ModifyChannelNotificationPreferenceRequest**: `object`
## Type declaration
### params?
> `optional` **params**: `string`
### secondaryParams?
> `optional` **secondaryParams**: `string`
## Defined in
[src/parser/types/CommandEndpoints.ts:194](https://github.com/LuanRT/YouTube.js/blob/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/parser/types/CommandEndpoints.ts#L194)

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