mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 12:31:17 +00:00
* chore(deps): Add `meriyah` * feat(utils): Implement AST-based JS extractors * chore(utils): Remove old ast walker code * fix(Player): Migrate js extraction logic * chore(JsExtractor): Fix typo in tsdoc * perf(JsAnalyzer): Simplify main AST analysis logic * fix(JsAnalyzer): Change `break` to `return` in AST matching logic * chore: Update docs * chore: Don't export `PlayerInitializationOptions` * chore(evaluate): Update error message to include doc link * perf: Use a `for-loop` to find iife
703 lines
17 KiB
Markdown
703 lines
17 KiB
Markdown
[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:67](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L67)
|
|
|
|
## 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:609](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L609)
|
|
|
|
***
|
|
|
|
### actions
|
|
|
|
> `get` **actions**(): [`Actions`](Actions.md)
|
|
|
|
An internal class used to dispatch requests.
|
|
|
|
#### Returns
|
|
|
|
[`Actions`](Actions.md)
|
|
|
|
#### Defined in
|
|
|
|
[src/Innertube.ts:630](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L630)
|
|
|
|
***
|
|
|
|
### 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:623](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L623)
|
|
|
|
***
|
|
|
|
### 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:602](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L602)
|
|
|
|
***
|
|
|
|
### 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:588](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L588)
|
|
|
|
***
|
|
|
|
### 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:616](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L616)
|
|
|
|
***
|
|
|
|
### session
|
|
|
|
> `get` **session**(): [`Session`](Session.md)
|
|
|
|
The session used by this instance.
|
|
|
|
#### Returns
|
|
|
|
[`Session`](Session.md)
|
|
|
|
#### Defined in
|
|
|
|
[src/Innertube.ts:637](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L637)
|
|
|
|
***
|
|
|
|
### 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:595](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L595)
|
|
|
|
## 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:579](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L579)
|
|
|
|
#### 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:580](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L580)
|
|
|
|
***
|
|
|
|
### 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:477](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L477)
|
|
|
|
***
|
|
|
|
### 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:565](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L565)
|
|
|
|
***
|
|
|
|
### getBasicInfo()
|
|
|
|
> **getBasicInfo**(`video_id`, `options`?): `Promise`\<[`VideoInfo`](../namespaces/YT/classes/VideoInfo.md)\>
|
|
|
|
#### Parameters
|
|
|
|
• **video\_id**: `string`
|
|
|
|
• **options?**: [`GetVideoInfoOptions`](../namespaces/Types/interfaces/GetVideoInfoOptions.md)
|
|
|
|
#### Returns
|
|
|
|
`Promise`\<[`VideoInfo`](../namespaces/YT/classes/VideoInfo.md)\>
|
|
|
|
#### Defined in
|
|
|
|
[src/Innertube.ts:124](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L124)
|
|
|
|
***
|
|
|
|
### 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:391](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L391)
|
|
|
|
***
|
|
|
|
### 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:385](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L385)
|
|
|
|
***
|
|
|
|
### 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:306](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L306)
|
|
|
|
***
|
|
|
|
### 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:373](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L373)
|
|
|
|
***
|
|
|
|
### getGuide()
|
|
|
|
> **getGuide**(): `Promise`\<[`Guide`](../namespaces/YT/classes/Guide.md)\>
|
|
|
|
#### Returns
|
|
|
|
`Promise`\<[`Guide`](../namespaces/YT/classes/Guide.md)\>
|
|
|
|
#### Defined in
|
|
|
|
[src/Innertube.ts:350](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L350)
|
|
|
|
***
|
|
|
|
### 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:436](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L436)
|
|
|
|
***
|
|
|
|
### getHistory()
|
|
|
|
> **getHistory**(): `Promise`\<[`History`](../namespaces/YT/classes/History.md)\>
|
|
|
|
#### Returns
|
|
|
|
`Promise`\<[`History`](../namespaces/YT/classes/History.md)\>
|
|
|
|
#### Defined in
|
|
|
|
[src/Innertube.ts:361](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L361)
|
|
|
|
***
|
|
|
|
### getHomeFeed()
|
|
|
|
> **getHomeFeed**(): `Promise`\<[`HomeFeed`](../namespaces/YT/classes/HomeFeed.md)\>
|
|
|
|
#### Returns
|
|
|
|
`Promise`\<[`HomeFeed`](../namespaces/YT/classes/HomeFeed.md)\>
|
|
|
|
#### Defined in
|
|
|
|
[src/Innertube.ts:344](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L344)
|
|
|
|
***
|
|
|
|
### getInfo()
|
|
|
|
> **getInfo**(`target`, `options`?): `Promise`\<[`VideoInfo`](../namespaces/YT/classes/VideoInfo.md)\>
|
|
|
|
#### Parameters
|
|
|
|
• **target**: `string` \| [`NavigationEndpoint`](../namespaces/YTNodes/classes/NavigationEndpoint.md)
|
|
|
|
• **options?**: [`GetVideoInfoOptions`](../namespaces/Types/interfaces/GetVideoInfoOptions.md)
|
|
|
|
#### Returns
|
|
|
|
`Promise`\<[`VideoInfo`](../namespaces/YT/classes/VideoInfo.md)\>
|
|
|
|
#### Defined in
|
|
|
|
[src/Innertube.ts:75](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L75)
|
|
|
|
***
|
|
|
|
### getLibrary()
|
|
|
|
> **getLibrary**(): `Promise`\<[`Library`](../namespaces/YT/classes/Library.md)\>
|
|
|
|
#### Returns
|
|
|
|
`Promise`\<[`Library`](../namespaces/YT/classes/Library.md)\>
|
|
|
|
#### Defined in
|
|
|
|
[src/Innertube.ts:355](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L355)
|
|
|
|
***
|
|
|
|
### getNotifications()
|
|
|
|
> **getNotifications**(): `Promise`\<[`NotificationsMenu`](../namespaces/YT/classes/NotificationsMenu.md)\>
|
|
|
|
#### Returns
|
|
|
|
`Promise`\<[`NotificationsMenu`](../namespaces/YT/classes/NotificationsMenu.md)\>
|
|
|
|
#### Defined in
|
|
|
|
[src/Innertube.ts:403](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L403)
|
|
|
|
***
|
|
|
|
### 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:423](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L423)
|
|
|
|
***
|
|
|
|
### 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:417](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L417)
|
|
|
|
***
|
|
|
|
### 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:497](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L497)
|
|
|
|
***
|
|
|
|
### 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:518](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L518)
|
|
|
|
***
|
|
|
|
### getSearchSuggestions()
|
|
|
|
> **getSearchSuggestions**(`query`, `previous_query`?): `Promise`\<`string`[]\>
|
|
|
|
#### Parameters
|
|
|
|
• **query**: `string`
|
|
|
|
• **previous\_query?**: `string`
|
|
|
|
#### Returns
|
|
|
|
`Promise`\<`string`[]\>
|
|
|
|
#### Defined in
|
|
|
|
[src/Innertube.ts:277](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L277)
|
|
|
|
***
|
|
|
|
### 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:166](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L166)
|
|
|
|
***
|
|
|
|
### 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:462](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L462)
|
|
|
|
***
|
|
|
|
### 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:379](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L379)
|
|
|
|
***
|
|
|
|
### 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:367](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L367)
|
|
|
|
***
|
|
|
|
### getUnseenNotificationsCount()
|
|
|
|
> **getUnseenNotificationsCount**(): `Promise`\<`number`\>
|
|
|
|
#### Returns
|
|
|
|
`Promise`\<`number`\>
|
|
|
|
#### Defined in
|
|
|
|
[src/Innertube.ts:408](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L408)
|
|
|
|
***
|
|
|
|
### 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:485](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L485)
|
|
|
|
***
|
|
|
|
### 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:201](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L201)
|
|
|
|
***
|
|
|
|
### 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:71](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L71)
|