mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-23 23:09:28 +00:00
chore: Use latest version of typedoc-plugin-markdown
This commit is contained in:
@@ -2,23 +2,25 @@
|
||||
|
||||
# Class: Actions
|
||||
|
||||
Defined in: [src/core/Actions.ts:46](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Actions.ts#L46)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new Actions()
|
||||
### Constructor
|
||||
|
||||
> **new Actions**(`session`): [`Actions`](Actions.md)
|
||||
> **new Actions**(`session`): `Actions`
|
||||
|
||||
Defined in: [src/core/Actions.ts:49](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Actions.ts#L49)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **session**: [`Session`](Session.md)
|
||||
##### session
|
||||
|
||||
[`Session`](Session.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Actions`](Actions.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Actions.ts:49](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Actions.ts#L49)
|
||||
`Actions`
|
||||
|
||||
## Properties
|
||||
|
||||
@@ -26,110 +28,138 @@
|
||||
|
||||
> **session**: [`Session`](Session.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Actions.ts:47](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Actions.ts#L47)
|
||||
Defined in: [src/core/Actions.ts:47](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Actions.ts#L47)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute()
|
||||
|
||||
#### execute(endpoint, args)
|
||||
#### Call Signature
|
||||
|
||||
> **execute**\<`T`\>(`endpoint`, `args`): `Promise`\<[`ParsedResponse`](../type-aliases/ParsedResponse.md)\<`T`\>\>
|
||||
|
||||
Defined in: [src/core/Actions.ts:81](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Actions.ts#L81)
|
||||
|
||||
Executes an API call.
|
||||
|
||||
##### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
###### T
|
||||
|
||||
`T` *extends* `string`
|
||||
|
||||
##### Parameters
|
||||
|
||||
• **endpoint**: `T`
|
||||
###### endpoint
|
||||
|
||||
`T`
|
||||
|
||||
The endpoint to call.
|
||||
|
||||
• **args**
|
||||
###### args
|
||||
|
||||
Call arguments
|
||||
|
||||
• **args.parse**: `true`
|
||||
###### parse
|
||||
|
||||
• **args.protobuf?**: `false`
|
||||
`true`
|
||||
|
||||
• **args.serialized\_data?**: `any`
|
||||
###### protobuf?
|
||||
|
||||
• **args.skip\_auth\_check?**: `boolean`
|
||||
`false`
|
||||
|
||||
###### serialized_data?
|
||||
|
||||
`any`
|
||||
|
||||
###### skip_auth_check?
|
||||
|
||||
`boolean`
|
||||
|
||||
##### Returns
|
||||
|
||||
`Promise`\<[`ParsedResponse`](../type-aliases/ParsedResponse.md)\<`T`\>\>
|
||||
|
||||
##### Defined in
|
||||
#### Call Signature
|
||||
|
||||
[src/core/Actions.ts:81](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Actions.ts#L81)
|
||||
> **execute**\<`T`\>(`endpoint`, `args?`): `Promise`\<[`ApiResponse`](../interfaces/ApiResponse.md)\>
|
||||
|
||||
#### execute(endpoint, args)
|
||||
Defined in: [src/core/Actions.ts:88](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Actions.ts#L88)
|
||||
|
||||
> **execute**\<`T`\>(`endpoint`, `args`?): `Promise`\<[`ApiResponse`](../interfaces/ApiResponse.md)\>
|
||||
Executes an API call.
|
||||
|
||||
##### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
###### T
|
||||
|
||||
`T` *extends* `string`
|
||||
|
||||
##### Parameters
|
||||
|
||||
• **endpoint**: `T`
|
||||
###### endpoint
|
||||
|
||||
• **args?**
|
||||
`T`
|
||||
|
||||
• **args.parse?**: `false`
|
||||
The endpoint to call.
|
||||
|
||||
• **args.protobuf?**: `true`
|
||||
###### args?
|
||||
|
||||
• **args.serialized\_data?**: `any`
|
||||
Call arguments
|
||||
|
||||
• **args.skip\_auth\_check?**: `boolean`
|
||||
###### parse?
|
||||
|
||||
`false`
|
||||
|
||||
###### protobuf?
|
||||
|
||||
`true`
|
||||
|
||||
###### serialized_data?
|
||||
|
||||
`any`
|
||||
|
||||
###### skip_auth_check?
|
||||
|
||||
`boolean`
|
||||
|
||||
##### Returns
|
||||
|
||||
`Promise`\<[`ApiResponse`](../interfaces/ApiResponse.md)\>
|
||||
|
||||
##### Defined in
|
||||
|
||||
[src/core/Actions.ts:88](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Actions.ts#L88)
|
||||
|
||||
***
|
||||
|
||||
### stats()
|
||||
|
||||
> **stats**(`url`, `client`, `params`): `Promise`\<`Response`\>
|
||||
|
||||
Defined in: [src/core/Actions.ts:59](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Actions.ts#L59)
|
||||
|
||||
Makes calls to the playback tracking API.
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **url**: `string`
|
||||
##### url
|
||||
|
||||
`string`
|
||||
|
||||
The URL to call.
|
||||
|
||||
• **client**
|
||||
##### client
|
||||
|
||||
The client to use.
|
||||
|
||||
• **client.client\_name**: `string`
|
||||
###### client_name
|
||||
|
||||
• **client.client\_version**: `string`
|
||||
`string`
|
||||
|
||||
• **params**
|
||||
###### client_version
|
||||
|
||||
`string`
|
||||
|
||||
##### params
|
||||
|
||||
Call parameters.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`Response`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Actions.ts:59](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Actions.ts#L59)
|
||||
|
||||
@@ -2,31 +2,33 @@
|
||||
|
||||
# Class: Continuation
|
||||
|
||||
Defined in: [src/parser/continuations.ts:139](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L139)
|
||||
|
||||
## Extends
|
||||
|
||||
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
- [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new Continuation()
|
||||
### Constructor
|
||||
|
||||
> **new Continuation**(`data`): [`Continuation`](Continuation.md)
|
||||
> **new Continuation**(`data`): `Continuation`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:147](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L147)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
|
||||
##### data
|
||||
|
||||
[`RawNode`](../type-aliases/RawNode.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Continuation`](Continuation.md)
|
||||
`Continuation`
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L147)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`constructor`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#constructor)
|
||||
|
||||
## Properties
|
||||
|
||||
@@ -34,9 +36,7 @@
|
||||
|
||||
> **continuation\_type**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:142](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L142)
|
||||
Defined in: [src/parser/continuations.ts:142](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L142)
|
||||
|
||||
***
|
||||
|
||||
@@ -44,9 +44,7 @@
|
||||
|
||||
> `optional` **time\_until\_last\_message\_ms**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:144](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L144)
|
||||
Defined in: [src/parser/continuations.ts:144](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L144)
|
||||
|
||||
***
|
||||
|
||||
@@ -54,9 +52,7 @@
|
||||
|
||||
> `optional` **timeout\_ms**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:143](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L143)
|
||||
Defined in: [src/parser/continuations.ts:143](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L143)
|
||||
|
||||
***
|
||||
|
||||
@@ -64,9 +60,7 @@
|
||||
|
||||
> **token**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:145](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L145)
|
||||
Defined in: [src/parser/continuations.ts:145](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L145)
|
||||
|
||||
***
|
||||
|
||||
@@ -74,13 +68,11 @@
|
||||
|
||||
> `readonly` **type**: `string`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type)
|
||||
|
||||
***
|
||||
|
||||
@@ -88,13 +80,11 @@
|
||||
|
||||
> `readonly` `static` **type**: `"continuation"` = `'continuation'`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:140](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L140)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L140)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type-1)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -102,17 +92,25 @@
|
||||
|
||||
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
|
||||
|
||||
Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L29)
|
||||
|
||||
Cast to one of the given types.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The types to cast to
|
||||
|
||||
@@ -128,11 +126,7 @@ 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:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`as`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#as)
|
||||
|
||||
***
|
||||
|
||||
@@ -140,17 +134,25 @@ If the node is not of the given type
|
||||
|
||||
> **hasKey**\<`T`, `R`\>(`key`): `this is Continuation & { [k in string]: R }`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L41)
|
||||
|
||||
Check for a key without asserting the type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
@@ -162,11 +164,7 @@ 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:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`hasKey`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#haskey)
|
||||
|
||||
***
|
||||
|
||||
@@ -174,17 +172,25 @@ Whether the node has the key
|
||||
|
||||
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19)
|
||||
|
||||
Check if the node is of the given type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The type to check
|
||||
|
||||
@@ -196,35 +202,39 @@ 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:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`is`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#is)
|
||||
|
||||
***
|
||||
|
||||
### key()
|
||||
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L51)
|
||||
|
||||
Assert that the node has the given key and return it.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
[`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
The value of the key wrapped in a Maybe
|
||||
|
||||
@@ -234,8 +244,4 @@ 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:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`key`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#key)
|
||||
|
||||
@@ -2,31 +2,33 @@
|
||||
|
||||
# Class: ContinuationCommand
|
||||
|
||||
Defined in: [src/parser/continuations.ts:214](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L214)
|
||||
|
||||
## Extends
|
||||
|
||||
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
- [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new ContinuationCommand()
|
||||
### Constructor
|
||||
|
||||
> **new ContinuationCommand**(`data`): [`ContinuationCommand`](ContinuationCommand.md)
|
||||
> **new ContinuationCommand**(`data`): `ContinuationCommand`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:220](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L220)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
|
||||
##### data
|
||||
|
||||
[`RawNode`](../type-aliases/RawNode.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ContinuationCommand`](ContinuationCommand.md)
|
||||
`ContinuationCommand`
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L220)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`constructor`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#constructor)
|
||||
|
||||
## Properties
|
||||
|
||||
@@ -34,9 +36,7 @@
|
||||
|
||||
> **request**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:217](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L217)
|
||||
Defined in: [src/parser/continuations.ts:217](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L217)
|
||||
|
||||
***
|
||||
|
||||
@@ -44,9 +44,7 @@
|
||||
|
||||
> **token**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:218](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L218)
|
||||
Defined in: [src/parser/continuations.ts:218](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L218)
|
||||
|
||||
***
|
||||
|
||||
@@ -54,13 +52,11 @@
|
||||
|
||||
> `readonly` **type**: `string`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type)
|
||||
|
||||
***
|
||||
|
||||
@@ -68,13 +64,11 @@
|
||||
|
||||
> `readonly` `static` **type**: `"ContinuationCommand"` = `'ContinuationCommand'`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:215](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L215)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L215)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type-1)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -82,17 +76,25 @@
|
||||
|
||||
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
|
||||
|
||||
Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L29)
|
||||
|
||||
Cast to one of the given types.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The types to cast to
|
||||
|
||||
@@ -108,11 +110,7 @@ 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:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`as`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#as)
|
||||
|
||||
***
|
||||
|
||||
@@ -120,17 +118,25 @@ If the node is not of the given type
|
||||
|
||||
> **hasKey**\<`T`, `R`\>(`key`): `this is ContinuationCommand & { [k in string]: R }`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L41)
|
||||
|
||||
Check for a key without asserting the type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
@@ -142,11 +148,7 @@ 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:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`hasKey`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#haskey)
|
||||
|
||||
***
|
||||
|
||||
@@ -154,17 +156,25 @@ Whether the node has the key
|
||||
|
||||
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19)
|
||||
|
||||
Check if the node is of the given type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The type to check
|
||||
|
||||
@@ -176,35 +186,39 @@ 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:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`is`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#is)
|
||||
|
||||
***
|
||||
|
||||
### key()
|
||||
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L51)
|
||||
|
||||
Assert that the node has the given key and return it.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
[`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
The value of the key wrapped in a Maybe
|
||||
|
||||
@@ -214,8 +228,4 @@ 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:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`key`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#key)
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
# Class: EventEmitter
|
||||
|
||||
Defined in: [src/utils/EventEmitterLike.ts:3](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/EventEmitterLike.ts#L3)
|
||||
|
||||
## Extends
|
||||
|
||||
- `EventTarget`
|
||||
@@ -9,31 +11,31 @@
|
||||
## Extended by
|
||||
|
||||
- [`Session`](Session.md)
|
||||
- [`LiveChat`](../namespaces/YT/classes/LiveChat.md)
|
||||
- [`LiveChat`](../youtubei.js/namespaces/YT/classes/LiveChat.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new EventEmitter()
|
||||
### Constructor
|
||||
|
||||
> **new EventEmitter**(): [`EventEmitter`](EventEmitter.md)
|
||||
> **new EventEmitter**(): `EventEmitterLike`
|
||||
|
||||
Defined in: [src/utils/EventEmitterLike.ts:6](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/EventEmitterLike.ts#L6)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`EventEmitter`](EventEmitter.md)
|
||||
`EventEmitterLike`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`EventTarget.constructor`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/utils/EventEmitterLike.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/EventEmitterLike.ts#L6)
|
||||
|
||||
## Methods
|
||||
|
||||
### addEventListener()
|
||||
|
||||
> **addEventListener**(`type`, `callback`, `options`?): `void`
|
||||
> **addEventListener**(`type`, `callback`, `options?`): `void`
|
||||
|
||||
Defined in: node\_modules/typescript/lib/lib.dom.d.ts:8256
|
||||
|
||||
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.
|
||||
|
||||
@@ -53,11 +55,17 @@ The event listener is appended to target's event listener list and is not append
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **type**: `string`
|
||||
##### type
|
||||
|
||||
• **callback**: `null` \| `EventListenerOrEventListenerObject`
|
||||
`string`
|
||||
|
||||
• **options?**: `boolean` \| `AddEventListenerOptions`
|
||||
##### callback
|
||||
|
||||
`EventListenerOrEventListenerObject` | `null`
|
||||
|
||||
##### options?
|
||||
|
||||
`boolean` | `AddEventListenerOptions`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -67,23 +75,23 @@ The event listener is appended to target's event listener list and is not append
|
||||
|
||||
`EventTarget.addEventListener`
|
||||
|
||||
#### Defined in
|
||||
|
||||
node\_modules/typescript/lib/lib.dom.d.ts:8256
|
||||
|
||||
***
|
||||
|
||||
### dispatchEvent()
|
||||
|
||||
> **dispatchEvent**(`event`): `boolean`
|
||||
|
||||
Defined in: node\_modules/typescript/lib/lib.dom.d.ts:8262
|
||||
|
||||
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`
|
||||
##### event
|
||||
|
||||
`Event`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -93,95 +101,101 @@ Dispatches a synthetic event event to target and returns true if either event's
|
||||
|
||||
`EventTarget.dispatchEvent`
|
||||
|
||||
#### Defined in
|
||||
|
||||
node\_modules/typescript/lib/lib.dom.d.ts:8262
|
||||
|
||||
***
|
||||
|
||||
### emit()
|
||||
|
||||
> **emit**(`type`, ...`args`): `void`
|
||||
|
||||
Defined in: [src/utils/EventEmitterLike.ts:10](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/EventEmitterLike.ts#L10)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **type**: `string`
|
||||
##### type
|
||||
|
||||
• ...**args**: `any`[]
|
||||
`string`
|
||||
|
||||
##### args
|
||||
|
||||
...`any`[]
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/utils/EventEmitterLike.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/EventEmitterLike.ts#L10)
|
||||
|
||||
***
|
||||
|
||||
### off()
|
||||
|
||||
> **off**(`type`, `listener`): `void`
|
||||
|
||||
Defined in: [src/utils/EventEmitterLike.ts:40](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/EventEmitterLike.ts#L40)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **type**: `string`
|
||||
##### type
|
||||
|
||||
• **listener**
|
||||
`string`
|
||||
|
||||
##### listener
|
||||
|
||||
(...`args`) => `void`
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/utils/EventEmitterLike.ts:40](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/EventEmitterLike.ts#L40)
|
||||
|
||||
***
|
||||
|
||||
### on()
|
||||
|
||||
> **on**(`type`, `listener`): `void`
|
||||
|
||||
Defined in: [src/utils/EventEmitterLike.ts:15](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/EventEmitterLike.ts#L15)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **type**: `string`
|
||||
##### type
|
||||
|
||||
• **listener**
|
||||
`string`
|
||||
|
||||
##### listener
|
||||
|
||||
(...`args`) => `void`
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/utils/EventEmitterLike.ts:15](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/EventEmitterLike.ts#L15)
|
||||
|
||||
***
|
||||
|
||||
### once()
|
||||
|
||||
> **once**(`type`, `listener`): `void`
|
||||
|
||||
Defined in: [src/utils/EventEmitterLike.ts:27](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/EventEmitterLike.ts#L27)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **type**: `string`
|
||||
##### type
|
||||
|
||||
• **listener**
|
||||
`string`
|
||||
|
||||
##### listener
|
||||
|
||||
(...`args`) => `void`
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/utils/EventEmitterLike.ts:27](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/EventEmitterLike.ts#L27)
|
||||
|
||||
***
|
||||
|
||||
### removeEventListener()
|
||||
|
||||
> **removeEventListener**(`type`, `callback`, `options`?): `void`
|
||||
> **removeEventListener**(`type`, `callback`, `options?`): `void`
|
||||
|
||||
Defined in: node\_modules/typescript/lib/lib.dom.d.ts:8268
|
||||
|
||||
Removes the event listener in target's event listener list with the same type, callback, and options.
|
||||
|
||||
@@ -189,11 +203,17 @@ Removes the event listener in target's event listener list with the same type, c
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **type**: `string`
|
||||
##### type
|
||||
|
||||
• **callback**: `null` \| `EventListenerOrEventListenerObject`
|
||||
`string`
|
||||
|
||||
• **options?**: `boolean` \| `EventListenerOptions`
|
||||
##### callback
|
||||
|
||||
`EventListenerOrEventListenerObject` | `null`
|
||||
|
||||
##### options?
|
||||
|
||||
`boolean` | `EventListenerOptions`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -202,7 +222,3 @@ Removes the event listener in target's event listener list with the same type, c
|
||||
#### Inherited from
|
||||
|
||||
`EventTarget.removeEventListener`
|
||||
|
||||
#### Defined in
|
||||
|
||||
node\_modules/typescript/lib/lib.dom.d.ts:8268
|
||||
|
||||
@@ -2,31 +2,33 @@
|
||||
|
||||
# Class: GridContinuation
|
||||
|
||||
Defined in: [src/parser/continuations.ts:108](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L108)
|
||||
|
||||
## Extends
|
||||
|
||||
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
- [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new GridContinuation()
|
||||
### Constructor
|
||||
|
||||
> **new GridContinuation**(`data`): [`GridContinuation`](GridContinuation.md)
|
||||
> **new GridContinuation**(`data`): `GridContinuation`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:114](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L114)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
|
||||
##### data
|
||||
|
||||
[`RawNode`](../type-aliases/RawNode.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`GridContinuation`](GridContinuation.md)
|
||||
`GridContinuation`
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L114)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`constructor`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#constructor)
|
||||
|
||||
## Properties
|
||||
|
||||
@@ -34,19 +36,15 @@
|
||||
|
||||
> **continuation**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:111](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L111)
|
||||
Defined in: [src/parser/continuations.ts:111](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L111)
|
||||
|
||||
***
|
||||
|
||||
### items
|
||||
|
||||
> **items**: `null` \| [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
|
||||
> **items**: [`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\> \| `null`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:112](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L112)
|
||||
Defined in: [src/parser/continuations.ts:112](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L112)
|
||||
|
||||
***
|
||||
|
||||
@@ -54,13 +52,11 @@
|
||||
|
||||
> `readonly` **type**: `string`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type)
|
||||
|
||||
***
|
||||
|
||||
@@ -68,27 +64,25 @@
|
||||
|
||||
> `readonly` `static` **type**: `"gridContinuation"` = `'gridContinuation'`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:109](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L109)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L109)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type-1)
|
||||
|
||||
## Accessors
|
||||
|
||||
### contents
|
||||
|
||||
> `get` **contents**(): `null` \| [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
|
||||
#### Get Signature
|
||||
|
||||
#### Returns
|
||||
> **get** **contents**(): [`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\> \| `null`
|
||||
|
||||
`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/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L120)
|
||||
|
||||
#### Defined in
|
||||
##### Returns
|
||||
|
||||
[src/parser/continuations.ts:120](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L120)
|
||||
[`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\> \| `null`
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -96,17 +90,25 @@
|
||||
|
||||
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
|
||||
|
||||
Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L29)
|
||||
|
||||
Cast to one of the given types.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The types to cast to
|
||||
|
||||
@@ -122,11 +124,7 @@ 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:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`as`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#as)
|
||||
|
||||
***
|
||||
|
||||
@@ -134,17 +132,25 @@ If the node is not of the given type
|
||||
|
||||
> **hasKey**\<`T`, `R`\>(`key`): `this is GridContinuation & { [k in string]: R }`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L41)
|
||||
|
||||
Check for a key without asserting the type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
@@ -156,11 +162,7 @@ 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:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`hasKey`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#haskey)
|
||||
|
||||
***
|
||||
|
||||
@@ -168,17 +170,25 @@ Whether the node has the key
|
||||
|
||||
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19)
|
||||
|
||||
Check if the node is of the given type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The type to check
|
||||
|
||||
@@ -190,35 +200,39 @@ 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:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`is`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#is)
|
||||
|
||||
***
|
||||
|
||||
### key()
|
||||
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L51)
|
||||
|
||||
Assert that the node has the given key and return it.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
[`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
The value of the key wrapped in a Maybe
|
||||
|
||||
@@ -228,8 +242,4 @@ 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:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`key`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#key)
|
||||
|
||||
@@ -2,80 +2,100 @@
|
||||
|
||||
# Class: HTTPClient
|
||||
|
||||
Defined in: [src/utils/HTTPClient.ts:25](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/HTTPClient.ts#L25)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new HTTPClient()
|
||||
### Constructor
|
||||
|
||||
> **new HTTPClient**(`session`, `cookie`?, `fetch`?): [`HTTPClient`](HTTPClient.md)
|
||||
> **new HTTPClient**(`session`, `cookie?`, `fetch?`): `HTTPClient`
|
||||
|
||||
Defined in: [src/utils/HTTPClient.ts:30](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/HTTPClient.ts#L30)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **session**: [`Session`](Session.md)
|
||||
##### session
|
||||
|
||||
• **cookie?**: `string`
|
||||
[`Session`](Session.md)
|
||||
|
||||
• **fetch?**
|
||||
##### cookie?
|
||||
|
||||
`string`
|
||||
|
||||
##### fetch?
|
||||
|
||||
\{(`input`, `init?`): `Promise`\<`Response`\>; (`input`, `init?`): `Promise`\<`Response`\>; \}
|
||||
|
||||
#### Returns
|
||||
|
||||
[`HTTPClient`](HTTPClient.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/utils/HTTPClient.ts:30](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/HTTPClient.ts#L30)
|
||||
`HTTPClient`
|
||||
|
||||
## Accessors
|
||||
|
||||
### fetch\_function
|
||||
|
||||
> `get` **fetch\_function**(): (`input`, `init`?) => `Promise`\<`Response`\>(`input`, `init`?) => `Promise`\<`Response`\>
|
||||
#### Get Signature
|
||||
|
||||
#### Returns
|
||||
> **get** **fetch\_function**(): \{(`input`, `init?`): `Promise`\<`Response`\>; (`input`, `init?`): `Promise`\<`Response`\>; \}
|
||||
|
||||
`Function`
|
||||
Defined in: [src/utils/HTTPClient.ts:36](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/HTTPClient.ts#L36)
|
||||
|
||||
##### Returns
|
||||
|
||||
> (`input`, `init?`): `Promise`\<`Response`\>
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch)
|
||||
|
||||
##### Parameters
|
||||
###### Parameters
|
||||
|
||||
• **input**: `URL` \| `RequestInfo`
|
||||
###### input
|
||||
|
||||
• **init?**: `RequestInit`
|
||||
`URL` | `RequestInfo`
|
||||
|
||||
##### Returns
|
||||
###### init?
|
||||
|
||||
`RequestInit`
|
||||
|
||||
###### Returns
|
||||
|
||||
`Promise`\<`Response`\>
|
||||
|
||||
##### Parameters
|
||||
> (`input`, `init?`): `Promise`\<`Response`\>
|
||||
|
||||
• **input**: `string` \| `URL` \| `Request`
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch)
|
||||
|
||||
• **init?**: `RequestInit`
|
||||
###### Parameters
|
||||
|
||||
##### Returns
|
||||
###### input
|
||||
|
||||
`string` | `URL` | `Request`
|
||||
|
||||
###### init?
|
||||
|
||||
`RequestInit`
|
||||
|
||||
###### Returns
|
||||
|
||||
`Promise`\<`Response`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/utils/HTTPClient.ts:36](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/HTTPClient.ts#L36)
|
||||
|
||||
## Methods
|
||||
|
||||
### fetch()
|
||||
|
||||
> **fetch**(`input`, `init`?): `Promise`\<`Response`\>
|
||||
> **fetch**(`input`, `init?`): `Promise`\<`Response`\>
|
||||
|
||||
Defined in: [src/utils/HTTPClient.ts:40](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/HTTPClient.ts#L40)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **input**: `string` \| `URL` \| `Request`
|
||||
##### input
|
||||
|
||||
• **init?**: `RequestInit` & [`HTTPClientInit`](../interfaces/HTTPClientInit.md)
|
||||
`string` | `URL` | `Request`
|
||||
|
||||
##### init?
|
||||
|
||||
`RequestInit` & [`HTTPClientInit`](../interfaces/HTTPClientInit.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`Response`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/utils/HTTPClient.ts:40](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/HTTPClient.ts#L40)
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
# Class: Innertube
|
||||
|
||||
Defined in: [src/Innertube.ts:64](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L64)
|
||||
|
||||
Provides access to various services and modules in the YouTube API.
|
||||
|
||||
## Example
|
||||
@@ -13,216 +15,230 @@ const innertube = await Innertube.create({ cache: new UniversalCache(true)});
|
||||
|
||||
## Constructors
|
||||
|
||||
### new Innertube()
|
||||
### Constructor
|
||||
|
||||
> **new Innertube**(`session`): [`Innertube`](Innertube.md)
|
||||
> **new Innertube**(`session`): `Innertube`
|
||||
|
||||
Defined in: [src/Innertube.ts:67](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L67)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **session**: [`Session`](Session.md)
|
||||
##### 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)
|
||||
`Innertube`
|
||||
|
||||
## Accessors
|
||||
|
||||
### account
|
||||
|
||||
> `get` **account**(): [`AccountManager`](../namespaces/Managers/classes/AccountManager.md)
|
||||
#### Get Signature
|
||||
|
||||
> **get** **account**(): [`AccountManager`](../youtubei.js/namespaces/Managers/classes/AccountManager.md)
|
||||
|
||||
Defined in: [src/Innertube.ts:609](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L609)
|
||||
|
||||
An interface for managing and retrieving account information.
|
||||
|
||||
#### Returns
|
||||
##### 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)
|
||||
[`AccountManager`](../youtubei.js/namespaces/Managers/classes/AccountManager.md)
|
||||
|
||||
***
|
||||
|
||||
### actions
|
||||
|
||||
> `get` **actions**(): [`Actions`](Actions.md)
|
||||
#### Get Signature
|
||||
|
||||
> **get** **actions**(): [`Actions`](Actions.md)
|
||||
|
||||
Defined in: [src/Innertube.ts:630](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L630)
|
||||
|
||||
An internal class used to dispatch requests.
|
||||
|
||||
#### Returns
|
||||
##### 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)
|
||||
#### Get Signature
|
||||
|
||||
> **get** **interact**(): [`InteractionManager`](../youtubei.js/namespaces/Managers/classes/InteractionManager.md)
|
||||
|
||||
Defined in: [src/Innertube.ts:623](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L623)
|
||||
|
||||
An interface for directly interacting with certain YouTube features.
|
||||
|
||||
#### Returns
|
||||
##### 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)
|
||||
[`InteractionManager`](../youtubei.js/namespaces/Managers/classes/InteractionManager.md)
|
||||
|
||||
***
|
||||
|
||||
### kids
|
||||
|
||||
> `get` **kids**(): [`Kids`](../namespaces/Clients/classes/Kids.md)
|
||||
#### Get Signature
|
||||
|
||||
> **get** **kids**(): [`Kids`](../youtubei.js/namespaces/Clients/classes/Kids.md)
|
||||
|
||||
Defined in: [src/Innertube.ts:602](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L602)
|
||||
|
||||
An interface for interacting with YouTube Kids.
|
||||
|
||||
#### Returns
|
||||
##### 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)
|
||||
[`Kids`](../youtubei.js/namespaces/Clients/classes/Kids.md)
|
||||
|
||||
***
|
||||
|
||||
### music
|
||||
|
||||
> `get` **music**(): [`Music`](../namespaces/Clients/classes/Music.md)
|
||||
#### Get Signature
|
||||
|
||||
> **get** **music**(): [`Music`](../youtubei.js/namespaces/Clients/classes/Music.md)
|
||||
|
||||
Defined in: [src/Innertube.ts:588](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L588)
|
||||
|
||||
An interface for interacting with YouTube Music.
|
||||
|
||||
#### Returns
|
||||
##### 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)
|
||||
[`Music`](../youtubei.js/namespaces/Clients/classes/Music.md)
|
||||
|
||||
***
|
||||
|
||||
### playlist
|
||||
|
||||
> `get` **playlist**(): [`PlaylistManager`](../namespaces/Managers/classes/PlaylistManager.md)
|
||||
#### Get Signature
|
||||
|
||||
> **get** **playlist**(): [`PlaylistManager`](../youtubei.js/namespaces/Managers/classes/PlaylistManager.md)
|
||||
|
||||
Defined in: [src/Innertube.ts:616](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L616)
|
||||
|
||||
An interface for managing playlists.
|
||||
|
||||
#### Returns
|
||||
##### 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)
|
||||
[`PlaylistManager`](../youtubei.js/namespaces/Managers/classes/PlaylistManager.md)
|
||||
|
||||
***
|
||||
|
||||
### session
|
||||
|
||||
> `get` **session**(): [`Session`](Session.md)
|
||||
#### Get Signature
|
||||
|
||||
> **get** **session**(): [`Session`](Session.md)
|
||||
|
||||
Defined in: [src/Innertube.ts:637](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L637)
|
||||
|
||||
The session used by this instance.
|
||||
|
||||
#### Returns
|
||||
##### 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)
|
||||
#### Get Signature
|
||||
|
||||
> **get** **studio**(): [`Studio`](../youtubei.js/namespaces/Clients/classes/Studio.md)
|
||||
|
||||
Defined in: [src/Innertube.ts:595](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L595)
|
||||
|
||||
An interface for interacting with YouTube Studio.
|
||||
|
||||
#### Returns
|
||||
##### 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)
|
||||
[`Studio`](../youtubei.js/namespaces/Clients/classes/Studio.md)
|
||||
|
||||
## Methods
|
||||
|
||||
### call()
|
||||
|
||||
#### call(endpoint, args)
|
||||
#### Call Signature
|
||||
|
||||
> **call**\<`T`\>(`endpoint`, `args`): `Promise`\<`T`\>
|
||||
|
||||
Defined in: [src/Innertube.ts:579](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L579)
|
||||
|
||||
Utility method to call an endpoint without having to use [Actions](Actions.md).
|
||||
|
||||
##### Type Parameters
|
||||
|
||||
• **T** *extends* [`IParsedResponse`](../namespaces/APIResponseTypes/interfaces/IParsedResponse.md)
|
||||
###### T
|
||||
|
||||
`T` *extends* [`IParsedResponse`](../interfaces/IParsedResponse.md)
|
||||
|
||||
##### Parameters
|
||||
|
||||
• **endpoint**: [`NavigationEndpoint`](../namespaces/YTNodes/classes/NavigationEndpoint.md)
|
||||
###### endpoint
|
||||
|
||||
• **args**
|
||||
[`NavigationEndpoint`](../youtubei.js/namespaces/YTNodes/classes/NavigationEndpoint.md)
|
||||
|
||||
• **args.parse**: `true`
|
||||
###### args
|
||||
|
||||
###### parse
|
||||
|
||||
`true`
|
||||
|
||||
##### Returns
|
||||
|
||||
`Promise`\<`T`\>
|
||||
|
||||
##### Defined in
|
||||
#### Call Signature
|
||||
|
||||
[src/Innertube.ts:579](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/Innertube.ts#L579)
|
||||
> **call**(`endpoint`, `args?`): `Promise`\<[`ApiResponse`](../interfaces/ApiResponse.md)\>
|
||||
|
||||
#### call(endpoint, args)
|
||||
Defined in: [src/Innertube.ts:580](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L580)
|
||||
|
||||
> **call**(`endpoint`, `args`?): `Promise`\<[`ApiResponse`](../interfaces/ApiResponse.md)\>
|
||||
Utility method to call an endpoint without having to use [Actions](Actions.md).
|
||||
|
||||
##### Parameters
|
||||
|
||||
• **endpoint**: [`NavigationEndpoint`](../namespaces/YTNodes/classes/NavigationEndpoint.md)
|
||||
###### endpoint
|
||||
|
||||
• **args?**
|
||||
[`NavigationEndpoint`](../youtubei.js/namespaces/YTNodes/classes/NavigationEndpoint.md)
|
||||
|
||||
• **args.parse?**: `false`
|
||||
###### 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`\>\>
|
||||
> **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).
|
||||
Defined in: [src/Innertube.ts:477](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L477)
|
||||
|
||||
Downloads a given video. If all you need the direct download link, see [getStreamingData](#getstreamingdata).
|
||||
If you wish to retrieve the video info too, have a look at [getBasicInfo](#getbasicinfo) or [getInfo](#getinfo).
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **video\_id**: `string`
|
||||
##### video\_id
|
||||
|
||||
`string`
|
||||
|
||||
The video id.
|
||||
|
||||
• **options?**: [`DownloadOptions`](../namespaces/Types/interfaces/DownloadOptions.md)
|
||||
##### options?
|
||||
|
||||
[`DownloadOptions`](../youtubei.js/namespaces/Types/interfaces/DownloadOptions.md)
|
||||
|
||||
Download options.
|
||||
|
||||
@@ -230,404 +246,402 @@ Download options.
|
||||
|
||||
`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)\>
|
||||
> **getAttestationChallenge**(`engagement_type`, `ids?`): `Promise`\<[`IGetChallengeResponse`](../type-aliases/IGetChallengeResponse.md)\>
|
||||
|
||||
Defined in: [src/Innertube.ts:565](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L565)
|
||||
|
||||
Fetches an attestation challenge.
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **engagement\_type**: [`EngagementType`](../namespaces/Types/type-aliases/EngagementType.md)
|
||||
##### engagement\_type
|
||||
|
||||
• **ids?**: `Record`\<`string`, `any`\>[]
|
||||
[`EngagementType`](../youtubei.js/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)
|
||||
`Promise`\<[`IGetChallengeResponse`](../type-aliases/IGetChallengeResponse.md)\>
|
||||
|
||||
***
|
||||
|
||||
### getBasicInfo()
|
||||
|
||||
> **getBasicInfo**(`video_id`, `options`?): `Promise`\<[`VideoInfo`](../namespaces/YT/classes/VideoInfo.md)\>
|
||||
> **getBasicInfo**(`video_id`, `options?`): `Promise`\<[`VideoInfo`](../youtubei.js/namespaces/YT/classes/VideoInfo.md)\>
|
||||
|
||||
Defined in: [src/Innertube.ts:124](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L124)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **video\_id**: `string`
|
||||
##### video\_id
|
||||
|
||||
• **options?**: [`GetVideoInfoOptions`](../namespaces/Types/interfaces/GetVideoInfoOptions.md)
|
||||
`string`
|
||||
|
||||
##### options?
|
||||
|
||||
[`GetVideoInfoOptions`](../youtubei.js/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)
|
||||
`Promise`\<[`VideoInfo`](../youtubei.js/namespaces/YT/classes/VideoInfo.md)\>
|
||||
|
||||
***
|
||||
|
||||
### getChannel()
|
||||
|
||||
> **getChannel**(`id`): `Promise`\<[`Channel`](../namespaces/YT/classes/Channel.md)\>
|
||||
> **getChannel**(`id`): `Promise`\<[`Channel`](../youtubei.js/namespaces/YT/classes/Channel.md)\>
|
||||
|
||||
Defined in: [src/Innertube.ts:391](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L391)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **id**: `string`
|
||||
##### 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)
|
||||
`Promise`\<[`Channel`](../youtubei.js/namespaces/YT/classes/Channel.md)\>
|
||||
|
||||
***
|
||||
|
||||
### getChannelsFeed()
|
||||
|
||||
> **getChannelsFeed**(): `Promise`\<[`Feed`](../namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)\>\>
|
||||
> **getChannelsFeed**(): `Promise`\<[`Feed`](../youtubei.js/namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../type-aliases/IBrowseResponse.md)\>\>
|
||||
|
||||
Defined in: [src/Innertube.ts:385](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L385)
|
||||
|
||||
#### 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)
|
||||
`Promise`\<[`Feed`](../youtubei.js/namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../type-aliases/IBrowseResponse.md)\>\>
|
||||
|
||||
***
|
||||
|
||||
### getComments()
|
||||
|
||||
> **getComments**(`video_id`, `sort_by`?, `comment_id`?): `Promise`\<[`Comments`](../namespaces/YT/classes/Comments.md)\>
|
||||
> **getComments**(`video_id`, `sort_by?`, `comment_id?`): `Promise`\<[`Comments`](../youtubei.js/namespaces/YT/classes/Comments.md)\>
|
||||
|
||||
Defined in: [src/Innertube.ts:306](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L306)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **video\_id**: `string`
|
||||
##### video\_id
|
||||
|
||||
• **sort\_by?**: `"TOP_COMMENTS"` \| `"NEWEST_FIRST"`
|
||||
`string`
|
||||
|
||||
• **comment\_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)
|
||||
`Promise`\<[`Comments`](../youtubei.js/namespaces/YT/classes/Comments.md)\>
|
||||
|
||||
***
|
||||
|
||||
### getCourses()
|
||||
|
||||
> **getCourses**(): `Promise`\<[`Feed`](../namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)\>\>
|
||||
> **getCourses**(): `Promise`\<[`Feed`](../youtubei.js/namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../type-aliases/IBrowseResponse.md)\>\>
|
||||
|
||||
Defined in: [src/Innertube.ts:373](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L373)
|
||||
|
||||
#### 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)
|
||||
`Promise`\<[`Feed`](../youtubei.js/namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../type-aliases/IBrowseResponse.md)\>\>
|
||||
|
||||
***
|
||||
|
||||
### getGuide()
|
||||
|
||||
> **getGuide**(): `Promise`\<[`Guide`](../namespaces/YT/classes/Guide.md)\>
|
||||
> **getGuide**(): `Promise`\<[`Guide`](../youtubei.js/namespaces/YT/classes/Guide.md)\>
|
||||
|
||||
Defined in: [src/Innertube.ts:350](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L350)
|
||||
|
||||
#### 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)
|
||||
`Promise`\<[`Guide`](../youtubei.js/namespaces/YT/classes/Guide.md)\>
|
||||
|
||||
***
|
||||
|
||||
### getHashtag()
|
||||
|
||||
> **getHashtag**(`hashtag`): `Promise`\<[`HashtagFeed`](../namespaces/YT/classes/HashtagFeed.md)\>
|
||||
> **getHashtag**(`hashtag`): `Promise`\<[`HashtagFeed`](../youtubei.js/namespaces/YT/classes/HashtagFeed.md)\>
|
||||
|
||||
Defined in: [src/Innertube.ts:436](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L436)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **hashtag**: `string`
|
||||
##### 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)
|
||||
`Promise`\<[`HashtagFeed`](../youtubei.js/namespaces/YT/classes/HashtagFeed.md)\>
|
||||
|
||||
***
|
||||
|
||||
### getHistory()
|
||||
|
||||
> **getHistory**(): `Promise`\<[`History`](../namespaces/YT/classes/History.md)\>
|
||||
> **getHistory**(): `Promise`\<[`History`](../youtubei.js/namespaces/YT/classes/History.md)\>
|
||||
|
||||
Defined in: [src/Innertube.ts:361](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L361)
|
||||
|
||||
#### 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)
|
||||
`Promise`\<[`History`](../youtubei.js/namespaces/YT/classes/History.md)\>
|
||||
|
||||
***
|
||||
|
||||
### getHomeFeed()
|
||||
|
||||
> **getHomeFeed**(): `Promise`\<[`HomeFeed`](../namespaces/YT/classes/HomeFeed.md)\>
|
||||
> **getHomeFeed**(): `Promise`\<[`HomeFeed`](../youtubei.js/namespaces/YT/classes/HomeFeed.md)\>
|
||||
|
||||
Defined in: [src/Innertube.ts:344](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L344)
|
||||
|
||||
#### 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)
|
||||
`Promise`\<[`HomeFeed`](../youtubei.js/namespaces/YT/classes/HomeFeed.md)\>
|
||||
|
||||
***
|
||||
|
||||
### getInfo()
|
||||
|
||||
> **getInfo**(`target`, `options`?): `Promise`\<[`VideoInfo`](../namespaces/YT/classes/VideoInfo.md)\>
|
||||
> **getInfo**(`target`, `options?`): `Promise`\<[`VideoInfo`](../youtubei.js/namespaces/YT/classes/VideoInfo.md)\>
|
||||
|
||||
Defined in: [src/Innertube.ts:75](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L75)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **target**: `string` \| [`NavigationEndpoint`](../namespaces/YTNodes/classes/NavigationEndpoint.md)
|
||||
##### target
|
||||
|
||||
• **options?**: [`GetVideoInfoOptions`](../namespaces/Types/interfaces/GetVideoInfoOptions.md)
|
||||
`string` | [`NavigationEndpoint`](../youtubei.js/namespaces/YTNodes/classes/NavigationEndpoint.md)
|
||||
|
||||
##### options?
|
||||
|
||||
[`GetVideoInfoOptions`](../youtubei.js/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)
|
||||
`Promise`\<[`VideoInfo`](../youtubei.js/namespaces/YT/classes/VideoInfo.md)\>
|
||||
|
||||
***
|
||||
|
||||
### getLibrary()
|
||||
|
||||
> **getLibrary**(): `Promise`\<[`Library`](../namespaces/YT/classes/Library.md)\>
|
||||
> **getLibrary**(): `Promise`\<[`Library`](../youtubei.js/namespaces/YT/classes/Library.md)\>
|
||||
|
||||
Defined in: [src/Innertube.ts:355](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L355)
|
||||
|
||||
#### 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)
|
||||
`Promise`\<[`Library`](../youtubei.js/namespaces/YT/classes/Library.md)\>
|
||||
|
||||
***
|
||||
|
||||
### getNotifications()
|
||||
|
||||
> **getNotifications**(): `Promise`\<[`NotificationsMenu`](../namespaces/YT/classes/NotificationsMenu.md)\>
|
||||
> **getNotifications**(): `Promise`\<[`NotificationsMenu`](../youtubei.js/namespaces/YT/classes/NotificationsMenu.md)\>
|
||||
|
||||
Defined in: [src/Innertube.ts:403](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L403)
|
||||
|
||||
#### 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)
|
||||
`Promise`\<[`NotificationsMenu`](../youtubei.js/namespaces/YT/classes/NotificationsMenu.md)\>
|
||||
|
||||
***
|
||||
|
||||
### getPlaylist()
|
||||
|
||||
> **getPlaylist**(`id`): `Promise`\<[`Playlist`](../namespaces/YT/classes/Playlist.md)\>
|
||||
> **getPlaylist**(`id`): `Promise`\<[`Playlist`](../youtubei.js/namespaces/YT/classes/Playlist.md)\>
|
||||
|
||||
Defined in: [src/Innertube.ts:423](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L423)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **id**: `string`
|
||||
##### 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)
|
||||
`Promise`\<[`Playlist`](../youtubei.js/namespaces/YT/classes/Playlist.md)\>
|
||||
|
||||
***
|
||||
|
||||
### getPlaylists()
|
||||
|
||||
> **getPlaylists**(): `Promise`\<[`Feed`](../namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)\>\>
|
||||
> **getPlaylists**(): `Promise`\<[`Feed`](../youtubei.js/namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../type-aliases/IBrowseResponse.md)\>\>
|
||||
|
||||
Defined in: [src/Innertube.ts:417](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L417)
|
||||
|
||||
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)
|
||||
`Promise`\<[`Feed`](../youtubei.js/namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../type-aliases/IBrowseResponse.md)\>\>
|
||||
|
||||
***
|
||||
|
||||
### getPost()
|
||||
|
||||
> **getPost**(`post_id`, `channel_id`): `Promise`\<[`Feed`](../namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)\>\>
|
||||
> **getPost**(`post_id`, `channel_id`): `Promise`\<[`Feed`](../youtubei.js/namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../type-aliases/IBrowseResponse.md)\>\>
|
||||
|
||||
Defined in: [src/Innertube.ts:497](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L497)
|
||||
|
||||
Gets a post page given a post id and the channel id
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **post\_id**: `string`
|
||||
##### post\_id
|
||||
|
||||
• **channel\_id**: `string`
|
||||
`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)
|
||||
`Promise`\<[`Feed`](../youtubei.js/namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../type-aliases/IBrowseResponse.md)\>\>
|
||||
|
||||
***
|
||||
|
||||
### getPostComments()
|
||||
|
||||
> **getPostComments**(`post_id`, `channel_id`, `sort_by`?): `Promise`\<[`Comments`](../namespaces/YT/classes/Comments.md)\>
|
||||
> **getPostComments**(`post_id`, `channel_id`, `sort_by?`): `Promise`\<[`Comments`](../youtubei.js/namespaces/YT/classes/Comments.md)\>
|
||||
|
||||
Defined in: [src/Innertube.ts:518](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L518)
|
||||
|
||||
Gets the comments of a post.
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **post\_id**: `string`
|
||||
##### post\_id
|
||||
|
||||
• **channel\_id**: `string`
|
||||
`string`
|
||||
|
||||
• **sort\_by?**: `"TOP_COMMENTS"` \| `"NEWEST_FIRST"`
|
||||
##### 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)
|
||||
`Promise`\<[`Comments`](../youtubei.js/namespaces/YT/classes/Comments.md)\>
|
||||
|
||||
***
|
||||
|
||||
### getSearchSuggestions()
|
||||
|
||||
> **getSearchSuggestions**(`query`, `previous_query`?): `Promise`\<`string`[]\>
|
||||
> **getSearchSuggestions**(`query`, `previous_query?`): `Promise`\<`string`[]\>
|
||||
|
||||
Defined in: [src/Innertube.ts:277](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L277)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **query**: `string`
|
||||
##### query
|
||||
|
||||
• **previous\_query?**: `string`
|
||||
`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)\>
|
||||
> **getShortsVideoInfo**(`video_id`, `client?`): `Promise`\<[`ShortFormVideoInfo`](../youtubei.js/namespaces/YTShorts/classes/ShortFormVideoInfo.md)\>
|
||||
|
||||
Defined in: [src/Innertube.ts:166](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L166)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **video\_id**: `string`
|
||||
##### video\_id
|
||||
|
||||
• **client?**: [`InnerTubeClient`](../namespaces/Types/type-aliases/InnerTubeClient.md)
|
||||
`string`
|
||||
|
||||
##### client?
|
||||
|
||||
[`InnerTubeClient`](../youtubei.js/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)
|
||||
`Promise`\<[`ShortFormVideoInfo`](../youtubei.js/namespaces/YTShorts/classes/ShortFormVideoInfo.md)\>
|
||||
|
||||
***
|
||||
|
||||
### getStreamingData()
|
||||
|
||||
> **getStreamingData**(`video_id`, `options`): `Promise`\<[`Format`](../namespaces/Misc/classes/Format.md)\>
|
||||
> **getStreamingData**(`video_id`, `options`): `Promise`\<[`Format`](../youtubei.js/namespaces/Misc/classes/Format.md)\>
|
||||
|
||||
An alternative to [download](Innertube.md#download).
|
||||
Defined in: [src/Innertube.ts:462](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L462)
|
||||
|
||||
An alternative to [download](#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).
|
||||
If you wish to retrieve the video info too, have a look at [getBasicInfo](#getbasicinfo) or [getInfo](#getinfo).
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **video\_id**: `string`
|
||||
##### video\_id
|
||||
|
||||
`string`
|
||||
|
||||
The video id.
|
||||
|
||||
• **options**: [`FormatOptions`](../namespaces/Types/interfaces/FormatOptions.md) = `{}`
|
||||
##### options
|
||||
|
||||
[`FormatOptions`](../youtubei.js/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)
|
||||
`Promise`\<[`Format`](../youtubei.js/namespaces/Misc/classes/Format.md)\>
|
||||
|
||||
***
|
||||
|
||||
### getSubscriptionsFeed()
|
||||
|
||||
> **getSubscriptionsFeed**(): `Promise`\<[`Feed`](../namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)\>\>
|
||||
> **getSubscriptionsFeed**(): `Promise`\<[`Feed`](../youtubei.js/namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../type-aliases/IBrowseResponse.md)\>\>
|
||||
|
||||
Defined in: [src/Innertube.ts:379](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L379)
|
||||
|
||||
#### 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)
|
||||
`Promise`\<[`Feed`](../youtubei.js/namespaces/Mixins/classes/Feed.md)\<[`IBrowseResponse`](../type-aliases/IBrowseResponse.md)\>\>
|
||||
|
||||
***
|
||||
|
||||
### getTrending()
|
||||
|
||||
> **getTrending**(): `Promise`\<[`TabbedFeed`](../namespaces/Mixins/classes/TabbedFeed.md)\<[`IBrowseResponse`](../namespaces/APIResponseTypes/type-aliases/IBrowseResponse.md)\>\>
|
||||
> **getTrending**(): `Promise`\<[`TabbedFeed`](../youtubei.js/namespaces/Mixins/classes/TabbedFeed.md)\<[`IBrowseResponse`](../type-aliases/IBrowseResponse.md)\>\>
|
||||
|
||||
Defined in: [src/Innertube.ts:367](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L367)
|
||||
|
||||
#### 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)
|
||||
`Promise`\<[`TabbedFeed`](../youtubei.js/namespaces/Mixins/classes/TabbedFeed.md)\<[`IBrowseResponse`](../type-aliases/IBrowseResponse.md)\>\>
|
||||
|
||||
***
|
||||
|
||||
@@ -635,68 +649,68 @@ Format options.
|
||||
|
||||
> **getUnseenNotificationsCount**(): `Promise`\<`number`\>
|
||||
|
||||
Defined in: [src/Innertube.ts:408](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L408)
|
||||
|
||||
#### 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)\>
|
||||
> **resolveURL**(`url`): `Promise`\<[`NavigationEndpoint`](../youtubei.js/namespaces/YTNodes/classes/NavigationEndpoint.md)\>
|
||||
|
||||
Defined in: [src/Innertube.ts:485](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L485)
|
||||
|
||||
Resolves the given URL.
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **url**: `string`
|
||||
##### 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)
|
||||
`Promise`\<[`NavigationEndpoint`](../youtubei.js/namespaces/YTNodes/classes/NavigationEndpoint.md)\>
|
||||
|
||||
***
|
||||
|
||||
### search()
|
||||
|
||||
> **search**(`query`, `filters`): `Promise`\<[`Search`](../namespaces/YT/classes/Search.md)\>
|
||||
> **search**(`query`, `filters`): `Promise`\<[`Search`](../youtubei.js/namespaces/YT/classes/Search.md)\>
|
||||
|
||||
Defined in: [src/Innertube.ts:201](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L201)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **query**: `string`
|
||||
##### query
|
||||
|
||||
• **filters**: [`SearchFilters`](../namespaces/Types/type-aliases/SearchFilters.md) = `{}`
|
||||
`string`
|
||||
|
||||
##### filters
|
||||
|
||||
[`SearchFilters`](../youtubei.js/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)
|
||||
`Promise`\<[`Search`](../youtubei.js/namespaces/YT/classes/Search.md)\>
|
||||
|
||||
***
|
||||
|
||||
### create()
|
||||
|
||||
> `static` **create**(`config`): `Promise`\<[`Innertube`](Innertube.md)\>
|
||||
> `static` **create**(`config`): `Promise`\<`Innertube`\>
|
||||
|
||||
Defined in: [src/Innertube.ts:71](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/Innertube.ts#L71)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **config**: [`SessionOptions`](../type-aliases/SessionOptions.md) = `{}`
|
||||
##### 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)
|
||||
`Promise`\<`Innertube`\>
|
||||
|
||||
@@ -2,41 +2,41 @@
|
||||
|
||||
# Class: ItemSectionContinuation
|
||||
|
||||
Defined in: [src/parser/continuations.ts:9](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L9)
|
||||
|
||||
## Extends
|
||||
|
||||
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
- [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new ItemSectionContinuation()
|
||||
### Constructor
|
||||
|
||||
> **new ItemSectionContinuation**(`data`): [`ItemSectionContinuation`](ItemSectionContinuation.md)
|
||||
> **new ItemSectionContinuation**(`data`): `ItemSectionContinuation`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:15](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L15)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
|
||||
##### data
|
||||
|
||||
[`RawNode`](../type-aliases/RawNode.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ItemSectionContinuation`](ItemSectionContinuation.md)
|
||||
`ItemSectionContinuation`
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L15)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`constructor`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#constructor)
|
||||
|
||||
## Properties
|
||||
|
||||
### contents
|
||||
|
||||
> **contents**: [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
|
||||
> **contents**: [`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L12)
|
||||
Defined in: [src/parser/continuations.ts:12](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L12)
|
||||
|
||||
***
|
||||
|
||||
@@ -44,9 +44,7 @@
|
||||
|
||||
> `optional` **continuation**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L13)
|
||||
Defined in: [src/parser/continuations.ts:13](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L13)
|
||||
|
||||
***
|
||||
|
||||
@@ -54,13 +52,11 @@
|
||||
|
||||
> `readonly` **type**: `string`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type)
|
||||
|
||||
***
|
||||
|
||||
@@ -68,13 +64,11 @@
|
||||
|
||||
> `readonly` `static` **type**: `"itemSectionContinuation"` = `'itemSectionContinuation'`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:10](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L10)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L10)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type-1)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -82,17 +76,25 @@
|
||||
|
||||
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
|
||||
|
||||
Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L29)
|
||||
|
||||
Cast to one of the given types.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The types to cast to
|
||||
|
||||
@@ -108,11 +110,7 @@ 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:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`as`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#as)
|
||||
|
||||
***
|
||||
|
||||
@@ -120,17 +118,25 @@ If the node is not of the given type
|
||||
|
||||
> **hasKey**\<`T`, `R`\>(`key`): `this is ItemSectionContinuation & { [k in string]: R }`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L41)
|
||||
|
||||
Check for a key without asserting the type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
@@ -142,11 +148,7 @@ 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:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`hasKey`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#haskey)
|
||||
|
||||
***
|
||||
|
||||
@@ -154,17 +156,25 @@ Whether the node has the key
|
||||
|
||||
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19)
|
||||
|
||||
Check if the node is of the given type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The type to check
|
||||
|
||||
@@ -176,35 +186,39 @@ 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:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`is`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#is)
|
||||
|
||||
***
|
||||
|
||||
### key()
|
||||
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L51)
|
||||
|
||||
Assert that the node has the given key and return it.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
[`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
The value of the key wrapped in a Maybe
|
||||
|
||||
@@ -214,8 +228,4 @@ 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:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`key`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#key)
|
||||
|
||||
@@ -2,51 +2,49 @@
|
||||
|
||||
# Class: LiveChatContinuation
|
||||
|
||||
Defined in: [src/parser/continuations.ts:156](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L156)
|
||||
|
||||
## Extends
|
||||
|
||||
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
- [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new LiveChatContinuation()
|
||||
### Constructor
|
||||
|
||||
> **new LiveChatContinuation**(`data`): [`LiveChatContinuation`](LiveChatContinuation.md)
|
||||
> **new LiveChatContinuation**(`data`): `LiveChatContinuation`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:174](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L174)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
|
||||
##### data
|
||||
|
||||
[`RawNode`](../type-aliases/RawNode.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`LiveChatContinuation`](LiveChatContinuation.md)
|
||||
`LiveChatContinuation`
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L174)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`constructor`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#constructor)
|
||||
|
||||
## Properties
|
||||
|
||||
### action\_panel
|
||||
|
||||
> **action\_panel**: `null` \| [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
> **action\_panel**: [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md) \| `null`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:160](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L160)
|
||||
Defined in: [src/parser/continuations.ts:160](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L160)
|
||||
|
||||
***
|
||||
|
||||
### actions
|
||||
|
||||
> **actions**: [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
|
||||
> **actions**: [`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:159](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L159)
|
||||
Defined in: [src/parser/continuations.ts:159](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L159)
|
||||
|
||||
***
|
||||
|
||||
@@ -54,9 +52,7 @@
|
||||
|
||||
> **continuation**: [`Continuation`](Continuation.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:171](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L171)
|
||||
Defined in: [src/parser/continuations.ts:171](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L171)
|
||||
|
||||
***
|
||||
|
||||
@@ -64,49 +60,55 @@
|
||||
|
||||
> **emojis**: `object`[]
|
||||
|
||||
#### Defined in
|
||||
Defined in: [src/parser/continuations.ts:165](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L165)
|
||||
|
||||
[src/parser/continuations.ts:165](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L165)
|
||||
#### emoji\_id
|
||||
|
||||
> **emoji\_id**: `string`
|
||||
|
||||
#### image
|
||||
|
||||
> **image**: [`Thumbnail`](../youtubei.js/namespaces/Misc/classes/Thumbnail.md)[]
|
||||
|
||||
#### search\_terms
|
||||
|
||||
> **search\_terms**: `string`[]
|
||||
|
||||
#### shortcuts
|
||||
|
||||
> **shortcuts**: `string`[]
|
||||
|
||||
***
|
||||
|
||||
### header
|
||||
|
||||
> **header**: `null` \| [`LiveChatHeader`](../namespaces/YTNodes/classes/LiveChatHeader.md)
|
||||
> **header**: [`LiveChatHeader`](../youtubei.js/namespaces/YTNodes/classes/LiveChatHeader.md) \| `null`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:162](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L162)
|
||||
Defined in: [src/parser/continuations.ts:162](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L162)
|
||||
|
||||
***
|
||||
|
||||
### item\_list
|
||||
|
||||
> **item\_list**: `null` \| [`LiveChatItemList`](../namespaces/YTNodes/classes/LiveChatItemList.md)
|
||||
> **item\_list**: [`LiveChatItemList`](../youtubei.js/namespaces/YTNodes/classes/LiveChatItemList.md) \| `null`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:161](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L161)
|
||||
Defined in: [src/parser/continuations.ts:161](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L161)
|
||||
|
||||
***
|
||||
|
||||
### participants\_list
|
||||
|
||||
> **participants\_list**: `null` \| [`LiveChatParticipantsList`](../namespaces/YTNodes/classes/LiveChatParticipantsList.md)
|
||||
> **participants\_list**: [`LiveChatParticipantsList`](../youtubei.js/namespaces/YTNodes/classes/LiveChatParticipantsList.md) \| `null`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:163](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L163)
|
||||
Defined in: [src/parser/continuations.ts:163](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L163)
|
||||
|
||||
***
|
||||
|
||||
### popout\_message
|
||||
|
||||
> **popout\_message**: `null` \| [`Message`](../namespaces/YTNodes/classes/Message.md)
|
||||
> **popout\_message**: [`Message`](../youtubei.js/namespaces/YTNodes/classes/Message.md) \| `null`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:164](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L164)
|
||||
Defined in: [src/parser/continuations.ts:164](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L164)
|
||||
|
||||
***
|
||||
|
||||
@@ -114,13 +116,11 @@
|
||||
|
||||
> `readonly` **type**: `string`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type)
|
||||
|
||||
***
|
||||
|
||||
@@ -128,9 +128,7 @@
|
||||
|
||||
> **viewer\_name**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:172](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L172)
|
||||
Defined in: [src/parser/continuations.ts:172](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L172)
|
||||
|
||||
***
|
||||
|
||||
@@ -138,13 +136,11 @@
|
||||
|
||||
> `readonly` `static` **type**: `"liveChatContinuation"` = `'liveChatContinuation'`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:157](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L157)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L157)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type-1)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -152,17 +148,25 @@
|
||||
|
||||
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
|
||||
|
||||
Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L29)
|
||||
|
||||
Cast to one of the given types.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The types to cast to
|
||||
|
||||
@@ -178,11 +182,7 @@ 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:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`as`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#as)
|
||||
|
||||
***
|
||||
|
||||
@@ -190,17 +190,25 @@ If the node is not of the given type
|
||||
|
||||
> **hasKey**\<`T`, `R`\>(`key`): `this is LiveChatContinuation & { [k in string]: R }`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L41)
|
||||
|
||||
Check for a key without asserting the type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
@@ -212,11 +220,7 @@ 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:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`hasKey`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#haskey)
|
||||
|
||||
***
|
||||
|
||||
@@ -224,17 +228,25 @@ Whether the node has the key
|
||||
|
||||
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19)
|
||||
|
||||
Check if the node is of the given type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The type to check
|
||||
|
||||
@@ -246,35 +258,39 @@ 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:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`is`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#is)
|
||||
|
||||
***
|
||||
|
||||
### key()
|
||||
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L51)
|
||||
|
||||
Assert that the node has the given key and return it.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
[`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
The value of the key wrapped in a Maybe
|
||||
|
||||
@@ -284,8 +300,4 @@ 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:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`key`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#key)
|
||||
|
||||
@@ -2,41 +2,41 @@
|
||||
|
||||
# Class: MusicPlaylistShelfContinuation
|
||||
|
||||
Defined in: [src/parser/continuations.ts:80](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L80)
|
||||
|
||||
## Extends
|
||||
|
||||
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
- [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new MusicPlaylistShelfContinuation()
|
||||
### Constructor
|
||||
|
||||
> **new MusicPlaylistShelfContinuation**(`data`): [`MusicPlaylistShelfContinuation`](MusicPlaylistShelfContinuation.md)
|
||||
> **new MusicPlaylistShelfContinuation**(`data`): `MusicPlaylistShelfContinuation`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:86](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L86)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
|
||||
##### data
|
||||
|
||||
[`RawNode`](../type-aliases/RawNode.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`MusicPlaylistShelfContinuation`](MusicPlaylistShelfContinuation.md)
|
||||
`MusicPlaylistShelfContinuation`
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L86)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`constructor`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#constructor)
|
||||
|
||||
## Properties
|
||||
|
||||
### contents
|
||||
|
||||
> **contents**: `null` \| [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
|
||||
> **contents**: [`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\> \| `null`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:84](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L84)
|
||||
Defined in: [src/parser/continuations.ts:84](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L84)
|
||||
|
||||
***
|
||||
|
||||
@@ -44,9 +44,7 @@
|
||||
|
||||
> **continuation**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:83](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L83)
|
||||
Defined in: [src/parser/continuations.ts:83](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L83)
|
||||
|
||||
***
|
||||
|
||||
@@ -54,13 +52,11 @@
|
||||
|
||||
> `readonly` **type**: `string`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type)
|
||||
|
||||
***
|
||||
|
||||
@@ -68,13 +64,11 @@
|
||||
|
||||
> `readonly` `static` **type**: `"musicPlaylistShelfContinuation"` = `'musicPlaylistShelfContinuation'`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:81](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L81)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L81)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type-1)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -82,17 +76,25 @@
|
||||
|
||||
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
|
||||
|
||||
Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L29)
|
||||
|
||||
Cast to one of the given types.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The types to cast to
|
||||
|
||||
@@ -108,11 +110,7 @@ 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:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`as`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#as)
|
||||
|
||||
***
|
||||
|
||||
@@ -120,17 +118,25 @@ If the node is not of the given type
|
||||
|
||||
> **hasKey**\<`T`, `R`\>(`key`): `this is MusicPlaylistShelfContinuation & { [k in string]: R }`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L41)
|
||||
|
||||
Check for a key without asserting the type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
@@ -142,11 +148,7 @@ 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:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`hasKey`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#haskey)
|
||||
|
||||
***
|
||||
|
||||
@@ -154,17 +156,25 @@ Whether the node has the key
|
||||
|
||||
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19)
|
||||
|
||||
Check if the node is of the given type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The type to check
|
||||
|
||||
@@ -176,35 +186,39 @@ 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:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`is`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#is)
|
||||
|
||||
***
|
||||
|
||||
### key()
|
||||
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L51)
|
||||
|
||||
Assert that the node has the given key and return it.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
[`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
The value of the key wrapped in a Maybe
|
||||
|
||||
@@ -214,8 +228,4 @@ 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:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`key`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#key)
|
||||
|
||||
@@ -2,41 +2,41 @@
|
||||
|
||||
# Class: MusicShelfContinuation
|
||||
|
||||
Defined in: [src/parser/continuations.ts:93](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L93)
|
||||
|
||||
## Extends
|
||||
|
||||
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
- [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new MusicShelfContinuation()
|
||||
### Constructor
|
||||
|
||||
> **new MusicShelfContinuation**(`data`): [`MusicShelfContinuation`](MusicShelfContinuation.md)
|
||||
> **new MusicShelfContinuation**(`data`): `MusicShelfContinuation`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:99](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L99)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
|
||||
##### data
|
||||
|
||||
[`RawNode`](../type-aliases/RawNode.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`MusicShelfContinuation`](MusicShelfContinuation.md)
|
||||
`MusicShelfContinuation`
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L99)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`constructor`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#constructor)
|
||||
|
||||
## Properties
|
||||
|
||||
### contents
|
||||
|
||||
> **contents**: [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
|
||||
> **contents**: [`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:97](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L97)
|
||||
Defined in: [src/parser/continuations.ts:97](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L97)
|
||||
|
||||
***
|
||||
|
||||
@@ -44,9 +44,7 @@
|
||||
|
||||
> **continuation**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:96](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L96)
|
||||
Defined in: [src/parser/continuations.ts:96](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L96)
|
||||
|
||||
***
|
||||
|
||||
@@ -54,13 +52,11 @@
|
||||
|
||||
> `readonly` **type**: `string`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type)
|
||||
|
||||
***
|
||||
|
||||
@@ -68,13 +64,11 @@
|
||||
|
||||
> `readonly` `static` **type**: `"musicShelfContinuation"` = `'musicShelfContinuation'`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:94](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L94)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L94)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type-1)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -82,17 +76,25 @@
|
||||
|
||||
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
|
||||
|
||||
Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L29)
|
||||
|
||||
Cast to one of the given types.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The types to cast to
|
||||
|
||||
@@ -108,11 +110,7 @@ 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:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`as`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#as)
|
||||
|
||||
***
|
||||
|
||||
@@ -120,17 +118,25 @@ If the node is not of the given type
|
||||
|
||||
> **hasKey**\<`T`, `R`\>(`key`): `this is MusicShelfContinuation & { [k in string]: R }`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L41)
|
||||
|
||||
Check for a key without asserting the type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
@@ -142,11 +148,7 @@ 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:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`hasKey`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#haskey)
|
||||
|
||||
***
|
||||
|
||||
@@ -154,17 +156,25 @@ Whether the node has the key
|
||||
|
||||
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19)
|
||||
|
||||
Check if the node is of the given type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The type to check
|
||||
|
||||
@@ -176,35 +186,39 @@ 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:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`is`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#is)
|
||||
|
||||
***
|
||||
|
||||
### key()
|
||||
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L51)
|
||||
|
||||
Assert that the node has the given key and return it.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
[`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
The value of the key wrapped in a Maybe
|
||||
|
||||
@@ -214,8 +228,4 @@ 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:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`key`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#key)
|
||||
|
||||
@@ -2,41 +2,41 @@
|
||||
|
||||
# Class: NavigateAction
|
||||
|
||||
Defined in: [src/parser/continuations.ts:24](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L24)
|
||||
|
||||
## Extends
|
||||
|
||||
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
- [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new NavigateAction()
|
||||
### Constructor
|
||||
|
||||
> **new NavigateAction**(`data`): [`NavigateAction`](NavigateAction.md)
|
||||
> **new NavigateAction**(`data`): `NavigateAction`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:29](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L29)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
|
||||
##### data
|
||||
|
||||
[`RawNode`](../type-aliases/RawNode.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`NavigateAction`](NavigateAction.md)
|
||||
`NavigateAction`
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L29)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`constructor`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#constructor)
|
||||
|
||||
## Properties
|
||||
|
||||
### endpoint
|
||||
|
||||
> **endpoint**: [`NavigationEndpoint`](../namespaces/YTNodes/classes/NavigationEndpoint.md)
|
||||
> **endpoint**: [`NavigationEndpoint`](../youtubei.js/namespaces/YTNodes/classes/NavigationEndpoint.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:27](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L27)
|
||||
Defined in: [src/parser/continuations.ts:27](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L27)
|
||||
|
||||
***
|
||||
|
||||
@@ -44,13 +44,11 @@
|
||||
|
||||
> `readonly` **type**: `string`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type)
|
||||
|
||||
***
|
||||
|
||||
@@ -58,13 +56,11 @@
|
||||
|
||||
> `readonly` `static` **type**: `"navigateAction"` = `'navigateAction'`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:25](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L25)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L25)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type-1)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -72,17 +68,25 @@
|
||||
|
||||
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
|
||||
|
||||
Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L29)
|
||||
|
||||
Cast to one of the given types.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The types to cast to
|
||||
|
||||
@@ -98,11 +102,7 @@ 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:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`as`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#as)
|
||||
|
||||
***
|
||||
|
||||
@@ -110,17 +110,25 @@ If the node is not of the given type
|
||||
|
||||
> **hasKey**\<`T`, `R`\>(`key`): `this is NavigateAction & { [k in string]: R }`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L41)
|
||||
|
||||
Check for a key without asserting the type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
@@ -132,11 +140,7 @@ 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:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`hasKey`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#haskey)
|
||||
|
||||
***
|
||||
|
||||
@@ -144,17 +148,25 @@ Whether the node has the key
|
||||
|
||||
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19)
|
||||
|
||||
Check if the node is of the given type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The type to check
|
||||
|
||||
@@ -166,35 +178,39 @@ 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:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`is`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#is)
|
||||
|
||||
***
|
||||
|
||||
### key()
|
||||
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L51)
|
||||
|
||||
Assert that the node has the given key and return it.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
[`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
The value of the key wrapped in a Maybe
|
||||
|
||||
@@ -204,8 +220,4 @@ 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:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`key`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#key)
|
||||
|
||||
@@ -2,23 +2,25 @@
|
||||
|
||||
# Class: OAuth2
|
||||
|
||||
Defined in: [src/core/OAuth2.ts:35](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L35)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new OAuth2()
|
||||
### Constructor
|
||||
|
||||
> **new OAuth2**(`session`): [`OAuth2`](OAuth2.md)
|
||||
> **new OAuth2**(`session`): `OAuth2`
|
||||
|
||||
Defined in: [src/core/OAuth2.ts:46](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L46)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **session**: [`Session`](Session.md)
|
||||
##### session
|
||||
|
||||
[`Session`](Session.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`OAuth2`](OAuth2.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:46](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L46)
|
||||
`OAuth2`
|
||||
|
||||
## Properties
|
||||
|
||||
@@ -26,9 +28,7 @@
|
||||
|
||||
> **AUTH\_SERVER\_CODE\_URL**: `URL`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:39](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L39)
|
||||
Defined in: [src/core/OAuth2.ts:39](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L39)
|
||||
|
||||
***
|
||||
|
||||
@@ -36,9 +36,7 @@
|
||||
|
||||
> **AUTH\_SERVER\_REVOKE\_TOKEN\_URL**: `URL`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L41)
|
||||
Defined in: [src/core/OAuth2.ts:41](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L41)
|
||||
|
||||
***
|
||||
|
||||
@@ -46,29 +44,23 @@
|
||||
|
||||
> **AUTH\_SERVER\_TOKEN\_URL**: `URL`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:40](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L40)
|
||||
Defined in: [src/core/OAuth2.ts:40](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L40)
|
||||
|
||||
***
|
||||
|
||||
### client\_id
|
||||
|
||||
> **client\_id**: `undefined` \| [`OAuth2ClientID`](../type-aliases/OAuth2ClientID.md)
|
||||
> **client\_id**: [`OAuth2ClientID`](../type-aliases/OAuth2ClientID.md) \| `undefined`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:43](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L43)
|
||||
Defined in: [src/core/OAuth2.ts:43](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L43)
|
||||
|
||||
***
|
||||
|
||||
### oauth2\_tokens
|
||||
|
||||
> **oauth2\_tokens**: `undefined` \| [`OAuth2Tokens`](../type-aliases/OAuth2Tokens.md)
|
||||
> **oauth2\_tokens**: [`OAuth2Tokens`](../type-aliases/OAuth2Tokens.md) \| `undefined`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:44](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L44)
|
||||
Defined in: [src/core/OAuth2.ts:44](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L44)
|
||||
|
||||
***
|
||||
|
||||
@@ -76,9 +68,7 @@
|
||||
|
||||
> **YTTV\_URL**: `URL`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:38](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L38)
|
||||
Defined in: [src/core/OAuth2.ts:38](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L38)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -86,119 +76,107 @@
|
||||
|
||||
> **cacheCredentials**(): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/core/OAuth2.ts:105](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L105)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`void`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:105](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L105)
|
||||
|
||||
***
|
||||
|
||||
### getClientID()
|
||||
|
||||
> **getClientID**(): `Promise`\<[`OAuth2ClientID`](../type-aliases/OAuth2ClientID.md)\>
|
||||
|
||||
Defined in: [src/core/OAuth2.ts:268](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L268)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<[`OAuth2ClientID`](../type-aliases/OAuth2ClientID.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:268](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L268)
|
||||
|
||||
***
|
||||
|
||||
### getDeviceAndUserCode()
|
||||
|
||||
> **getDeviceAndUserCode**(): `Promise`\<[`DeviceAndUserCode`](../type-aliases/DeviceAndUserCode.md)\>
|
||||
|
||||
Defined in: [src/core/OAuth2.ts:236](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L236)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<[`DeviceAndUserCode`](../type-aliases/DeviceAndUserCode.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:236](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L236)
|
||||
|
||||
***
|
||||
|
||||
### init()
|
||||
|
||||
> **init**(`tokens`?): `Promise`\<`void`\>
|
||||
> **init**(`tokens?`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/core/OAuth2.ts:54](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L54)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **tokens?**: [`OAuth2Tokens`](../type-aliases/OAuth2Tokens.md)
|
||||
##### tokens?
|
||||
|
||||
[`OAuth2Tokens`](../type-aliases/OAuth2Tokens.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`void`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:54](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L54)
|
||||
|
||||
***
|
||||
|
||||
### pollForAccessToken()
|
||||
|
||||
> **pollForAccessToken**(`device_and_user_code`): `void`
|
||||
|
||||
Defined in: [src/core/OAuth2.ts:130](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L130)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **device\_and\_user\_code**: [`DeviceAndUserCode`](../type-aliases/DeviceAndUserCode.md)
|
||||
##### 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/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L130)
|
||||
|
||||
***
|
||||
|
||||
### refreshAccessToken()
|
||||
|
||||
> **refreshAccessToken**(): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/core/OAuth2.ts:197](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L197)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`void`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:197](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L197)
|
||||
|
||||
***
|
||||
|
||||
### removeCache()
|
||||
|
||||
> **removeCache**(): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/core/OAuth2.ts:126](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L126)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`void`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:126](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L126)
|
||||
|
||||
***
|
||||
|
||||
### revokeCredentials()
|
||||
|
||||
> **revokeCredentials**(): `Promise`\<`undefined` \| `Response`\>
|
||||
> **revokeCredentials**(): `Promise`\<`Response` \| `undefined`\>
|
||||
|
||||
Defined in: [src/core/OAuth2.ts:185](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L185)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`undefined` \| `Response`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:185](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L185)
|
||||
`Promise`\<`Response` \| `undefined`\>
|
||||
|
||||
***
|
||||
|
||||
@@ -206,46 +184,44 @@
|
||||
|
||||
> **setTokens**(`tokens`): `void`
|
||||
|
||||
Defined in: [src/core/OAuth2.ts:85](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L85)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **tokens**: [`OAuth2Tokens`](../type-aliases/OAuth2Tokens.md)
|
||||
##### tokens
|
||||
|
||||
[`OAuth2Tokens`](../type-aliases/OAuth2Tokens.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:85](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L85)
|
||||
|
||||
***
|
||||
|
||||
### shouldRefreshToken()
|
||||
|
||||
> **shouldRefreshToken**(): `boolean`
|
||||
|
||||
Defined in: [src/core/OAuth2.ts:313](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L313)
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:313](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L313)
|
||||
|
||||
***
|
||||
|
||||
### validateTokens()
|
||||
|
||||
> **validateTokens**(`tokens`): `boolean`
|
||||
|
||||
Defined in: [src/core/OAuth2.ts:319](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/OAuth2.ts#L319)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **tokens**: [`OAuth2Tokens`](../type-aliases/OAuth2Tokens.md)
|
||||
##### tokens
|
||||
|
||||
[`OAuth2Tokens`](../type-aliases/OAuth2Tokens.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/OAuth2.ts:319](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/OAuth2.ts#L319)
|
||||
|
||||
@@ -2,29 +2,31 @@
|
||||
|
||||
# Class: Platform
|
||||
|
||||
Defined in: [src/utils/Utils.ts:15](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/Utils.ts#L15)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new Platform()
|
||||
### Constructor
|
||||
|
||||
> **new Platform**(): [`Platform`](Platform.md)
|
||||
> **new Platform**(): `Platform`
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Platform`](Platform.md)
|
||||
`Platform`
|
||||
|
||||
## Accessors
|
||||
|
||||
### shim
|
||||
|
||||
> `get` `static` **shim**(): [`PlatformShim`](../namespaces/Types/interfaces/PlatformShim.md)
|
||||
#### Get Signature
|
||||
|
||||
#### Returns
|
||||
> **get** `static` **shim**(): [`PlatformShim`](../youtubei.js/namespaces/Types/interfaces/PlatformShim.md)
|
||||
|
||||
[`PlatformShim`](../namespaces/Types/interfaces/PlatformShim.md)
|
||||
Defined in: [src/utils/Utils.ts:20](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/Utils.ts#L20)
|
||||
|
||||
#### Defined in
|
||||
##### Returns
|
||||
|
||||
[src/utils/Utils.ts:20](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L20)
|
||||
[`PlatformShim`](../youtubei.js/namespaces/Types/interfaces/PlatformShim.md)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -32,14 +34,14 @@
|
||||
|
||||
> `static` **load**(`platform`): `void`
|
||||
|
||||
Defined in: [src/utils/Utils.ts:16](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/Utils.ts#L16)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **platform**: [`PlatformShim`](../namespaces/Types/interfaces/PlatformShim.md)
|
||||
##### platform
|
||||
|
||||
[`PlatformShim`](../youtubei.js/namespaces/Types/interfaces/PlatformShim.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/utils/Utils.ts:16](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L16)
|
||||
|
||||
@@ -2,39 +2,43 @@
|
||||
|
||||
# Class: Player
|
||||
|
||||
Defined in: [src/core/Player.ts:37](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L37)
|
||||
|
||||
Represents YouTube's player script. This is required to decipher signatures.
|
||||
|
||||
## Constructors
|
||||
|
||||
### new Player()
|
||||
### Constructor
|
||||
|
||||
> **new Player**(`player_id`, `signature_timestamp`, `data`?): [`Player`](Player.md)
|
||||
> **new Player**(`player_id`, `signature_timestamp`, `data?`): `Player`
|
||||
|
||||
Defined in: [src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L40)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **player\_id**: `string`
|
||||
##### player\_id
|
||||
|
||||
• **signature\_timestamp**: `number`
|
||||
`string`
|
||||
|
||||
• **data?**: [`BuildScriptResult`](../namespaces/Types/interfaces/BuildScriptResult.md)
|
||||
##### signature\_timestamp
|
||||
|
||||
`number`
|
||||
|
||||
##### data?
|
||||
|
||||
[`BuildScriptResult`](../youtubei.js/namespaces/Types/interfaces/BuildScriptResult.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Player`](Player.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Player.ts#L40)
|
||||
`Player`
|
||||
|
||||
## Properties
|
||||
|
||||
### data?
|
||||
|
||||
> `optional` **data**: [`BuildScriptResult`](../namespaces/Types/interfaces/BuildScriptResult.md)
|
||||
> `optional` **data**: [`BuildScriptResult`](../youtubei.js/namespaces/Types/interfaces/BuildScriptResult.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Player.ts#L40)
|
||||
Defined in: [src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L40)
|
||||
|
||||
***
|
||||
|
||||
@@ -42,9 +46,7 @@ Represents YouTube's player script. This is required to decipher signatures.
|
||||
|
||||
> **player\_id**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Player.ts#L40)
|
||||
Defined in: [src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L40)
|
||||
|
||||
***
|
||||
|
||||
@@ -52,9 +54,7 @@ Represents YouTube's player script. This is required to decipher signatures.
|
||||
|
||||
> `optional` **po\_token**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Player.ts:38](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Player.ts#L38)
|
||||
Defined in: [src/core/Player.ts:38](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L38)
|
||||
|
||||
***
|
||||
|
||||
@@ -62,140 +62,154 @@ Represents YouTube's player script. This is required to decipher signatures.
|
||||
|
||||
> **signature\_timestamp**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Player.ts#L40)
|
||||
Defined in: [src/core/Player.ts:40](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L40)
|
||||
|
||||
## Accessors
|
||||
|
||||
### url
|
||||
|
||||
> `get` **url**(): `string`
|
||||
#### Get Signature
|
||||
|
||||
#### Returns
|
||||
> **get** **url**(): `string`
|
||||
|
||||
Defined in: [src/core/Player.ts:284](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L284)
|
||||
|
||||
##### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Player.ts:284](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Player.ts#L284)
|
||||
|
||||
***
|
||||
|
||||
### LIBRARY\_VERSION
|
||||
|
||||
> `get` `static` **LIBRARY\_VERSION**(): `number`
|
||||
#### Get Signature
|
||||
|
||||
#### Returns
|
||||
> **get** `static` **LIBRARY\_VERSION**(): `number`
|
||||
|
||||
Defined in: [src/core/Player.ts:288](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L288)
|
||||
|
||||
##### Returns
|
||||
|
||||
`number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Player.ts:288](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Player.ts#L288)
|
||||
|
||||
## Methods
|
||||
|
||||
### cache()
|
||||
|
||||
> **cache**(`cache`?): `Promise`\<`void`\>
|
||||
> **cache**(`cache?`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/core/Player.ts:270](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L270)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **cache?**: [`ICache`](../namespaces/Types/interfaces/ICache.md)
|
||||
##### cache?
|
||||
|
||||
[`ICache`](../youtubei.js/namespaces/Types/interfaces/ICache.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`void`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Player.ts:270](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Player.ts#L270)
|
||||
|
||||
***
|
||||
|
||||
### decipher()
|
||||
|
||||
> **decipher**(`url`?, `signature_cipher`?, `cipher`?, `this_response_nsig_cache`?): `Promise`\<`string`\>
|
||||
> **decipher**(`url?`, `signature_cipher?`, `cipher?`, `this_response_nsig_cache?`): `Promise`\<`string`\>
|
||||
|
||||
Defined in: [src/core/Player.ts:134](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L134)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **url?**: `string`
|
||||
##### url?
|
||||
|
||||
• **signature\_cipher?**: `string`
|
||||
`string`
|
||||
|
||||
• **cipher?**: `string`
|
||||
##### signature\_cipher?
|
||||
|
||||
• **this\_response\_nsig\_cache?**: `Map`\<`string`, `string`\>
|
||||
`string`
|
||||
|
||||
##### cipher?
|
||||
|
||||
`string`
|
||||
|
||||
##### this\_response\_nsig\_cache?
|
||||
|
||||
`Map`\<`string`, `string`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`string`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Player.ts:134](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Player.ts#L134)
|
||||
|
||||
***
|
||||
|
||||
### create()
|
||||
|
||||
> `static` **create**(`cache`, `fetch`, `po_token`?, `player_id`?): `Promise`\<[`Player`](Player.md)\>
|
||||
> `static` **create**(`cache`, `fetch`, `po_token?`, `player_id?`): `Promise`\<`Player`\>
|
||||
|
||||
Defined in: [src/core/Player.ts:42](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L42)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **cache**: `undefined` \| [`ICache`](../namespaces/Types/interfaces/ICache.md)
|
||||
##### cache
|
||||
|
||||
• **fetch** = `Platform.shim.fetch`
|
||||
[`ICache`](../youtubei.js/namespaces/Types/interfaces/ICache.md) | `undefined`
|
||||
|
||||
• **po\_token?**: `string`
|
||||
##### fetch
|
||||
|
||||
• **player\_id?**: `string`
|
||||
\{(`input`, `init?`): `Promise`\<`Response`\>; (`input`, `init?`): `Promise`\<`Response`\>; \}
|
||||
|
||||
##### po\_token?
|
||||
|
||||
`string`
|
||||
|
||||
##### player\_id?
|
||||
|
||||
`string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<[`Player`](Player.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Player.ts:42](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Player.ts#L42)
|
||||
`Promise`\<`Player`\>
|
||||
|
||||
***
|
||||
|
||||
### fromCache()
|
||||
|
||||
> `static` **fromCache**(`cache`, `player_id`): `Promise`\<`null` \| [`Player`](Player.md)\>
|
||||
> `static` **fromCache**(`cache`, `player_id`): `Promise`\<`Player` \| `null`\>
|
||||
|
||||
Defined in: [src/core/Player.ts:243](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L243)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **cache**: [`ICache`](../namespaces/Types/interfaces/ICache.md)
|
||||
##### cache
|
||||
|
||||
• **player\_id**: `string`
|
||||
[`ICache`](../youtubei.js/namespaces/Types/interfaces/ICache.md)
|
||||
|
||||
##### player\_id
|
||||
|
||||
`string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`null` \| [`Player`](Player.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Player.ts:243](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Player.ts#L243)
|
||||
`Promise`\<`Player` \| `null`\>
|
||||
|
||||
***
|
||||
|
||||
### fromSource()
|
||||
|
||||
> `static` **fromSource**(`player_id`, `options`): `Promise`\<[`Player`](Player.md)\>
|
||||
> `static` **fromSource**(`player_id`, `options`): `Promise`\<`Player`\>
|
||||
|
||||
Defined in: [src/core/Player.ts:264](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Player.ts#L264)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **player\_id**: `string`
|
||||
##### player\_id
|
||||
|
||||
• **options**: `PlayerInitializationOptions`
|
||||
`string`
|
||||
|
||||
##### options
|
||||
|
||||
`PlayerInitializationOptions`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<[`Player`](Player.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Player.ts:264](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Player.ts#L264)
|
||||
`Promise`\<`Player`\>
|
||||
|
||||
@@ -2,41 +2,41 @@
|
||||
|
||||
# Class: PlaylistPanelContinuation
|
||||
|
||||
Defined in: [src/parser/continuations.ts:125](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L125)
|
||||
|
||||
## Extends
|
||||
|
||||
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
- [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new PlaylistPanelContinuation()
|
||||
### Constructor
|
||||
|
||||
> **new PlaylistPanelContinuation**(`data`): [`PlaylistPanelContinuation`](PlaylistPanelContinuation.md)
|
||||
> **new PlaylistPanelContinuation**(`data`): `PlaylistPanelContinuation`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:131](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L131)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
|
||||
##### data
|
||||
|
||||
[`RawNode`](../type-aliases/RawNode.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`PlaylistPanelContinuation`](PlaylistPanelContinuation.md)
|
||||
`PlaylistPanelContinuation`
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L131)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`constructor`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#constructor)
|
||||
|
||||
## Properties
|
||||
|
||||
### contents
|
||||
|
||||
> **contents**: [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
|
||||
> **contents**: [`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:129](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L129)
|
||||
Defined in: [src/parser/continuations.ts:129](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L129)
|
||||
|
||||
***
|
||||
|
||||
@@ -44,9 +44,7 @@
|
||||
|
||||
> **continuation**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:128](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L128)
|
||||
Defined in: [src/parser/continuations.ts:128](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L128)
|
||||
|
||||
***
|
||||
|
||||
@@ -54,13 +52,11 @@
|
||||
|
||||
> `readonly` **type**: `string`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type)
|
||||
|
||||
***
|
||||
|
||||
@@ -68,13 +64,11 @@
|
||||
|
||||
> `readonly` `static` **type**: `"playlistPanelContinuation"` = `'playlistPanelContinuation'`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:126](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L126)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L126)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type-1)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -82,17 +76,25 @@
|
||||
|
||||
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
|
||||
|
||||
Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L29)
|
||||
|
||||
Cast to one of the given types.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The types to cast to
|
||||
|
||||
@@ -108,11 +110,7 @@ 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:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`as`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#as)
|
||||
|
||||
***
|
||||
|
||||
@@ -120,17 +118,25 @@ If the node is not of the given type
|
||||
|
||||
> **hasKey**\<`T`, `R`\>(`key`): `this is PlaylistPanelContinuation & { [k in string]: R }`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L41)
|
||||
|
||||
Check for a key without asserting the type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
@@ -142,11 +148,7 @@ 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:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`hasKey`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#haskey)
|
||||
|
||||
***
|
||||
|
||||
@@ -154,17 +156,25 @@ Whether the node has the key
|
||||
|
||||
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19)
|
||||
|
||||
Check if the node is of the given type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The type to check
|
||||
|
||||
@@ -176,35 +186,39 @@ 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:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`is`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#is)
|
||||
|
||||
***
|
||||
|
||||
### key()
|
||||
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L51)
|
||||
|
||||
Assert that the node has the given key and return it.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
[`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
The value of the key wrapped in a Maybe
|
||||
|
||||
@@ -214,8 +228,4 @@ 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:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`key`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#key)
|
||||
|
||||
@@ -2,41 +2,41 @@
|
||||
|
||||
# Class: ReloadContinuationItemsCommand
|
||||
|
||||
Defined in: [src/parser/continuations.ts:50](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L50)
|
||||
|
||||
## Extends
|
||||
|
||||
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
- [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new ReloadContinuationItemsCommand()
|
||||
### Constructor
|
||||
|
||||
> **new ReloadContinuationItemsCommand**(`data`): [`ReloadContinuationItemsCommand`](ReloadContinuationItemsCommand.md)
|
||||
> **new ReloadContinuationItemsCommand**(`data`): `ReloadContinuationItemsCommand`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:57](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L57)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
|
||||
##### data
|
||||
|
||||
[`RawNode`](../type-aliases/RawNode.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ReloadContinuationItemsCommand`](ReloadContinuationItemsCommand.md)
|
||||
`ReloadContinuationItemsCommand`
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L57)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`constructor`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#constructor)
|
||||
|
||||
## Properties
|
||||
|
||||
### contents
|
||||
|
||||
> **contents**: `null` \| [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
|
||||
> **contents**: [`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\> \| `null`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:54](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L54)
|
||||
Defined in: [src/parser/continuations.ts:54](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L54)
|
||||
|
||||
***
|
||||
|
||||
@@ -44,9 +44,7 @@
|
||||
|
||||
> `optional` **slot**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:55](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L55)
|
||||
Defined in: [src/parser/continuations.ts:55](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L55)
|
||||
|
||||
***
|
||||
|
||||
@@ -54,9 +52,7 @@
|
||||
|
||||
> **target\_id**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:53](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L53)
|
||||
Defined in: [src/parser/continuations.ts:53](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L53)
|
||||
|
||||
***
|
||||
|
||||
@@ -64,13 +60,11 @@
|
||||
|
||||
> `readonly` **type**: `string`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type)
|
||||
|
||||
***
|
||||
|
||||
@@ -78,13 +72,11 @@
|
||||
|
||||
> `readonly` `static` **type**: `"reloadContinuationItemsCommand"` = `'reloadContinuationItemsCommand'`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:51](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L51)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L51)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type-1)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -92,17 +84,25 @@
|
||||
|
||||
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
|
||||
|
||||
Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L29)
|
||||
|
||||
Cast to one of the given types.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The types to cast to
|
||||
|
||||
@@ -118,11 +118,7 @@ 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:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`as`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#as)
|
||||
|
||||
***
|
||||
|
||||
@@ -130,17 +126,25 @@ If the node is not of the given type
|
||||
|
||||
> **hasKey**\<`T`, `R`\>(`key`): `this is ReloadContinuationItemsCommand & { [k in string]: R }`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L41)
|
||||
|
||||
Check for a key without asserting the type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
@@ -152,11 +156,7 @@ 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:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`hasKey`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#haskey)
|
||||
|
||||
***
|
||||
|
||||
@@ -164,17 +164,25 @@ Whether the node has the key
|
||||
|
||||
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19)
|
||||
|
||||
Check if the node is of the given type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The type to check
|
||||
|
||||
@@ -186,35 +194,39 @@ 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:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`is`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#is)
|
||||
|
||||
***
|
||||
|
||||
### key()
|
||||
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L51)
|
||||
|
||||
Assert that the node has the given key and return it.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
[`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
The value of the key wrapped in a Maybe
|
||||
|
||||
@@ -224,8 +236,4 @@ 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:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`key`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#key)
|
||||
|
||||
@@ -2,41 +2,41 @@
|
||||
|
||||
# Class: SectionListContinuation
|
||||
|
||||
Defined in: [src/parser/continuations.ts:65](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L65)
|
||||
|
||||
## Extends
|
||||
|
||||
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
- [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new SectionListContinuation()
|
||||
### Constructor
|
||||
|
||||
> **new SectionListContinuation**(`data`): [`SectionListContinuation`](SectionListContinuation.md)
|
||||
> **new SectionListContinuation**(`data`): `SectionListContinuation`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:71](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L71)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
|
||||
##### data
|
||||
|
||||
[`RawNode`](../type-aliases/RawNode.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`SectionListContinuation`](SectionListContinuation.md)
|
||||
`SectionListContinuation`
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L71)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`constructor`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#constructor)
|
||||
|
||||
## Properties
|
||||
|
||||
### contents
|
||||
|
||||
> **contents**: `null` \| [`ObservedArray`](../namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../namespaces/Helpers/classes/YTNode.md)\>
|
||||
> **contents**: [`ObservedArray`](../youtubei.js/namespaces/Helpers/type-aliases/ObservedArray.md)\<[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)\> \| `null`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:69](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L69)
|
||||
Defined in: [src/parser/continuations.ts:69](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L69)
|
||||
|
||||
***
|
||||
|
||||
@@ -44,9 +44,7 @@
|
||||
|
||||
> **continuation**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:68](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L68)
|
||||
Defined in: [src/parser/continuations.ts:68](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L68)
|
||||
|
||||
***
|
||||
|
||||
@@ -54,13 +52,11 @@
|
||||
|
||||
> `readonly` **type**: `string`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type)
|
||||
|
||||
***
|
||||
|
||||
@@ -68,13 +64,11 @@
|
||||
|
||||
> `readonly` `static` **type**: `"sectionListContinuation"` = `'sectionListContinuation'`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:66](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L66)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L66)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type-1)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -82,17 +76,25 @@
|
||||
|
||||
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
|
||||
|
||||
Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L29)
|
||||
|
||||
Cast to one of the given types.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The types to cast to
|
||||
|
||||
@@ -108,11 +110,7 @@ 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:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`as`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#as)
|
||||
|
||||
***
|
||||
|
||||
@@ -120,17 +118,25 @@ If the node is not of the given type
|
||||
|
||||
> **hasKey**\<`T`, `R`\>(`key`): `this is SectionListContinuation & { [k in string]: R }`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L41)
|
||||
|
||||
Check for a key without asserting the type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
@@ -142,11 +148,7 @@ 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:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`hasKey`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#haskey)
|
||||
|
||||
***
|
||||
|
||||
@@ -154,17 +156,25 @@ Whether the node has the key
|
||||
|
||||
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19)
|
||||
|
||||
Check if the node is of the given type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The type to check
|
||||
|
||||
@@ -176,35 +186,39 @@ 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:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`is`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#is)
|
||||
|
||||
***
|
||||
|
||||
### key()
|
||||
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L51)
|
||||
|
||||
Assert that the node has the given key and return it.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
[`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
The value of the key wrapped in a Maybe
|
||||
|
||||
@@ -214,8 +228,4 @@ 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:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`key`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#key)
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
# Class: Session
|
||||
|
||||
Defined in: [src/core/Session.ts:251](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L251)
|
||||
|
||||
Represents an InnerTube session. This holds all the data needed to make requests to YouTube.
|
||||
|
||||
## Extends
|
||||
@@ -10,43 +12,61 @@ Represents an InnerTube session. This holds all the data needed to make requests
|
||||
|
||||
## Constructors
|
||||
|
||||
### new Session()
|
||||
### Constructor
|
||||
|
||||
> **new Session**(`context`, `api_key`, `api_version`, `account_index`, `config_data`?, `player`?, `cookie`?, `fetch`?, `cache`?, `po_token`?): [`Session`](Session.md)
|
||||
> **new Session**(`context`, `api_key`, `api_version`, `account_index`, `config_data?`, `player?`, `cookie?`, `fetch?`, `cache?`, `po_token?`): `Session`
|
||||
|
||||
Defined in: [src/core/Session.ts:258](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L258)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **context**: [`Context`](../type-aliases/Context.md)
|
||||
##### context
|
||||
|
||||
• **api\_key**: `string`
|
||||
[`Context`](../type-aliases/Context.md)
|
||||
|
||||
• **api\_version**: `string`
|
||||
##### api\_key
|
||||
|
||||
• **account\_index**: `number`
|
||||
`string`
|
||||
|
||||
• **config\_data?**: `string`
|
||||
##### api\_version
|
||||
|
||||
• **player?**: [`Player`](Player.md)
|
||||
`string`
|
||||
|
||||
• **cookie?**: `string`
|
||||
##### account\_index
|
||||
|
||||
• **fetch?**
|
||||
`number`
|
||||
|
||||
• **cache?**: [`ICache`](../namespaces/Types/interfaces/ICache.md)
|
||||
##### config\_data?
|
||||
|
||||
• **po\_token?**: `string`
|
||||
`string`
|
||||
|
||||
##### player?
|
||||
|
||||
[`Player`](Player.md)
|
||||
|
||||
##### cookie?
|
||||
|
||||
`string`
|
||||
|
||||
##### fetch?
|
||||
|
||||
\{(`input`, `init?`): `Promise`\<`Response`\>; (`input`, `init?`): `Promise`\<`Response`\>; \}
|
||||
|
||||
##### cache?
|
||||
|
||||
[`ICache`](../youtubei.js/namespaces/Types/interfaces/ICache.md)
|
||||
|
||||
##### po\_token?
|
||||
|
||||
`string`
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Session`](Session.md)
|
||||
`Session`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[`EventEmitter`](EventEmitter.md).[`constructor`](EventEmitter.md#constructors)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:258](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L258)
|
||||
[`EventEmitter`](EventEmitter.md).[`constructor`](EventEmitter.md#constructor)
|
||||
|
||||
## Properties
|
||||
|
||||
@@ -54,9 +74,7 @@ Represents an InnerTube session. This holds all the data needed to make requests
|
||||
|
||||
> **account\_index**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:262](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L262)
|
||||
Defined in: [src/core/Session.ts:262](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L262)
|
||||
|
||||
***
|
||||
|
||||
@@ -64,9 +82,7 @@ Represents an InnerTube session. This holds all the data needed to make requests
|
||||
|
||||
> **actions**: [`Actions`](Actions.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:255](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L255)
|
||||
Defined in: [src/core/Session.ts:255](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L255)
|
||||
|
||||
***
|
||||
|
||||
@@ -74,9 +90,7 @@ Represents an InnerTube session. This holds all the data needed to make requests
|
||||
|
||||
> **api\_key**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:260](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L260)
|
||||
Defined in: [src/core/Session.ts:260](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L260)
|
||||
|
||||
***
|
||||
|
||||
@@ -84,19 +98,15 @@ Represents an InnerTube session. This holds all the data needed to make requests
|
||||
|
||||
> **api\_version**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:261](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L261)
|
||||
Defined in: [src/core/Session.ts:261](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L261)
|
||||
|
||||
***
|
||||
|
||||
### cache?
|
||||
|
||||
> `optional` **cache**: [`ICache`](../namespaces/Types/interfaces/ICache.md)
|
||||
> `optional` **cache**: [`ICache`](../youtubei.js/namespaces/Types/interfaces/ICache.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:267](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L267)
|
||||
Defined in: [src/core/Session.ts:267](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L267)
|
||||
|
||||
***
|
||||
|
||||
@@ -104,9 +114,7 @@ Represents an InnerTube session. This holds all the data needed to make requests
|
||||
|
||||
> `optional` **config\_data**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:263](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L263)
|
||||
Defined in: [src/core/Session.ts:263](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L263)
|
||||
|
||||
***
|
||||
|
||||
@@ -114,9 +122,7 @@ Represents an InnerTube session. This holds all the data needed to make requests
|
||||
|
||||
> **context**: [`Context`](../type-aliases/Context.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:259](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L259)
|
||||
Defined in: [src/core/Session.ts:259](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L259)
|
||||
|
||||
***
|
||||
|
||||
@@ -124,9 +130,7 @@ Represents an InnerTube session. This holds all the data needed to make requests
|
||||
|
||||
> `optional` **cookie**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:265](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L265)
|
||||
Defined in: [src/core/Session.ts:265](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L265)
|
||||
|
||||
***
|
||||
|
||||
@@ -134,9 +138,7 @@ Represents an InnerTube session. This holds all the data needed to make requests
|
||||
|
||||
> **http**: [`HTTPClient`](HTTPClient.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:253](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L253)
|
||||
Defined in: [src/core/Session.ts:253](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L253)
|
||||
|
||||
***
|
||||
|
||||
@@ -144,9 +146,7 @@ Represents an InnerTube session. This holds all the data needed to make requests
|
||||
|
||||
> **logged\_in**: `boolean`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:254](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L254)
|
||||
Defined in: [src/core/Session.ts:254](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L254)
|
||||
|
||||
***
|
||||
|
||||
@@ -154,9 +154,7 @@ Represents an InnerTube session. This holds all the data needed to make requests
|
||||
|
||||
> **oauth**: [`OAuth2`](OAuth2.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:252](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L252)
|
||||
Defined in: [src/core/Session.ts:252](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L252)
|
||||
|
||||
***
|
||||
|
||||
@@ -164,9 +162,7 @@ Represents an InnerTube session. This holds all the data needed to make requests
|
||||
|
||||
> `optional` **player**: [`Player`](Player.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:264](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L264)
|
||||
Defined in: [src/core/Session.ts:264](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L264)
|
||||
|
||||
***
|
||||
|
||||
@@ -174,9 +170,7 @@ Represents an InnerTube session. This holds all the data needed to make requests
|
||||
|
||||
> `optional` **po\_token**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:268](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L268)
|
||||
Defined in: [src/core/Session.ts:268](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L268)
|
||||
|
||||
***
|
||||
|
||||
@@ -184,57 +178,57 @@ Represents an InnerTube session. This holds all the data needed to make requests
|
||||
|
||||
> `optional` **user\_agent**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:256](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L256)
|
||||
Defined in: [src/core/Session.ts:256](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L256)
|
||||
|
||||
## Accessors
|
||||
|
||||
### client\_name
|
||||
|
||||
> `get` **client\_name**(): `string`
|
||||
#### Get Signature
|
||||
|
||||
#### Returns
|
||||
> **get** **client\_name**(): `string`
|
||||
|
||||
Defined in: [src/core/Session.ts:688](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L688)
|
||||
|
||||
##### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:688](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L688)
|
||||
|
||||
***
|
||||
|
||||
### client\_version
|
||||
|
||||
> `get` **client\_version**(): `string`
|
||||
#### Get Signature
|
||||
|
||||
#### Returns
|
||||
> **get** **client\_version**(): `string`
|
||||
|
||||
Defined in: [src/core/Session.ts:684](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L684)
|
||||
|
||||
##### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:684](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L684)
|
||||
|
||||
***
|
||||
|
||||
### lang
|
||||
|
||||
> `get` **lang**(): `string`
|
||||
#### Get Signature
|
||||
|
||||
#### Returns
|
||||
> **get** **lang**(): `string`
|
||||
|
||||
Defined in: [src/core/Session.ts:692](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L692)
|
||||
|
||||
##### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:692](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L692)
|
||||
|
||||
## Methods
|
||||
|
||||
### addEventListener()
|
||||
|
||||
> **addEventListener**(`type`, `callback`, `options`?): `void`
|
||||
> **addEventListener**(`type`, `callback`, `options?`): `void`
|
||||
|
||||
Defined in: node\_modules/typescript/lib/lib.dom.d.ts:8256
|
||||
|
||||
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.
|
||||
|
||||
@@ -254,11 +248,17 @@ The event listener is appended to target's event listener list and is not append
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **type**: `string`
|
||||
##### type
|
||||
|
||||
• **callback**: `null` \| `EventListenerOrEventListenerObject`
|
||||
`string`
|
||||
|
||||
• **options?**: `boolean` \| `AddEventListenerOptions`
|
||||
##### callback
|
||||
|
||||
`EventListenerOrEventListenerObject` | `null`
|
||||
|
||||
##### options?
|
||||
|
||||
`boolean` | `AddEventListenerOptions`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -268,23 +268,23 @@ The event listener is appended to target's event listener list and is not append
|
||||
|
||||
[`EventEmitter`](EventEmitter.md).[`addEventListener`](EventEmitter.md#addeventlistener)
|
||||
|
||||
#### Defined in
|
||||
|
||||
node\_modules/typescript/lib/lib.dom.d.ts:8256
|
||||
|
||||
***
|
||||
|
||||
### dispatchEvent()
|
||||
|
||||
> **dispatchEvent**(`event`): `boolean`
|
||||
|
||||
Defined in: node\_modules/typescript/lib/lib.dom.d.ts:8262
|
||||
|
||||
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`
|
||||
##### event
|
||||
|
||||
`Event`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -294,21 +294,23 @@ Dispatches a synthetic event event to target and returns true if either event's
|
||||
|
||||
[`EventEmitter`](EventEmitter.md).[`dispatchEvent`](EventEmitter.md#dispatchevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
node\_modules/typescript/lib/lib.dom.d.ts:8262
|
||||
|
||||
***
|
||||
|
||||
### emit()
|
||||
|
||||
> **emit**(`type`, ...`args`): `void`
|
||||
|
||||
Defined in: [src/utils/EventEmitterLike.ts:10](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/EventEmitterLike.ts#L10)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **type**: `string`
|
||||
##### type
|
||||
|
||||
• ...**args**: `any`[]
|
||||
`string`
|
||||
|
||||
##### args
|
||||
|
||||
...`any`[]
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -318,21 +320,23 @@ node\_modules/typescript/lib/lib.dom.d.ts:8262
|
||||
|
||||
[`EventEmitter`](EventEmitter.md).[`emit`](EventEmitter.md#emit)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/utils/EventEmitterLike.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/EventEmitterLike.ts#L10)
|
||||
|
||||
***
|
||||
|
||||
### off()
|
||||
|
||||
> **off**(`type`, `listener`): `void`
|
||||
|
||||
Defined in: [src/utils/EventEmitterLike.ts:40](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/EventEmitterLike.ts#L40)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **type**: `string`
|
||||
##### type
|
||||
|
||||
• **listener**
|
||||
`string`
|
||||
|
||||
##### listener
|
||||
|
||||
(...`args`) => `void`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -342,23 +346,25 @@ node\_modules/typescript/lib/lib.dom.d.ts:8262
|
||||
|
||||
[`EventEmitter`](EventEmitter.md).[`off`](EventEmitter.md#off)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/utils/EventEmitterLike.ts:40](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/EventEmitterLike.ts#L40)
|
||||
|
||||
***
|
||||
|
||||
### on()
|
||||
|
||||
#### on(type, listener)
|
||||
#### Call Signature
|
||||
|
||||
> **on**(`type`, `listener`): `void`
|
||||
|
||||
Defined in: [src/core/Session.ts:278](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L278)
|
||||
|
||||
##### Parameters
|
||||
|
||||
• **type**: `"auth"`
|
||||
###### type
|
||||
|
||||
• **listener**: [`OAuth2AuthEventHandler`](../type-aliases/OAuth2AuthEventHandler.md)
|
||||
`"auth"`
|
||||
|
||||
###### listener
|
||||
|
||||
[`OAuth2AuthEventHandler`](../type-aliases/OAuth2AuthEventHandler.md)
|
||||
|
||||
##### Returns
|
||||
|
||||
@@ -368,19 +374,21 @@ node\_modules/typescript/lib/lib.dom.d.ts:8262
|
||||
|
||||
[`EventEmitter`](EventEmitter.md).[`on`](EventEmitter.md#on)
|
||||
|
||||
##### Defined in
|
||||
|
||||
[src/core/Session.ts:278](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L278)
|
||||
|
||||
#### on(type, listener)
|
||||
#### Call Signature
|
||||
|
||||
> **on**(`type`, `listener`): `void`
|
||||
|
||||
Defined in: [src/core/Session.ts:279](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L279)
|
||||
|
||||
##### Parameters
|
||||
|
||||
• **type**: `"auth-pending"`
|
||||
###### type
|
||||
|
||||
• **listener**: [`OAuth2AuthPendingEventHandler`](../type-aliases/OAuth2AuthPendingEventHandler.md)
|
||||
`"auth-pending"`
|
||||
|
||||
###### listener
|
||||
|
||||
[`OAuth2AuthPendingEventHandler`](../type-aliases/OAuth2AuthPendingEventHandler.md)
|
||||
|
||||
##### Returns
|
||||
|
||||
@@ -390,19 +398,21 @@ node\_modules/typescript/lib/lib.dom.d.ts:8262
|
||||
|
||||
`EventEmitter.on`
|
||||
|
||||
##### Defined in
|
||||
|
||||
[src/core/Session.ts:279](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L279)
|
||||
|
||||
#### on(type, listener)
|
||||
#### Call Signature
|
||||
|
||||
> **on**(`type`, `listener`): `void`
|
||||
|
||||
Defined in: [src/core/Session.ts:280](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L280)
|
||||
|
||||
##### Parameters
|
||||
|
||||
• **type**: `"auth-error"`
|
||||
###### type
|
||||
|
||||
• **listener**: [`OAuth2AuthErrorEventHandler`](../type-aliases/OAuth2AuthErrorEventHandler.md)
|
||||
`"auth-error"`
|
||||
|
||||
###### listener
|
||||
|
||||
[`OAuth2AuthErrorEventHandler`](../type-aliases/OAuth2AuthErrorEventHandler.md)
|
||||
|
||||
##### Returns
|
||||
|
||||
@@ -412,19 +422,21 @@ node\_modules/typescript/lib/lib.dom.d.ts:8262
|
||||
|
||||
`EventEmitter.on`
|
||||
|
||||
##### Defined in
|
||||
|
||||
[src/core/Session.ts:280](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L280)
|
||||
|
||||
#### on(type, listener)
|
||||
#### Call Signature
|
||||
|
||||
> **on**(`type`, `listener`): `void`
|
||||
|
||||
Defined in: [src/core/Session.ts:281](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L281)
|
||||
|
||||
##### Parameters
|
||||
|
||||
• **type**: `"update-credentials"`
|
||||
###### type
|
||||
|
||||
• **listener**: [`OAuth2AuthEventHandler`](../type-aliases/OAuth2AuthEventHandler.md)
|
||||
`"update-credentials"`
|
||||
|
||||
###### listener
|
||||
|
||||
[`OAuth2AuthEventHandler`](../type-aliases/OAuth2AuthEventHandler.md)
|
||||
|
||||
##### Returns
|
||||
|
||||
@@ -434,23 +446,25 @@ node\_modules/typescript/lib/lib.dom.d.ts:8262
|
||||
|
||||
`EventEmitter.on`
|
||||
|
||||
##### Defined in
|
||||
|
||||
[src/core/Session.ts:281](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L281)
|
||||
|
||||
***
|
||||
|
||||
### once()
|
||||
|
||||
#### once(type, listener)
|
||||
#### Call Signature
|
||||
|
||||
> **once**(`type`, `listener`): `void`
|
||||
|
||||
Defined in: [src/core/Session.ts:287](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L287)
|
||||
|
||||
##### Parameters
|
||||
|
||||
• **type**: `"auth"`
|
||||
###### type
|
||||
|
||||
• **listener**: [`OAuth2AuthEventHandler`](../type-aliases/OAuth2AuthEventHandler.md)
|
||||
`"auth"`
|
||||
|
||||
###### listener
|
||||
|
||||
[`OAuth2AuthEventHandler`](../type-aliases/OAuth2AuthEventHandler.md)
|
||||
|
||||
##### Returns
|
||||
|
||||
@@ -460,19 +474,21 @@ node\_modules/typescript/lib/lib.dom.d.ts:8262
|
||||
|
||||
[`EventEmitter`](EventEmitter.md).[`once`](EventEmitter.md#once)
|
||||
|
||||
##### Defined in
|
||||
|
||||
[src/core/Session.ts:287](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L287)
|
||||
|
||||
#### once(type, listener)
|
||||
#### Call Signature
|
||||
|
||||
> **once**(`type`, `listener`): `void`
|
||||
|
||||
Defined in: [src/core/Session.ts:288](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L288)
|
||||
|
||||
##### Parameters
|
||||
|
||||
• **type**: `"auth-pending"`
|
||||
###### type
|
||||
|
||||
• **listener**: [`OAuth2AuthPendingEventHandler`](../type-aliases/OAuth2AuthPendingEventHandler.md)
|
||||
`"auth-pending"`
|
||||
|
||||
###### listener
|
||||
|
||||
[`OAuth2AuthPendingEventHandler`](../type-aliases/OAuth2AuthPendingEventHandler.md)
|
||||
|
||||
##### Returns
|
||||
|
||||
@@ -482,19 +498,21 @@ node\_modules/typescript/lib/lib.dom.d.ts:8262
|
||||
|
||||
`EventEmitter.once`
|
||||
|
||||
##### Defined in
|
||||
|
||||
[src/core/Session.ts:288](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L288)
|
||||
|
||||
#### once(type, listener)
|
||||
#### Call Signature
|
||||
|
||||
> **once**(`type`, `listener`): `void`
|
||||
|
||||
Defined in: [src/core/Session.ts:289](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L289)
|
||||
|
||||
##### Parameters
|
||||
|
||||
• **type**: `"auth-error"`
|
||||
###### type
|
||||
|
||||
• **listener**: [`OAuth2AuthErrorEventHandler`](../type-aliases/OAuth2AuthErrorEventHandler.md)
|
||||
`"auth-error"`
|
||||
|
||||
###### listener
|
||||
|
||||
[`OAuth2AuthErrorEventHandler`](../type-aliases/OAuth2AuthErrorEventHandler.md)
|
||||
|
||||
##### Returns
|
||||
|
||||
@@ -504,15 +522,13 @@ node\_modules/typescript/lib/lib.dom.d.ts:8262
|
||||
|
||||
`EventEmitter.once`
|
||||
|
||||
##### Defined in
|
||||
|
||||
[src/core/Session.ts:289](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L289)
|
||||
|
||||
***
|
||||
|
||||
### removeEventListener()
|
||||
|
||||
> **removeEventListener**(`type`, `callback`, `options`?): `void`
|
||||
> **removeEventListener**(`type`, `callback`, `options?`): `void`
|
||||
|
||||
Defined in: node\_modules/typescript/lib/lib.dom.d.ts:8268
|
||||
|
||||
Removes the event listener in target's event listener list with the same type, callback, and options.
|
||||
|
||||
@@ -520,11 +536,17 @@ Removes the event listener in target's event listener list with the same type, c
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **type**: `string`
|
||||
##### type
|
||||
|
||||
• **callback**: `null` \| `EventListenerOrEventListenerObject`
|
||||
`string`
|
||||
|
||||
• **options?**: `boolean` \| `EventListenerOptions`
|
||||
##### callback
|
||||
|
||||
`EventListenerOrEventListenerObject` | `null`
|
||||
|
||||
##### options?
|
||||
|
||||
`boolean` | `EventListenerOptions`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -534,152 +556,158 @@ Removes the event listener in target's event listener list with the same type, c
|
||||
|
||||
[`EventEmitter`](EventEmitter.md).[`removeEventListener`](EventEmitter.md#removeeventlistener)
|
||||
|
||||
#### Defined in
|
||||
|
||||
node\_modules/typescript/lib/lib.dom.d.ts:8268
|
||||
|
||||
***
|
||||
|
||||
### signIn()
|
||||
|
||||
> **signIn**(`credentials`?): `Promise`\<`void`\>
|
||||
> **signIn**(`credentials?`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/core/Session.ts:651](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L651)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **credentials?**: [`OAuth2Tokens`](../type-aliases/OAuth2Tokens.md)
|
||||
##### credentials?
|
||||
|
||||
[`OAuth2Tokens`](../type-aliases/OAuth2Tokens.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`void`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:651](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L651)
|
||||
|
||||
***
|
||||
|
||||
### signOut()
|
||||
|
||||
> **signOut**(): `Promise`\<`undefined` \| `Response`\>
|
||||
> **signOut**(): `Promise`\<`Response` \| `undefined`\>
|
||||
|
||||
Defined in: [src/core/Session.ts:674](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L674)
|
||||
|
||||
Signs out of the current account and revokes the credentials.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`undefined` \| `Response`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:674](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L674)
|
||||
`Promise`\<`Response` \| `undefined`\>
|
||||
|
||||
***
|
||||
|
||||
### create()
|
||||
|
||||
> `static` **create**(`options`): `Promise`\<[`Session`](Session.md)\>
|
||||
> `static` **create**(`options`): `Promise`\<`Session`\>
|
||||
|
||||
Defined in: [src/core/Session.ts:295](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L295)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **options**: [`SessionOptions`](../type-aliases/SessionOptions.md) = `{}`
|
||||
##### options
|
||||
|
||||
[`SessionOptions`](../type-aliases/SessionOptions.md) = `{}`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<[`Session`](Session.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/Session.ts:295](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L295)
|
||||
`Promise`\<`Session`\>
|
||||
|
||||
***
|
||||
|
||||
### fromCache()
|
||||
|
||||
> `static` **fromCache**(`cache`, `session_args`): `Promise`\<`null` \| [`SessionData`](../type-aliases/SessionData.md)\>
|
||||
> `static` **fromCache**(`cache`, `session_args`): `Promise`\<[`SessionData`](../type-aliases/SessionData.md) \| `null`\>
|
||||
|
||||
Defined in: [src/core/Session.ts:327](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L327)
|
||||
|
||||
Retrieves session data from cache.
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **cache**: [`ICache`](../namespaces/Types/interfaces/ICache.md)
|
||||
##### cache
|
||||
|
||||
[`ICache`](../youtubei.js/namespaces/Types/interfaces/ICache.md)
|
||||
|
||||
A valid cache implementation.
|
||||
|
||||
• **session\_args**: [`SessionArgs`](../type-aliases/SessionArgs.md)
|
||||
##### 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:327](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L327)
|
||||
`Promise`\<[`SessionData`](../type-aliases/SessionData.md) \| `null`\>
|
||||
|
||||
***
|
||||
|
||||
### 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`?, `retrieve_innertube_config`?): `Promise`\<`object`\>
|
||||
> `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?`, `retrieve_innertube_config?`): `Promise`\<\{ `account_index`: `number`; `api_key`: `string`; `api_version`: `string`; `config_data?`: `string`; `context`: [`Context`](../type-aliases/Context.md); \}\>
|
||||
|
||||
Defined in: [src/core/Session.ts:376](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/core/Session.ts#L376)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **lang**: `string` = `''`
|
||||
##### lang
|
||||
|
||||
• **location**: `string` = `''`
|
||||
`string` = `''`
|
||||
|
||||
• **account\_index**: `number` = `0`
|
||||
##### location
|
||||
|
||||
• **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`
|
||||
|
||||
• **retrieve\_innertube\_config?**: `boolean` = `true`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`object`\>
|
||||
`string` = `''`
|
||||
|
||||
##### account\_index
|
||||
|
||||
> **account\_index**: `number`
|
||||
`number` = `0`
|
||||
|
||||
##### api\_key
|
||||
##### visitor\_data
|
||||
|
||||
> **api\_key**: `string`
|
||||
`string` = `''`
|
||||
|
||||
##### api\_version
|
||||
##### user\_agent
|
||||
|
||||
> **api\_version**: `string`
|
||||
`string` = `...`
|
||||
|
||||
##### config\_data?
|
||||
##### enable\_safety\_mode
|
||||
|
||||
> `optional` **config\_data**: `string`
|
||||
`boolean` = `false`
|
||||
|
||||
##### context
|
||||
##### generate\_session\_locally
|
||||
|
||||
> **context**: [`Context`](../type-aliases/Context.md)
|
||||
`boolean` = `false`
|
||||
|
||||
#### Defined in
|
||||
##### device\_category
|
||||
|
||||
[src/core/Session.ts:376](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/core/Session.ts#L376)
|
||||
[`DeviceCategory`](../youtubei.js/namespaces/Utils/type-aliases/DeviceCategory.md) = `'desktop'`
|
||||
|
||||
##### client\_name
|
||||
|
||||
[`ClientType`](../enumerations/ClientType.md) = `ClientType.WEB`
|
||||
|
||||
##### tz
|
||||
|
||||
`string` = `...`
|
||||
|
||||
##### fetch
|
||||
|
||||
\{(`input`, `init?`): `Promise`\<`Response`\>; (`input`, `init?`): `Promise`\<`Response`\>; \}
|
||||
|
||||
##### on\_behalf\_of\_user?
|
||||
|
||||
`string`
|
||||
|
||||
##### cache?
|
||||
|
||||
[`ICache`](../youtubei.js/namespaces/Types/interfaces/ICache.md)
|
||||
|
||||
##### enable\_session\_cache?
|
||||
|
||||
`boolean` = `true`
|
||||
|
||||
##### po\_token?
|
||||
|
||||
`string`
|
||||
|
||||
##### retrieve\_innertube\_config?
|
||||
|
||||
`boolean` = `true`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<\{ `account_index`: `number`; `api_key`: `string`; `api_version`: `string`; `config_data?`: `string`; `context`: [`Context`](../type-aliases/Context.md); \}\>
|
||||
|
||||
@@ -2,41 +2,41 @@
|
||||
|
||||
# Class: ShowMiniplayerCommand
|
||||
|
||||
Defined in: [src/parser/continuations.ts:35](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L35)
|
||||
|
||||
## Extends
|
||||
|
||||
- [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
- [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new ShowMiniplayerCommand()
|
||||
### Constructor
|
||||
|
||||
> **new ShowMiniplayerCommand**(`data`): [`ShowMiniplayerCommand`](ShowMiniplayerCommand.md)
|
||||
> **new ShowMiniplayerCommand**(`data`): `ShowMiniplayerCommand`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:41](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L41)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **data**: [`RawNode`](../namespaces/APIResponseTypes/type-aliases/RawNode.md)
|
||||
##### data
|
||||
|
||||
[`RawNode`](../type-aliases/RawNode.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ShowMiniplayerCommand`](ShowMiniplayerCommand.md)
|
||||
`ShowMiniplayerCommand`
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L41)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`constructor`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#constructor)
|
||||
|
||||
## Properties
|
||||
|
||||
### miniplayer\_command
|
||||
|
||||
> **miniplayer\_command**: [`NavigationEndpoint`](../namespaces/YTNodes/classes/NavigationEndpoint.md)
|
||||
> **miniplayer\_command**: [`NavigationEndpoint`](../youtubei.js/namespaces/YTNodes/classes/NavigationEndpoint.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:38](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L38)
|
||||
Defined in: [src/parser/continuations.ts:38](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L38)
|
||||
|
||||
***
|
||||
|
||||
@@ -44,9 +44,7 @@
|
||||
|
||||
> **show\_premium\_branding**: `boolean`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/parser/continuations.ts:39](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L39)
|
||||
Defined in: [src/parser/continuations.ts:39](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L39)
|
||||
|
||||
***
|
||||
|
||||
@@ -54,13 +52,11 @@
|
||||
|
||||
> `readonly` **type**: `string`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:8](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L8)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L8)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type)
|
||||
|
||||
***
|
||||
|
||||
@@ -68,13 +64,11 @@
|
||||
|
||||
> `readonly` `static` **type**: `"showMiniplayerCommand"` = `'showMiniplayerCommand'`
|
||||
|
||||
Defined in: [src/parser/continuations.ts:36](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/continuations.ts#L36)
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/parser/continuations.ts#L36)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`type`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#type-1)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -82,17 +76,25 @@
|
||||
|
||||
> **as**\<`T`, `K`\>(...`types`): `InstanceType`\<`K`\[`number`\]\>
|
||||
|
||||
Defined in: [src/parser/helpers.ts:29](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L29)
|
||||
|
||||
Cast to one of the given types.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The types to cast to
|
||||
|
||||
@@ -108,11 +110,7 @@ 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:29](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L29)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`as`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#as)
|
||||
|
||||
***
|
||||
|
||||
@@ -120,17 +118,25 @@ If the node is not of the given type
|
||||
|
||||
> **hasKey**\<`T`, `R`\>(`key`): `this is ShowMiniplayerCommand & { [k in string]: R }`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:41](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L41)
|
||||
|
||||
Check for a key without asserting the type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
@@ -142,11 +148,7 @@ 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:41](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L41)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`hasKey`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#haskey)
|
||||
|
||||
***
|
||||
|
||||
@@ -154,17 +156,25 @@ Whether the node has the key
|
||||
|
||||
> **is**\<`T`, `K`\>(...`types`): `this is InstanceType<K[number]>`
|
||||
|
||||
Defined in: [src/parser/helpers.ts:19](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L19)
|
||||
|
||||
Check if the node is of the given type.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* [`YTNode`](../namespaces/Helpers/classes/YTNode.md)
|
||||
##### T
|
||||
|
||||
• **K** *extends* [`YTNodeConstructor`](../namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
`T` *extends* [`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md)
|
||||
|
||||
##### K
|
||||
|
||||
`K` *extends* [`YTNodeConstructor`](../youtubei.js/namespaces/Helpers/interfaces/YTNodeConstructor.md)\<`T`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**types**: `K`
|
||||
##### types
|
||||
|
||||
...`K`
|
||||
|
||||
The type to check
|
||||
|
||||
@@ -176,35 +186,39 @@ 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:19](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L19)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`is`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#is)
|
||||
|
||||
***
|
||||
|
||||
### key()
|
||||
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
> **key**\<`T`, `R`\>(`key`): [`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
Defined in: [src/parser/helpers.ts:51](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/parser/helpers.ts#L51)
|
||||
|
||||
Assert that the node has the given key and return it.
|
||||
|
||||
#### Type Parameters
|
||||
|
||||
• **T** *extends* `string`
|
||||
##### T
|
||||
|
||||
• **R** = `any`
|
||||
`T` *extends* `string`
|
||||
|
||||
##### R
|
||||
|
||||
`R` = `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `T`
|
||||
##### key
|
||||
|
||||
`T`
|
||||
|
||||
The key to check
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Maybe`](../namespaces/Helpers/classes/Maybe.md)
|
||||
[`Maybe`](../youtubei.js/namespaces/Helpers/classes/Maybe.md)
|
||||
|
||||
The value of the key wrapped in a Maybe
|
||||
|
||||
@@ -214,8 +228,4 @@ 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:51](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/helpers.ts#L51)
|
||||
[`YTNode`](../youtubei.js/namespaces/Helpers/classes/YTNode.md).[`key`](../youtubei.js/namespaces/Helpers/classes/YTNode.md#key)
|
||||
|
||||
@@ -2,69 +2,73 @@
|
||||
|
||||
# Class: UniversalCache
|
||||
|
||||
Defined in: [src/utils/Cache.ts:4](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/Cache.ts#L4)
|
||||
|
||||
## Implements
|
||||
|
||||
- [`ICache`](../namespaces/Types/interfaces/ICache.md)
|
||||
- [`ICache`](../youtubei.js/namespaces/Types/interfaces/ICache.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new UniversalCache()
|
||||
### Constructor
|
||||
|
||||
> **new UniversalCache**(`persistent`, `persistent_directory`?): [`UniversalCache`](UniversalCache.md)
|
||||
> **new UniversalCache**(`persistent`, `persistent_directory?`): `UniversalCache`
|
||||
|
||||
Defined in: [src/utils/Cache.ts:6](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/Cache.ts#L6)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **persistent**: `boolean`
|
||||
##### persistent
|
||||
|
||||
• **persistent\_directory?**: `string`
|
||||
`boolean`
|
||||
|
||||
##### persistent\_directory?
|
||||
|
||||
`string`
|
||||
|
||||
#### Returns
|
||||
|
||||
[`UniversalCache`](UniversalCache.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/utils/Cache.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Cache.ts#L6)
|
||||
`UniversalCache`
|
||||
|
||||
## Accessors
|
||||
|
||||
### cache\_dir
|
||||
|
||||
> `get` **cache\_dir**(): `string`
|
||||
#### Get Signature
|
||||
|
||||
#### Returns
|
||||
> **get** **cache\_dir**(): `string`
|
||||
|
||||
Defined in: [src/utils/Cache.ts:9](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/Cache.ts#L9)
|
||||
|
||||
##### 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/af92984523f90200a18314b94478a2697c9deab0/src/utils/Cache.ts#L9)
|
||||
[`ICache`](../youtubei.js/namespaces/Types/interfaces/ICache.md).[`cache_dir`](../youtubei.js/namespaces/Types/interfaces/ICache.md#cache_dir)
|
||||
|
||||
## Methods
|
||||
|
||||
### get()
|
||||
|
||||
> **get**(`key`): `Promise`\<`undefined` \| `ArrayBuffer`\>
|
||||
> **get**(`key`): `Promise`\<`ArrayBuffer` \| `undefined`\>
|
||||
|
||||
Defined in: [src/utils/Cache.ts:12](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/Cache.ts#L12)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `string`
|
||||
##### key
|
||||
|
||||
`string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`undefined` \| `ArrayBuffer`\>
|
||||
`Promise`\<`ArrayBuffer` \| `undefined`\>
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/utils/Cache.ts#L12)
|
||||
[`ICache`](../youtubei.js/namespaces/Types/interfaces/ICache.md).[`get`](../youtubei.js/namespaces/Types/interfaces/ICache.md#get)
|
||||
|
||||
***
|
||||
|
||||
@@ -72,9 +76,13 @@
|
||||
|
||||
> **remove**(`key`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/utils/Cache.ts:18](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/Cache.ts#L18)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `string`
|
||||
##### key
|
||||
|
||||
`string`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -82,11 +90,7 @@
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/utils/Cache.ts#L18)
|
||||
[`ICache`](../youtubei.js/namespaces/Types/interfaces/ICache.md).[`remove`](../youtubei.js/namespaces/Types/interfaces/ICache.md#remove)
|
||||
|
||||
***
|
||||
|
||||
@@ -94,11 +98,17 @@
|
||||
|
||||
> **set**(`key`, `value`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/utils/Cache.ts:15](https://github.com/LuanRT/YouTube.js/blob/41b810629b3dc2bbebfa322c0c452c3f7303e993/src/utils/Cache.ts#L15)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **key**: `string`
|
||||
##### key
|
||||
|
||||
• **value**: `ArrayBuffer`
|
||||
`string`
|
||||
|
||||
##### value
|
||||
|
||||
`ArrayBuffer`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -106,8 +116,4 @@
|
||||
|
||||
#### 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/af92984523f90200a18314b94478a2697c9deab0/src/utils/Cache.ts#L15)
|
||||
[`ICache`](../youtubei.js/namespaces/Types/interfaces/ICache.md).[`set`](../youtubei.js/namespaces/Types/interfaces/ICache.md#set)
|
||||
|
||||
Reference in New Issue
Block a user